Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseSupport_ko




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseEclipse_ko


Difference between version 5 and version 1:

At line 1 changed 1 line.
[AppFuse], by default, is configured to be an [Eclipse|http://www.eclipse.org] project. When you run __ant new__ to create a new project, you will get the .project and .classpath files to start your project with. However, you will need to make a few easy setting changes in Eclipse (particularly to run [Ant|http://jakarta.apache.org/ant]). This tutorial shows you how to setup Eclipse to develop your AppFuse project.
[AppFuse|AppFuse_ko], 디폴트로, [Eclipse|http://www.eclipse.org] 프로젝트가 되도록 설정되었다. 당신이 새로운 프로젝트를 생성하기 위해 __ant new__를 수행할 때, 당신은 프로젝트를 시작하기 위한 .project와 .classpath파일을 얻게 될 것이다. 어쨌든, 당신은 Eclipse내 몇몇 쉬운 셋팅을 할 필요가 있을것이다. 이 튜토리얼은 당신에게 AppFuse프로젝트를 개발하기 위해 Eclipse를 셋업하는 방법을 보여준다.
At line 3 changed 1 line.
;:''In general, I don't use Eclipse for much more than a fancy text editor. I do most of my compiling, testing and deployment from the command line. This howto will hopefully make it easier for you to use Eclipse for building and testing, but if it doesn't work for you - the best fallback is to use the command line for running the Ant tasks. Of course, if you figure out ways to make the Eclipse integration better - please [let me know|mailto:[email protected]].''
;:''일반적으로, 나는 Eclipse를 사용하지 않고 이쁜 텍스트 편집기를 사용한다. 나는 명령창으로부터 컴파일, 테스팅, 개발을 수행한다. 이것은 빌드와 테스팅을 위해 Eclipse를 좀더 쉽게 사용하도록 만든 하우투 문서이다. 하지만, 이것이 당신에게는 작동하지 않는다면, 가장 좋은것은 Ant작업을 수행하기 위해 명령창을 사용하는 것이다. 물론, 당신이 Eclipse와의 통합에 대해서 더 잘 알고 있다면, [나에게|mailto:[email protected]] 알려달라.''
At line 5 changed 1 line.
This tutorial is based on Windows XP and Eclipse 3.0.1 and should work on any platform. You can [download Eclipse 3.0.1|http://cudlug.cudenver.edu/eclipse/eclipse/downloads/drops/R-3.0.1-200409161125/] if you don't already have it installed. I also recommend downloading [my Eclipse plugins bundle|http://www.raibledesigns.com/page/rd/?anchor=eclipse_plugins_updated_for_31] or purchasing [MyEclipse|http://www.myeclipseide.com]. A pipe dream of mine is to be able to use create a MyEclipse/AppFuse project - but that would likely require an entire rewrite of AppFuse's directory structure and build file and I just don't have the time or energy. Besides, the current system works pretty well if you don't mind using Ant.
이 튜토리얼은 윈도우즈 XP와 Eclipse 3.0.1 그리고 어떠한 플랫폼에서도 잘 작동하도록 작성되었다. 당신은 Eclipse가 설치되어 있지 않다면, [Eclipse 3.0.1 다운로드페이지|http://cudlug.cudenver.edu/eclipse/eclipse/downloads/drops/R-3.0.1-200409161125/]에서 다운로드 가능하다. 나는 [내가 생각하는 Eclipse용 플러그인 모음http://www.raibledesigns.com/page/rd/?anchor=eclipse_plugins_updated_for_31]이나 [MyEclipse|http://www.myeclipseide.com]를 구매하길 추천한다. 내가 바라는 것은 MyEclipse/AppFuse프로젝트 생성을 사용하는 것이다. 하지만 이것은 AppFuse의 디렉토리 구조와 빌드 파일의 전체를 다시 쓰는것을 요구하고 나는 그런 시간이나 힘이 없다. 그 외에도, 당신이 Ant를 사용하는 것을 꺼리지 않는다면 시스템은 잘 작동할것이다.
At line 7 changed 7 lines.
!Table of Contents
* [1] Create New Java Project in Eclipse
* [2] Configuring Ant in Eclipse
* [3] Add build.xml to Ant View
* [4] Run Ant
* [5] Run JUnit Tests in Eclipse
* [6] Tips for Debugging and UI Editing
!목차
* [1] Eclipse내 새로운 프로젝트 생성하기
* [2] Eclipse내 Ant설정하기
* [3] Ant View에 build.xml추가하기
* [4] Ant 실행하기
* [5] Eclipse내 JUnit테스트 실행하기
* [6] 디버깅과 UI편집을 위한 팁
At line 15 changed 2 lines.
!!Create New Java Project in Eclipse [#1]
Open Eclipse (either with an existing or a new workspace) and to go File → New → Project. Then select "Java Project" and hit the Next button. In the Project Name field, enter the name of your project (i.e. appfuse) and the directory that your project lives (i.e. c:\source\appfuse) in the box below. If you're prompted to switch the Java Perspective, choose Yes.
!!Eclipse내 새로운 프로젝트 생성하기 [#1]
Eclipse를 열고 File → New → Project로 이동하라. "Java Project"를 선택하고 Next버튼을 누른다. Project Name 필드에 프로젝트 이름(이를테면, appfuse)을 기입하고 그 밑에 프로젝트가 생성될 디렉토리(이를테면, c:\source\appfuse)를 선택한다. 당신이 Java Perspective로 전환된다는 창을 본다면, Yes를 선택한다.
At line 18 changed 1 line.
If you try to build the project at this point, you'll likely get numerous errors. Most of them involve the fact that the {{UserForm}} class can not be found. This is because all of the ActionForms in AppFuse (if you're using the Struts version) are generated from POJOs with XDoclet.
당신이 만약 이 시점에 프로젝트 빌드를 시도한다면, 당신은 수많은 에러를 보게 될것이다. 대부분은 {{UserForm}}클래그가 없다는 사실을 포함한다. 이것은 AppFuse내 대부분의 ActionForms가 XDoclet를 가진 POJO로부터 생성되기 때문이다.
At line 20 changed 1 line.
All of the tasks for XDoclet are configured in the Ant build.xml file so the easiest thing to do is to run "ant gen-forms" to generate the ActionForms. If you have Ant 1.6.2+ installed and in your path, you can do this from the command line. The next step shows you how configure Eclipse to run your AppFuse build.xml.
XDoclet를 위한 모든 작업은 Ant build.xml파일에 설정되고 이것을 수행하기 위한 가장 간단한 방법은 ActionForms를 생성하기 위한 "ant gen-forms"를 실행하는 것이다. 만약 당신이 Ant 1.6.2+가 설치되어 있고 당신의 path경로에 추가되어있다면, 당신은 명령창으로부터 이것을 수행할수 있다. 다음 단계는 당신에게 AppFuse build.xml을 실행하기 위해 Eclipse를 설정하는 방법을 보여준다.
At line 22 changed 1 line.
%%note __TIP:__ Here's a way to <a href="http://raibledesigns.com/page/rd?anchor=eclipse_tips">hide the JARs</a> you see in Eclipse's Package Explorer.%%
%%note __팁:__ 당신이 Eclipse의 Package Explorer에서 볼 <a href="http://raibledesigns.com/page/rd?anchor=eclipse_tips">JAR를 숨기기</a>위한 방법이다.%%
At line 24 changed 1 line.
!!Configuring Ant in Eclipse [#2]
!!Eclipse내 Ant설정하기 [#2]
At line 26 changed 1 line.
The easiest way to configure Eclipse for AppFuse is to install Ant on your hard drive (i.e. c:\Tools\apache-ant-1.6.2) and then point Eclipse's ANT_HOME to this directory. To do this, go to Window &#8594; Preferences &#8594; Ant &#8594; Runtime. Then click the "Ant Home" button and select the installation folder on your hard drive.
AppFuse를 위해 Eclipse를 설정하는 가장 쉬운 방법은 당신의 하드 드라이브에 Ant를 설치(이를테면, c:\Tools\apache-ant-1.6.2)하고 Eclipse의 ANT_HOME를 그 디렉토리를 가리키도록 하는 것이다. 이것을 하기 위해, Window &#8594; Preferences &#8594; Ant &#8594; Runtime 로 이동하자. "Ant Home"버튼을 클릭하고 하드 드라이브의 설치 폴더를 선택하자.
At line 28 changed 1 line.
If you'd rather use Eclipse's built-in Ant, you'll need to add junit.jar to its classpath. To do this, go to Window &#8594; Preferences &#8594; Ant &#8594; Runtime. Then click the "Add JARs" button and select junit.jar from appfuse/lib/junit3.8.1/lib/junit.jar. Click OK until you arrive back at the workbench view.
만약 당신이 Eclipse의 내장된 Ant를 사용하고자 한다면, junit.jar를 classpath에 추가할 필요가 있을것이다. 이것을 하기 위해, Window &#8594; Preferences &#8594; Ant &#8594; Runtime 로 이동하자. "Add JARs"버튼을 클릭하고 appfuse/lib/junit3.8.1/lib/junit.jar로 부터 junit.jar파일을 선택하자. 당신의 workbench view로 돌아가기 전에 OK를 클릭하자.
At line 30 changed 1 line.
Next, add the __catalina-ant.jar__ (from $CATALINA_HOME/server/lib) to the ant classpath. Then in the property tab, add __tomcatTasks.properties__ (in lib/ant-contrib) file as a global properties file.
다음. ant classpath에 __catalina-ant.jar__ ($CATALINA_HOME/server/lib 로 부터)를 추가하자. 그리고 property탭에서 전역 프라퍼티 파일처럼 __tomcatTasks.properties__ (lib/ant-contrib 안에)를 추가하자.
At line 32 changed 1 line.
Below is a screenshot of what your Ant Runtime classpath should look like after the above modifications:
아래는 위 변경을 모두 한후에 당신의 Ant Runtime classpath가 어떻게 보이는지에 대한 스크린샷이다.
At line 36 changed 2 lines.
!!Add build.xml to Ant View [#3]
Now we need to add the build.xml to Eclipse's Ant View. To do this, go to Window &#8594; Show View &#8594; Ant. Then click on the first icon in this view (screenshot below) to add AppFuse's build file.
!!Ant View에 build.xml추가하기 [#3]
지금 우리는 Eclipse의 Ant View에 build.xml을 추가할 필요가 있다. 이것을 하기 위해, Window &#8594; Show View &#8594; Ant로 이동하자. AppFuse의 빌드 파일을 추가하기 위해 이 view의 첫번째 아이콘을 클릭한다.
At line 41 changed 2 lines.
!!Run Ant [#4]
After adding the build.xml, you should be able to expand it in the Ant View and execute any of the targets. I usually do "test-all" to verify all the tests pass in my initial project. For a list of targets I use most often, see [AppFuse Ant Targets|AppFuseAntTasks].
!!Ant 실행하기 [#4]
build.xml을 추가한 후에, 당신은 Ant View에서 이것을 확장하고 어떠한 target도 수행할수 있다. 나는 초기 프로젝트로 전달된 테스트를 모두 확인하기 위해 "test-all"을 수행한다. 내가 종종 사용하는 target의 목록을 보기 위해서, [AppFuse Ant Targets|AppFuseAntTasks_ko]를 보라.
At line 44 changed 1 line.
Now if you run the "compile" target and then refresh the project (right-click on project &#8594; Refresh) you shouldn't see any errors in the "Problems" pane. You should now be able to compile and create classes as you normally would. Sometimes when my imports aren't resolving correctly in Eclipse, I do have to run Project &#8594; Clean in Eclipse.
지금 당신이 "compile" target를 수행하고 프로젝트를 다시읽기(project &#8594; Refresh 를 클릭하여)를 한다면, 당신은 "Problems"탭에서 어떠한 에러도 보지 못할것이다. 당신은 지금 컴파일을 하고 클래스를 생성할 수 있을것이다. 때때로 나의 import가 Eclipse내에서 정확하게 해석되지 않는다면, 나는 Eclipse에서 Project &#8594; Clean를 실행한다.
At line 46 changed 1 line.
%%note __NOTE:__ If you're using the internal version of Ant, you may get an error message like the one below:
%%note __NOTE:__ 만약 Ant의 내부 버전을 사용한다면, 당신은 아래와 같은 에러메시지를 보게 될지도 모른다.
At line 53 changed 1 line.
This is because there are tasks that require Xerces to be in your Ant classpath [[<a href="http://wiki.apache.org/jakarta-cactus/FrequentlyAskedQuestions">reference</a>]. I added xercesImpl.jar and xml-apis.jar (from my self-installed version of Ant) to Eclipse's Ant classpath to solve this.
이것은 Xerces가 당신의 Ant classpath내 없기 때문에 발생한다[[<a href="http://wiki.apache.org/jakarta-cactus/FrequentlyAskedQuestions">reference</a>]. 나는 이것을 해결하기 위해 Eclipse의 Ant classpath에 xercesImpl.jar 와 xml-apis.jar를 추가했다.
At line 55 changed 1 line.
At this point, you should see something similar to the screenshot below.
이 시점에, 당신은 아래의 스크린샷과 유사한 것을 봐야만 한다.
At line 59 changed 2 lines.
!!Run JUnit Tests in Eclipse [#5]
It's also possible to run your JUnit tests in Eclipse. But before running them, you need to run the "war" target. After this target completes, refresh your project.
!!Eclipse내에서 JUnit 테스트 실행하기 [#5]
Eclipse에서 JUnit테스트를 실행하는 것도 가능하다. 하지만 수행하기 전에, 당신은 "war" target를 수행할 필요가 있다. 이 target가 수행된후, 당신의 프로젝트를 refresh하라. 당신이 위 작업을 성공적으로 수행한후에, Eclipse에서 당신이 수행하고 싶은 테스트(이를테면, UserDaoTest)를 열고 Run &rarr; Debug As &rarr; JUnit Test를 수행하라. 당신은 모든 테스트를 수행하기 전에 "db-load" target를 수행해야 할지도 모른다. 나는 각각의 레이어를 위해 Base*TestCase클래스내 다음의 메소드를 추가했지만, Test클래스내 모든 테스트를 수행하기전에 데이터베이스를 리로드하기 위해 DBUnit을 발생시켰다. 이것은 "test-all"의 수행시간을 감소시키기 위해 이것을 삭제한다.
At line 62 removed 2 lines.
After you have successfully done so, in Eclipse open a test you'd like to run (i.e. UserDaoTest) and go to Run &rarr; Debug As &rarr; JUnit Test. Note that you may have to run the "db-load" target before you run your tests every so often. I did have the following method in the Base*TestCase class for each layer, but this caused DBUnit to reload the database before every test in a Test class. Removing it reduces the execution time of "test-all" by more than 30 seconds.
At line 77 changed 1 line.
If the instructions above don't work for running JUnit tests in Eclipse, I suggest just using the command line - i.e. __ant test-dao -Dtestcase=UserDAO__. Running tests from the command line ''always'' works. ;-)
만약 위 사항이 Eclipse에서 JUnit테스트를 수행하기 위해 작동하지 않는다면, 나는 명령창을 사용(예를 들면, __ant test-dao -Dtestcase=UserDAO__)하길 제안한다. 명령창에서의 테스트 수행은 "언제나" 작동한다. ;-)
At line 79 changed 2 lines.
!!Tips for Debugging and UI Editing [#6]
For debugging, I use the [Tomcat Plugin|http://www.sysdeo.com/eclipse/tomcatPlugin.html] in Eclipse and set breakpoints. To make the breakpoints work you will need to indicate your source-path using the Eclipse menu {{Window->Preferences}}, select {{Tomcat}}, then {{Source Path}}.
!!디버깅과 UI편집을 위한 팁 [#6]
디버깅을 위해, 나는 Eclipse에서 [Tomcat Plugin|http://www.sysdeo.com/eclipse/tomcatPlugin.html]을 사용하고 breakpoint를 셋팅한다. breakpoint를 만들기 위해 당신은 Eclipse메뉴인 {{Window->Preferences}}를 사용하고 {{Tomcat}}를 선택한뒤, {{Source Path}}를 선택하여 당신의 소스경로를 표시할 필요가 있을것이다.
At line 82 changed 3 lines.
For little changes, I use "ant deploy-web" which only takes a couple of seconds. For truly minor tweaks, it's sometimes easier to edit the file in Tomcat's webapps folder. For major design changes, I usually run the app, view source on a page and save it to a "sandbox" folder in the same directory as my project. Then I do a find/replace and change all "/appfuse/" references to "../web/". This allows me to change CSS and JS files and just refresh the file in the sandbox.
최소한의 변경을 위해, 나는 단지 2초정도만 소요하는 "ant deploy-web"를 사용한다. 진짜로 미세한 변경을 위해서, 이것은 때때로 톰캣의 webapps폴더내 파일을 편집하는 것보다 쉽다. 가장 큰 디자인 변경을 위해서, 나는 언제나 애플리케이션을 실행하고, 페이지의 소스를 보며, 내 프로젝트와 같은 디렉토리내 "sandbox"폴더에 이것을 저장한다. 그리고나서 나는 검색/바꾸기를 수행하고 "/appfuse/"참조를 "../web/"로 변경한다. 이것은 나에게 CSS와 JS파일들을 변경하도록 허용하고 sandbox내 파일을 새로고침할수 있게 해준다.

Back to AppFuseEclipse_ko, or to the Page History.