You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2013/05/14 13:00:43 UTC

Re: svn commit: r1482203 - /commons/proper/compress/trunk/pom.xml

On 14 May 2013 06:01,  <da...@apache.org> wrote:
> Author: damjan
> Date: Tue May 14 05:01:35 2013
> New Revision: 1482203
>
> URL: http://svn.apache.org/r1482203
> Log:
> Verify conformance to the Java 1.5 API using the animal-sniffer plugin.

-1

Does not appear to work properly on Maven 2.2.1. or Maven 3.0.4.
Although it generates an error when there is an invalid reference, the
error is in the plugin, and does not identify the source.
For example:

[INFO] Checking unresolved references to org.codehaus.mojo.signature:java15:1.0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:49.531s
[INFO] Finished at: Tue May 14 11:48:50 BST 2013
[INFO] Final Memory: 13M/47M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.codehaus.mojo:animal-sniffer-maven-plugin:1.9:check
(check-java-api) on project commons-compress: Execution check-java-api
of
 goal org.codehaus.mojo:animal-sniffer-maven-plugin:1.9:check failed:
An API incompatibility was encountered while executing
org.codehaus.mojo:animal-sniffer-ma
ven-plugin:1.9:check: java.lang.NoSuchMethodError:
java.nio.CharBuffer.subSequence(II)Ljava/nio/CharBuffer;
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:animal-sniffer-maven-plugin:1.9
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] =
file:/D:/repository/org/codehaus/mojo/animal-sniffer-maven-plugin/1.9/animal-sniffer-maven-plugin-1.9.jar
[ERROR] urls[1] =
file:/D:/repository/org/codehaus/mojo/animal-sniffer/1.9/animal-sniffer-1.9.jar
[ERROR] urls[2] = file:/D:/repository/org/ow2/asm/asm-all/4.0/asm-all-4.0.jar
[ERROR] urls[3] =
file:/D:/repository/org/codehaus/mojo/java-boot-classpath-detector/1.9/java-boot-classpath-detector-1.9.jar
[ERROR] urls[4] =
file:/D:/repository/org/apache/maven/reporting/maven-reporting-api/2.0.1/maven-reporting-api-2.0.1.jar
[ERROR] urls[5] =
file:/D:/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-6/doxia-sink-api-1.0-alpha-6.jar
[ERROR] urls[6] =
file:/D:/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[7] =
file:/D:/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[8] =
file:/D:/repository/org/apache/maven/shared/maven-common-artifact-filters/1.2/maven-common-artifact-filters-1.2.jar
[ERROR] urls[9] =
file:/D:/repository/org/apache/maven/shared/maven-plugin-testing-harness/1.1/maven-plugin-testing-harness-1.1.jar
[ERROR] urls[10] =
file:/D:/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
[ERROR] urls[11] =
file:/D:/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]

The above error was caused by using new IOException(String, Throwable).

Also, the check does not work for "mvn compile", nor does it run if a
test fails.

And of course the check adds extra time to every build, even those run
using Java 1.5.0

What I do is I ensure that Eclipse is set up to use the appropriate JVM.
This catches errors at edit time.

> Add myself as a developer.
>
>
> Modified:
>     commons/proper/compress/trunk/pom.xml
>
> Modified: commons/proper/compress/trunk/pom.xml
> URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/pom.xml?rev=1482203&r1=1482202&r2=1482203&view=diff
> ==============================================================================
> --- commons/proper/compress/trunk/pom.xml (original)
> +++ commons/proper/compress/trunk/pom.xml Tue May 14 05:01:35 2013
> @@ -90,6 +90,11 @@ These include: bzip2, gzip, pack200, xz
>        <id>julius</id>
>        <email>julius at apache.org</email>
>      </developer>
> +    <developer>
> +      <name>Damjan Jovanovic</name>
> +      <id>damjan</id>
> +      <email>damjan at apache.org</email>
> +    </developer>
>    </developers>
>
>    <contributors>
> @@ -157,6 +162,27 @@ These include: bzip2, gzip, pack200, xz
>            </instructions>
>          </configuration>
>        </plugin>
> +      <plugin>
> +        <groupId>org.codehaus.mojo</groupId>
> +        <artifactId>animal-sniffer-maven-plugin</artifactId>
> +        <version>1.9</version>
> +        <configuration>
> +          <signature>
> +            <groupId>org.codehaus.mojo.signature</groupId>
> +            <artifactId>java15</artifactId>
> +            <version>1.0</version>
> +          </signature>
> +        </configuration>
> +        <executions>
> +          <execution>
> +            <id>check-java-api</id>
> +            <phase>test</phase>
> +            <goals>
> +              <goal>check</goal>
> +            </goals>
> +          </execution>
> +        </executions>
> +      </plugin>
>      </plugins>
>    </build>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1482203 - /commons/proper/compress/trunk/pom.xml

Posted by sebb <se...@gmail.com>.
On 14 May 2013 18:35, Damjan Jovanovic <da...@gmail.com> wrote:
> On Tue, May 14, 2013 at 1:00 PM, sebb <se...@gmail.com> wrote:
>> On 14 May 2013 06:01,  <da...@apache.org> wrote:
>>> Author: damjan
>>> Date: Tue May 14 05:01:35 2013
>>> New Revision: 1482203
>>>
>>> URL: http://svn.apache.org/r1482203
>>> Log:
>>> Verify conformance to the Java 1.5 API using the animal-sniffer plugin.
>>
>> -1
>>
>> Does not appear to work properly on Maven 2.2.1. or Maven 3.0.4.
>> Although it generates an error when there is an invalid reference, the
>> error is in the plugin, and does not identify the source.
>> For example:
>>
>> [INFO] Checking unresolved references to org.codehaus.mojo.signature:java15:1.0
>> [INFO] ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Total time: 1:49.531s
>> [INFO] Finished at: Tue May 14 11:48:50 BST 2013
>> [INFO] Final Memory: 13M/47M
>> [INFO] ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> org.codehaus.mojo:animal-sniffer-maven-plugin:1.9:check
>> (check-java-api) on project commons-compress: Execution check-java-api
>> of
>>  goal org.codehaus.mojo:animal-sniffer-maven-plugin:1.9:check failed:
>> An API incompatibility was encountered while executing
>> org.codehaus.mojo:animal-sniffer-ma
>> ven-plugin:1.9:check: java.lang.NoSuchMethodError:
>> java.nio.CharBuffer.subSequence(II)Ljava/nio/CharBuffer;
>> [ERROR] -----------------------------------------------------
>> [ERROR] realm =    plugin>org.codehaus.mojo:animal-sniffer-maven-plugin:1.9
>> [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
>> [ERROR] urls[0] =
>> file:/D:/repository/org/codehaus/mojo/animal-sniffer-maven-plugin/1.9/animal-sniffer-maven-plugin-1.9.jar
>> [ERROR] urls[1] =
>> file:/D:/repository/org/codehaus/mojo/animal-sniffer/1.9/animal-sniffer-1.9.jar
>> [ERROR] urls[2] = file:/D:/repository/org/ow2/asm/asm-all/4.0/asm-all-4.0.jar
>> [ERROR] urls[3] =
>> file:/D:/repository/org/codehaus/mojo/java-boot-classpath-detector/1.9/java-boot-classpath-detector-1.9.jar
>> [ERROR] urls[4] =
>> file:/D:/repository/org/apache/maven/reporting/maven-reporting-api/2.0.1/maven-reporting-api-2.0.1.jar
>> [ERROR] urls[5] =
>> file:/D:/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-6/doxia-sink-api-1.0-alpha-6.jar
>> [ERROR] urls[6] =
>> file:/D:/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
>> [ERROR] urls[7] =
>> file:/D:/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
>> [ERROR] urls[8] =
>> file:/D:/repository/org/apache/maven/shared/maven-common-artifact-filters/1.2/maven-common-artifact-filters-1.2.jar
>> [ERROR] urls[9] =
>> file:/D:/repository/org/apache/maven/shared/maven-plugin-testing-harness/1.1/maven-plugin-testing-harness-1.1.jar
>> [ERROR] urls[10] =
>> file:/D:/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
>> [ERROR] urls[11] =
>> file:/D:/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
>> [ERROR] Number of foreign imports: 1
>> [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
>> [ERROR]
>>
>> The above error was caused by using new IOException(String, Throwable).
>>
>> Also, the check does not work for "mvn compile", nor does it run if a
>> test fails.
>>
>> And of course the check adds extra time to every build, even those run
>> using Java 1.5.0
>>
>> What I do is I ensure that Eclipse is set up to use the appropriate JVM.
>> This catches errors at edit time.
>>
>
> Ok I've removed animal-sniffer for now, but believe that the wrong
> output bug and poor performance should rather be fixed in the plugin.

Thanks.

Also need to fix that it does not work on the compile/testCompile phases.

I suppose it might be worth considering as an optional profile in CP.
This would help developers who don't have the correct version of Java
installed, without penalising those who do.

> Regards
> Damjan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1482203 - /commons/proper/compress/trunk/pom.xml

Posted by Damjan Jovanovic <da...@gmail.com>.
On Tue, May 14, 2013 at 1:00 PM, sebb <se...@gmail.com> wrote:
> On 14 May 2013 06:01,  <da...@apache.org> wrote:
>> Author: damjan
>> Date: Tue May 14 05:01:35 2013
>> New Revision: 1482203
>>
>> URL: http://svn.apache.org/r1482203
>> Log:
>> Verify conformance to the Java 1.5 API using the animal-sniffer plugin.
>
> -1
>
> Does not appear to work properly on Maven 2.2.1. or Maven 3.0.4.
> Although it generates an error when there is an invalid reference, the
> error is in the plugin, and does not identify the source.
> For example:
>
> [INFO] Checking unresolved references to org.codehaus.mojo.signature:java15:1.0
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1:49.531s
> [INFO] Finished at: Tue May 14 11:48:50 BST 2013
> [INFO] Final Memory: 13M/47M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.codehaus.mojo:animal-sniffer-maven-plugin:1.9:check
> (check-java-api) on project commons-compress: Execution check-java-api
> of
>  goal org.codehaus.mojo:animal-sniffer-maven-plugin:1.9:check failed:
> An API incompatibility was encountered while executing
> org.codehaus.mojo:animal-sniffer-ma
> ven-plugin:1.9:check: java.lang.NoSuchMethodError:
> java.nio.CharBuffer.subSequence(II)Ljava/nio/CharBuffer;
> [ERROR] -----------------------------------------------------
> [ERROR] realm =    plugin>org.codehaus.mojo:animal-sniffer-maven-plugin:1.9
> [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
> [ERROR] urls[0] =
> file:/D:/repository/org/codehaus/mojo/animal-sniffer-maven-plugin/1.9/animal-sniffer-maven-plugin-1.9.jar
> [ERROR] urls[1] =
> file:/D:/repository/org/codehaus/mojo/animal-sniffer/1.9/animal-sniffer-1.9.jar
> [ERROR] urls[2] = file:/D:/repository/org/ow2/asm/asm-all/4.0/asm-all-4.0.jar
> [ERROR] urls[3] =
> file:/D:/repository/org/codehaus/mojo/java-boot-classpath-detector/1.9/java-boot-classpath-detector-1.9.jar
> [ERROR] urls[4] =
> file:/D:/repository/org/apache/maven/reporting/maven-reporting-api/2.0.1/maven-reporting-api-2.0.1.jar
> [ERROR] urls[5] =
> file:/D:/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-6/doxia-sink-api-1.0-alpha-6.jar
> [ERROR] urls[6] =
> file:/D:/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
> [ERROR] urls[7] =
> file:/D:/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
> [ERROR] urls[8] =
> file:/D:/repository/org/apache/maven/shared/maven-common-artifact-filters/1.2/maven-common-artifact-filters-1.2.jar
> [ERROR] urls[9] =
> file:/D:/repository/org/apache/maven/shared/maven-plugin-testing-harness/1.1/maven-plugin-testing-harness-1.1.jar
> [ERROR] urls[10] =
> file:/D:/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
> [ERROR] urls[11] =
> file:/D:/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
> [ERROR] Number of foreign imports: 1
> [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
> [ERROR]
>
> The above error was caused by using new IOException(String, Throwable).
>
> Also, the check does not work for "mvn compile", nor does it run if a
> test fails.
>
> And of course the check adds extra time to every build, even those run
> using Java 1.5.0
>
> What I do is I ensure that Eclipse is set up to use the appropriate JVM.
> This catches errors at edit time.
>

Ok I've removed animal-sniffer for now, but believe that the wrong
output bug and poor performance should rather be fixed in the plugin.

Regards
Damjan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org