On Thu, Jun 30, 2011 at 12:45 AM, Sebastian Goldt <sd...@cam.ac.uk> wrote: [del] > My project in question contains both tests and main source code in java as > well as in groovy, so I have the four folders src/main/java, > src/main/groovy, src/test/java and src/test/groovy which are added to the > project with the Build Helper Maven Plugin (1.6). When I generate the > eclipse project files using eclipse:eclipse, the generated .classpath file > only contains the src/main/groovy folder and not the src/test/groovy folder. > > *Reproduction:* > The easiest way to reproduce the problem is by using a java/groovy project > quickstarter from codehaus: > > 1. Create a dummy groovy/java project by using typing: > > mvn archetype:generate -DarchetypeGroupId=org.codehaus.groovy > -DarchetypeArtifactId=groovy-eclipse-quickstart > -DarchetypeVersion=2.5.1-M3-SNAPSHOT -DgroupId=foo -DartifactId=bar > -Dversion=1 -DinteractiveMode=false -DarchetypeRepository= > https://nexus.codehaus.org/content/repositories/snapshots/
Created an IT for this case to see what happens > 2. Create Eclipse project files > > mvn eclipse:eclipse > > When inspecting the generated .classpath file, you will notice that the > src/test/groovy path is missing. > > Note that if you wanted to import the project into eclipse, you would have > to set up the eclipse plugin in your pom as to include *.groovy classes on > your build path and properly organise the files in packages; however, this > wouldn't change the actual problem in any way. m-e-p will run anything else bound to <lifecycles> <lifecycle> <id>default</id> <!-- START SNIPPET: eclipse-plugin-lifecycle --> <phases> <generate-sources/> <generate-resources/> <generate-test-sources/> <generate-test-resources/> </phases> <!-- END SNIPPET: eclipse-plugin-lifecycle --> </lifecycle> So it should run build-helper to attach the groovy directories. I can see in the debug logs [DEBUG] testOutput toRelativeAndFixSeparator D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\groovy , D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\groovy\target\test-classes [DEBUG] testOutput after toRelative : target/test-classes [DEBUG] Processing resource dir: D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\groovy\src\main\resources [DEBUG] Resource dir: D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\groovy\src\main\resources either missing or not a directory. [DEBUG] Processing resource dir: D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\groovy\src\test\resources [DEBUG] Resource dir: D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\groovy\src\test\resources either missing or not a directory. [INFO] Not writing settings - defaults suffice [DEBUG] Processing classpath for: source src/test/java: output=target/test-classes, include=[**/*.java], exclude=[], test=true, filtering=false; default output=target/classes [DEBUG] Processing classpath for: source src/main/java: output=null, include=[**/*.java], exclude=[], test=false, filtering=false; default output=target/classes [DEBUG] Processing classpath for: source src/main/groovy: output=null, include=[**/*.java], exclude=[], test=false, filtering=false; default output=target/classes [INFO] Wrote Eclipse project for "bar" to D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\groovy. So groovy is available in the src directory list. The generated .classpath <classpath> <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/> <classpathentry kind="src" path="src/main/java" including="**/*.java"/> <classpathentry kind="src" path="src/main/groovy" including="**/*.java"/> <classpathentry kind="output" path="target/classes"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="var" path="M2_REPO/org/codehaus/groovy/groovy-all/1.8.0/groovy-all-1.8.0.jar"/> <classpathentry kind="var" path="M2_REPO/junit/junit/4.8.2/junit-4.8.2.jar"/> </classpath> This is using the latest released m-eclipse-p of 2.8. Try running mvn -X eclipse:eclipse This will print out the debug statements. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org