|
2 | 2 | Download
|
3 | 3 | --------
|
4 | 4 |
|
5 |
| -Download |
| 5 | +Prerequisites |
6 | 6 |
|
7 | 7 | * Java 6 or later
|
8 | 8 |
|
9 |
| - [] |
| 9 | + * {{{http://maven.apache.org}Maven}} 2.0.9 or later |
10 | 10 |
|
11 |
| - Optional: |
12 |
| - |
13 |
| - * {{{http://maven.apache.org}Maven}} 2.0.9 or later (for development) |
14 |
| - |
15 |
| - * A servlet container, such as {{{http://tomcat.apache.org}Tomcat}} (for deploying the web archive) |
16 | 11 |
|
17 | 12 | Downloads
|
18 | 13 |
|
@@ -77,25 +72,52 @@ IDE Setup
|
77 | 72 |
|
78 | 73 | * Netbeans 6 or later:
|
79 | 74 |
|
80 |
| - Install the Maven plugin (Tools -> Plugins -> Available Plugins), then open project. |
| 75 | + Install the Maven plugin (<Tools> - <Plugins> - <Available Plugins>), then open project (it will appear as a project directory). |
81 | 76 |
|
82 | 77 | * Eclipse
|
83 | 78 |
|
84 |
| - Eclipse support for Maven is still a bit rocky, so project descriptor files have been |
85 |
| - committed into the repository so that the project can immediately be opened with |
86 |
| - minimal additional configuration. |
| 79 | + Eclipse embedded support for Maven is still a bit rocky in our experience, so these are instructions |
| 80 | + for generating Eclipse project descriptor files using external Maven. |
| 81 | + |
| 82 | + Unpack the source package, cd into the <<<dddsample>>> directory (where the <<<pom.xml>>> file is located) and |
| 83 | + run the following command: |
| 84 | + |
| 85 | +------------------- |
| 86 | +mvn eclipse:eclipse |
| 87 | +------------------- |
| 88 | + |
| 89 | + This will download all external library dependencies and plugins, and will take about 5-10 minutes to complete |
| 90 | + depending on you network conditions. It will also generate the files <<<.project>>> and <<<.classpath>>>, |
| 91 | + which are Eclipse project descriptor files. When that process is done, you can open Eclipse and select |
| 92 | + <File - Import>, <General - Existing projects into workspace>: |
| 93 | + |
| 94 | +[images/eclipse1.png] |
| 95 | + |
| 96 | + As project root directory, select the unpacked <<<dddsample>>> directory: |
| 97 | + |
| 98 | +[images/eclipse2.png] |
| 99 | + |
| 100 | + Now the project is up and running, except that all library references are relative to the <<<M2_REPO>>> classpath variable, |
| 101 | + so you will see a large list of unresolved references: |
| 102 | + |
| 103 | +[images/eclipse3.png] |
87 | 104 |
|
88 |
| - The only thing you need to do is to is to define the classpath variable M2_REPO, |
89 |
| - which is: |
| 105 | + To define that variable, go to <Window - Preferences>, <Java - Build Path - Classpath variables>, <New>. |
| 106 | + Set the name to <<<M2_REPO>>> and use the Folder button to browse to the correct location, which is: |
90 | 107 |
|
91 |
| - * Windows: C:\Documents and Settings\<Your username>\.m2\repository |
| 108 | +*---------+------------------------------------------------------+ |
| 109 | +| Windows | C:\Documents and Settings\\<Username>\.m2\repository | |
| 110 | +*---------+------------------------------------------------------+ |
| 111 | +| Mac | /Users/<Username>/.m2/repository | |
| 112 | +*---------+------------------------------------------------------+ |
| 113 | +| Unix | /home/<Username>/.m2/repository | |
| 114 | +*---------+------------------------------------------------------+ |
92 | 115 |
|
93 |
| - * Mac: /Users/<Your username>\.m2\repository |
| 116 | +[images/eclipse4.png] |
94 | 117 |
|
95 |
| - * Unix: /home/<Your username>\.m2\repository |
| 118 | + You should be promted to do a full project rebuild. Select yes. Now the project should compile and you |
| 119 | + can right-click on the <<<src/test/java>>> folder and do a "Run as/JUnit Test". |
96 | 120 |
|
97 |
| - Go to Window -> Preferences, Java -> Build Path -> Classpath variables, New. |
98 |
| - Set the name to M2_REPO and use the Folder button to browse to the aforementioned location. |
99 | 121 |
|
100 | 122 | About Maven
|
101 | 123 |
|
|
0 commit comments