score:0

seems like a versioning problem to me. are you sure you used all the right versions of the jars?

score:0

getting groovy-eclipse, gmaven, and eclipse all working together seems to be pretty tricky at the present. once you've got a project created with mvn archetype:generate, as awhitford mentions, this site will show you a few of the tweaks you'll need to make it work.

gmaven's stub creation for java files interferes with groovy-eclipse, hence the section on that page about commenting out stub creation. however, i went with the method mentioned in the comments for the relevant bug (gmaven-61) and created multiple executions for the gmaven plugin, like so:

  <build>
    <plugins>
      <plugin>
        <groupid>org.codehaus.groovy.maven</groupid>
        <artifactid>gmaven-plugin</artifactid>
        <version>1.0-rc-3</version>
        <!-- http://jira.codehaus.org/browse/gmaven-61 -->
        <executions>
          <execution>
            <id>default-cli</id>
            <goals>
              <goal>compile</goal>
              <goal>testcompile</goal>
            </goals>
          </execution>
          <execution>
            <id>stubsonly</id>
            <goals>
              <goal>generatestubs</goal>
              <goal>generateteststubs</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

i'm still not certain myself that this is clean for both pure maven usage as well as within eclipse, but it at least got me to the point where i stopped spending hours trying to get anything to work and got me coding on my actual project.

the groovy-eclipse and gmaven documentation are good reading for background info.

score:2

at a command prompt, enter this: mvn archetype:generate then, choose 40 (gmaven-archetype-basic) then, follow the prompts. once you have a maven project, you can enable eclipse support by saying: mvn eclipse:eclipse

you can read building groovy projects for more information.


Related Query

More Query from same tag