From c3933eb9ff1504106340a742f761c55806da8f8c Mon Sep 17 00:00:00 2001
From: epugh target\classes
+ The dependencies defined in the POM need not to be jars strictly. They can + be projects in the eclipse workspace. If a dependency is an eclipse project + a property needs to be added to that dependency to indicate so. +
++ This indicates that the dependency is another project in the workspace. + Note that the name of the referenced project is the artifactId. +
+
+ The inverse also works. If you have included extra jars that shouldn't be
+ in the eclipse classpath then you can set eclipse.dependency=false
+
+ Frequently you will want to include for compiled jars the source .java files to help + with debugging. +
+
+ The plugin will check if the file specified is located in MAVEN_REPO/${groupId}/src/ directory
+ and ending in maven.eclipse.src.extension exists and will add it as a source attachment.
+ Using default values the dependency MAVEN_REPO/eclipse/jars/eclipse-ui-3.0.0.jar
+ will be mapped to MAVEN_REPO/eclipse/src/eclipse-ui-3.0.0.zip
+
+ While this implementation isn't the perfect solution, for example no downloading of + source .zip files, it is a minimal solution that will work now. Future versions + of Maven will have more sophisticated solutions for dealing with source code. There is + no guarantee that this implementation will remain in later versions of Maven and this + plugin. +
++ When Eclipse is not generating source code for you there is a conflict between + Maven generating the source code and then Eclipse treating it as compiled code. + Typically when generating code using Maven the code ends up in the target/classes + directory. This is fine as long as Maven is doing the build. However, if Eclipse + is then setup to do the build, when Eclipse performs a clean build all the generated + code in target/classes will be removed. +
++ The alternatives typically are to place the generated code in the /src/java directory + and allow Maven and Eclipse to treat it the same. However, this leads to a tendency + to check generated code into source control, which typically is not appropriate for + generated code. Alternatively, it can be placed in some sort of /src/generated or + target/generated directory. In Maven2, generated code lives in target/generated-sources, + in a manner similiar to generated xdoc's live in target/generated-xdocs. Within the + target/generated-sources would be each type of generated code. +
+
+ For example, if you used the XDoclet Plugin for Maven to generate Hibernate mapping files,
+ they would be placed in /target/generated-sources/xdoclet/. While, if you used the
+ Hibernate Plugin for Maven to generate the SQL scripts for generating a database then that
+ would be placed in /target/generated-sources/schema/.
+
+ Settings in project.properties:
+
zip)
Note that you will need to defined a MAVEN_REPO Java
@@ -117,61 +124,6 @@
MAVEN_REPO that points to your local Maven repository.
- The dependencies defined in the POM need not to be jars strictly. They can - be projects in the eclipse workspace. If a dependency is an eclipse project - a property needs to be added to that dependency to indicate so. -
-- This indicates that the dependency is another project in the workspace. - Note that the name of the referenced project is the artifactId. -
-
- The inverse also works. If you have included extra jars that shouldn't be
- in the eclipse classpath then you can set eclipse.dependency=false
-
- When Eclipse is not generating source code for you there is a conflict between - Maven generating the source code and then Eclipse treating it as compiled code. - Typically when generating code using Maven the code ends up in the target/classes - directory. This is fine as long as Maven is doing the build. However, if Eclipse - is then setup to do the build, when Eclipse performs a clean build all the generated - code in target/classes will be removed. -
-- The alternatives typically are to place the generated code in the /src/java directory - and allow Maven and Eclipse to treat it the same. However, this leads to a tendency - to check generated code into source control, which typically is not appropriate for - generated code. Alternatively, it can be placed in some sort of /src/generated or - target/generated directory. In Maven2, generated code lives in target/generated-sources, - in a manner similiar to generated xdoc's live in target/generated-xdocs. Within the - target/generated-sources would be each type of generated code. -
-
- For example, if you used the XDoclet Plugin for Maven to generate Hibernate mapping files,
- they would be placed in /target/generated-sources/xdoclet/. While, if you used the
- Hibernate Plugin for Maven to generate the SQL scripts for generating a database then that
- would be placed in /target/generated-sources/schema/.
-
- Settings in project.properties:
-