提交 bd256acd 编写于 作者: K Kohsuke Kawaguchi

Fixing a test failure in RelativePathTest

It turns out that Groovy compiler we use to compile src/test/groovy was
not properly generating the 'enclosing class' information inside
*.class, which was causing the load failure of the descriptors marked
by @TestExtension in test code.

To fix this and forestall other possible GMaven related issues, I
decided to bump up the GMaven version. As it turns out, Codehaus GMaven
had ceased the development of the 1.x branch, so I initially tried 2.x
release line.

The 2.x release line got rid of the stub generation functionality, which
we badly need for annotation processing. It instead recommend using
Eclipse compiler to jointly compile Java and Groovy source code
together, but when I tried to compile our tests, it failed to properly
handle nested classes. The compiler quality appears quite premature.

I was then going back to GMaven 1.5, the last 1.x release. I took this
opportunity to rebase my local patches in org.kohsuke.gmaven to the
latest release, which in my mind gets justified now that the upstream
has ceased the development.

My local patch to GMaven is captured in GMAVEN-3 and GMAVEN-4
(see http://jira.codehaus.org/browse/GMAVEN-3 and
http://jira.codehaus.org/browse/GMAVEN-4).

GMAVEN-4 is claimed to be fixed, but when I tried to compile our source
tree I discovered that its handling of nested types breaks the generated
stub code.

In the end, I managed to patch gmaven and posted 1.5-jenkins-1.

The bottom line is, we can now use @TestExtension correctly with Groovy
tests. Also on the upside, we can get rid of org.kohsuke.gmaven and
avoid the current confusion situation of using two GMaven plugins.

I'll make a follow-up change to remove org.kohsuke.gmaven from elsewhere
in our POM.
上级 eec271d7
......@@ -196,30 +196,16 @@ THE SOFTWARE.
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<!-- version specified in grandparent pom -->
<version>1.5-jenkins-1</version>
<executions>
<execution>
<id>test-in-groovy</id>
<id>default</id>
<!-- compile and process annotations in Groovy test code -->
<goals>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.kohsuke.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<id>preset-packager</id>
<phase>process-resources</phase>
......@@ -243,7 +229,16 @@ THE SOFTWARE.
<artifactId>ant-launcher</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-2.0</artifactId>
<version>1.5-jenkins-1</version>
</dependency>
</dependencies>
<configuration>
<providerSelection>2.0</providerSelection>
</configuration>
</plugin>
</plugins>
</build>
......@@ -263,9 +258,9 @@ THE SOFTWARE.
<build>
<plugins>
<plugin>
<groupId>org.kohsuke.gmaven</groupId>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<!-- version specified in grandparent pom -->
<version>1.5-jenkins-1</version>
<executions>
<!-- run unit test -->
<execution>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册