0

I set up a Maven build for an Eclipse RAP project. The project contains java and groovy. The Maven build works without errors but resulting JARs contain both the compiled class files and the groovy source files for most of the classes.

I only expected the compiled class-files.

Not being a groovy programmer, I'm lost there. The groovy source-files do not turn up in the jars when using the warexport tool in eclipse.

For the project setup I used the instructions from here: http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven

Groovy and java files are located in src/main/java in every plugin project. We're not using groovy-scripts.

Thanks for any hints to solve the problem.

  • What is the problem? Please edit the question to make this more clear, e.g. by describing the expected result. – oberlies Mar 10 '14 at 12:00
  • I only expected class-files but i always get both groovy and class-files together. This is for example a typical output: Answer_Lifecycle.class Answer_Lifecycle.groovy Exam_Lifecycle.class Exam_Lifecycle.groovy etc – Markus Künstler Mar 10 '14 at 15:02

1 Answers1

0

Which maven plugin are you using to compile groovy? You can use

 <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <goals>
              <goal>addSources</goal>
              <goal>addTestSources</goal>
              <goal>generateStubs</goal>
              <goal>compile</goal>
              <goal>testGenerateStubs</goal>
              <goal>testCompile</goal>
              <goal>removeStubs</goal>
              <goal>removeTestStubs</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <!-- any version of Groovy \>= 1.8.2 should work here -->
      <version>2.3.0</version>
    </dependency>
  </dependencies>
</project>
maziar
  • 581
  • 3
  • 9