Fix needed in doc for the Groovy-Eclipse compiler plugin for Maven

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fix needed in doc for the Groovy-Eclipse compiler plugin for Maven

Christophe Furmaniak
Hi,

I ran recently into the same issue as described in this thread

http://groovy.329449.n5.nabble.com/groovy-maven-td4382545.html

... because the sample project on svn has not been updated.

The pom of the sample project (https://svn.codehaus.org/groovy/eclipse/trunk/extras/groovy-eclipse-maven-tests/pom.xml)

specifies that the configuration to add src/main/groovy and src/test/groovy is

			
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/main/groovy</source>
								<source>src/test/groovy</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

which does not work well (see the related thread) and has to be the one specified on the wiki (with 2 separates execution for main and test classes).

Second point, the sample config for integration with eclipse lacks the artifactId

 <!-- Optional, include this piece for integration with Eclipse -->
  <plugin>
    <artifactId></artifactId>
    <configuration>
      <additionalProjectnatures>
        <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
      </additionalProjectnatures>
    </configuration>
  </plugin>
Maybe the documentation would need a little update :)

Regards

Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Fix needed in doc for the Groovy-Eclipse compiler plugin for Maven

Andrew Eisenberg
I updated the docs page here:
http://docs.codehaus.org/display/GROOVY/Groovy-Eclipse+compiler+plugin+for+Maven

I also updated the sample project to be compatible with m2eclipse
v1.0.  This means that you will need to use the recently released
m2eclipse configurator for Groovy-Eclipse available from the snapshot
update site.

Please let me know if you see any other problems with the diocumentation.

On Fri, Sep 2, 2011 at 4:30 AM, Christophe Furmaniak
<[hidden email]> wrote:

> Hi,
>
> I ran recently into the same issue as described in this thread
>
> http://groovy.329449.n5.nabble.com/groovy-maven-td4382545.html
>
> ... because the sample project on svn has not been updated.
>
> The pom of the sample project
> (https://svn.codehaus.org/groovy/eclipse/trunk/extras/groovy-eclipse-maven-tests/pom.xml)
>
> specifies that the configuration to add src/main/groovy and src/test/groovy
> is
>
>
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>build-helper-maven-plugin</artifactId>
> <version>1.5</version>
> <executions>
> <execution>
> <id>add-source</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>add-source</goal>
> </goals>
> <configuration>
> <sources>
> <source>src/main/groovy</source>
> <source>src/test/groovy</source>
> </sources>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> which does not work well (see the related thread) and has to be the one
> specified on the wiki (with 2 separates execution for main and test
> classes).
>
> Second point, the sample config for integration with eclipse lacks the
> artifactId
>
>  <!-- Optional, include this piece for integration with Eclipse -->
>   <plugin>
>     <artifactId></artifactId>
>     <configuration>
>       <additionalProjectnatures>
>
> <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
>       </additionalProjectnatures>
>     </configuration>
>   </plugin>
>
> Maybe the documentation would need a little update :)
>
> Regards
>
> Christophe
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Fix needed in doc for the Groovy-Eclipse compiler plugin for Maven

Christophe Furmaniak
It seems to me that the sample project still has a bad config around the build-helper-maven-plugin part (single execution step for main and test files although the wiki describes a 2 execution steps config).
The error may not show up in this sample project because the test class extends GroovyTestCase, but if you add a test class that needs junit annotations (using Junit 4), compilation should fail.


Regarding, the wiki, the M2Eclipse integration part may need a change as it says "If you want to use groovy-eclipse-compiler projects in maven, then you should use the maven-eclipse-plugin as described above." but the sample code using the maven-eclipse-plugin has been removed as you promote the Groovy-Eclipse configurator for M2Eclipse.


Christophe

2011/9/2 Andrew Eisenberg <[hidden email]>
I updated the docs page here:
http://docs.codehaus.org/display/GROOVY/Groovy-Eclipse+compiler+plugin+for+Maven

I also updated the sample project to be compatible with m2eclipse
v1.0.  This means that you will need to use the recently released
m2eclipse configurator for Groovy-Eclipse available from the snapshot
update site.

Please let me know if you see any other problems with the diocumentation.

On Fri, Sep 2, 2011 at 4:30 AM, Christophe Furmaniak
<[hidden email]> wrote:
> Hi,
>
> I ran recently into the same issue as described in this thread
>
> http://groovy.329449.n5.nabble.com/groovy-maven-td4382545.html
>
> ... because the sample project on svn has not been updated.
>
> The pom of the sample project
> (https://svn.codehaus.org/groovy/eclipse/trunk/extras/groovy-eclipse-maven-tests/pom.xml)
>
> specifies that the configuration to add src/main/groovy and src/test/groovy
> is
>
>
>
>                       <plugin>
>                               <groupId>org.codehaus.mojo</groupId>
>                               <artifactId>build-helper-maven-plugin</artifactId>
>                               <version>1.5</version>
>                               <executions>
>                                       <execution>
>                                               <id>add-source</id>
>                                               <phase>generate-sources</phase>
>                                               <goals>
>                                                       <goal>add-source</goal>
>                                               </goals>
>                                               <configuration>
>                                                       <sources>
>                                                               <source>src/main/groovy</source>
>                                                               <source>src/test/groovy</source>
>                                                       </sources>
>                                               </configuration>
>                                       </execution>
>                               </executions>
>                       </plugin>
>
> which does not work well (see the related thread) and has to be the one
> specified on the wiki (with 2 separates execution for main and test
> classes).
>
> Second point, the sample config for integration with eclipse lacks the
> artifactId
>
>  <!-- Optional, include this piece for integration with Eclipse -->
>   <plugin>
>     <artifactId></artifactId>
>     <configuration>
>       <additionalProjectnatures>
>
> <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
>       </additionalProjectnatures>
>     </configuration>
>   </plugin>
>
> Maybe the documentation would need a little update :)
>
> Regards
>
> Christophe
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email