Community
Participate
Working Groups
Build Identifier: I20110613-1736 After adding the Xtend libs to the classpath in Eclipse, .classpath looks like: <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/main/xtend-gen"/> <classpathentry kind="src" output="target/classes" path="src/main/java"/> <classpathentry kind="src" output="target/test-classes" path="src/test/java"/> <classpathentry kind="con" path="org.eclipse.xtend.XTEND_CONTAINER"/> <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> <classpathentry kind="output" path="target/classes"/> </classpath> But I use Xtend in a Maven project, and don't want to commit .classpath into the VCS, so I run maven eclipse:clean eclipse:eclipse. It generates the following .classpath: <classpath> <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/> <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/> <classpathentry kind="src" path="src/main/java" including="**/*.java"/> <classpathentry kind="src" path="src/main/xtend-gen" including="**/*.java"/> <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/> <classpathentry kind="output" path="target/classes"/> <classpathentry kind="var" path="M2_REPO/com/google/guava/guava/10.0.1/guava-10.0.1.jar" sourcepath="M2_REPO/com/google/guava/guava/10.0.1/guava-10.0.1-sources.jar"/> <classpathentry kind="var" path="M2_REPO/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar"/> <classpathentry kind="var" path="M2_REPO/org/eclipse/xtend2/org.eclipse.xtend2.lib/2.2.0/org.eclipse.xtend2.lib-2.2.0.jar" sourcepath="M2_REPO/org/eclipse/xtend2/org.eclipse.xtend2.lib/2.2.0/org.eclipse.xtend2.lib-2.2.0-sources.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> </classpath> After it, Xtend can't compile .xtend files. There are no errors, but the Java sources are not generated. Reproducible: Always
Can you also attach your .project file before and after mvn clean?
Created attachment 208612 [details] Original .project before mvn eclipse:clean eclipse:eclipse
Created attachment 208614 [details] Generated .project
Note that Eclipse automatically adds the missing Xtext builder entries when opening an .xtend file but this does not solve the incremental compilation.
pls configure your maven eclipse plugin to also include *.xtend files e.g. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.8</version> <configuration> <sourceIncludes> <sourceInclude>**/*.xtend</sourceInclude> </sourceIncludes> </configuration> </plugin> see http://maven.apache.org/plugins/maven-eclipse-plugin/examples/specifying-source-path-inclusions-and-exclusions.html please reopen if i missed something
Thank you, this solved the problem. Please include this part of the POM in the documentation!
Closing all bugs that were set to RESOLVED before Neon.0