You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Pierre-Arnaud Marcelot <pa...@marcelot.net> on 2010/06/01 17:43:55 UTC

Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Hi Felix,

I'm currently reviewing the dependency tree of each project in Apache DS.

When generating the installers I've found a lot of new dependencies (since the last release) in the generated lib folder, and especially this one: findbugs:annotations.

Are you sure of the scope of this dependency?
Shouldn't it be defined as "provided" (this way it won't be passed on transitively)?

Thanks,
Pierre-Arnaud


On 23 mai 2010, at 15:46, felixk@apache.org wrote:

> Author: felixk
> Date: Sun May 23 13:46:14 2010
> New Revision: 947413
> 
> URL: http://svn.apache.org/viewvc?rev=947413&view=rev
> Log:
> False positive
> 
> Modified:
>    directory/shared/trunk/ldap/pom.xml
>    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
> 
> Modified: directory/shared/trunk/ldap/pom.xml
> URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/pom.xml?rev=947413&r1=947412&r2=947413&view=diff
> ==============================================================================
> --- directory/shared/trunk/ldap/pom.xml (original)
> +++ directory/shared/trunk/ldap/pom.xml Sun May 23 13:46:14 2010
> @@ -76,6 +76,13 @@
>       <artifactId>antlr</artifactId>
>       <version>${antlr.version}</version>
>     </dependency>
> +
> +    <dependency>
> +      <groupId>findbugs</groupId>
> +      <artifactId>annotations</artifactId>
> +      <version>${findbugs.annotations.version}</version>
> +      <scope>compile</scope>
> +    </dependency>
>   </dependencies>
> 
>   <build>
> 
> Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
> URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java?rev=947413&r1=947412&r2=947413&view=diff
> ==============================================================================
> --- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java (original)
> +++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java Sun May 23 13:46:14 2010
> @@ -1242,6 +1242,8 @@ public class LdapTransformer
>      * @param msg the message to transform
>      * @return the msg transformed
>      */
> +    @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NP_NULL_ON_SOME_PATH",
> +        justification="The number of Ldap Message we are dealing with is finite, and we won't ever have to deal with any other unexpected one")
>     public static Object transform( InternalMessage msg )
>     {
>         if ( IS_DEBUG )
> 
> 


Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi guys,

That's odd...

I will investigate that on my Ubuntu VM where I can run a 1.5 JVM because a 1.5 JVM is not shipped anymore in Mac OS X Snow Leopard... (grrrr...)

Regards,
Pierre-Arnaud

On 4 juin 2010, at 19:44, Stefan Seelmann wrote:

> Kiran Ayyagari wrote:
>> On Fri, Jun 4, 2010 at 7:54 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
>>> Hi Stefan,
>>> 
>>> Kiran had the same build problem.
>>> 
>>> Strangely, the problem disappeared when he removed his maven repository and tried again.
>>> 
>>> Kiran, can you confirm?
>> 
>> yeah the same problem went away when I tried building after removing
>> the local maven repo
> 
> I cleaned my local repo, but without success. I have no problem when
> using Java6. But with Java5 I get those errors:
> 
> [ERROR] Failure executing javac, but could not parse the error:
> An exception has occurred in the compiler (1.5.0_14). Please file a bug
> at the Java Developer Connection (http://java.sun.com/webapps/bugreport)
> after checking the Bug Parade for duplicates. Include your program and
> the following diagnostic in your report.  Thank you.
> com.sun.tools.javac.code.Symbol$CompletionFailure: file
> edu/umd/cs/findbugs/annotations/SuppressWarnings.class not found
> 
> 


Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Posted by Stefan Seelmann <se...@apache.org>.
Kiran Ayyagari wrote:
> On Fri, Jun 4, 2010 at 7:54 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
>> Hi Stefan,
>>
>> Kiran had the same build problem.
>>
>> Strangely, the problem disappeared when he removed his maven repository and tried again.
>>
>> Kiran, can you confirm?
> 
> yeah the same problem went away when I tried building after removing
> the local maven repo

I cleaned my local repo, but without success. I have no problem when
using Java6. But with Java5 I get those errors:

[ERROR] Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.5.0_14). Please file a bug
at the Java Developer Connection (http://java.sun.com/webapps/bugreport)
 after checking the Bug Parade for duplicates. Include your program and
the following diagnostic in your report.  Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: file
edu/umd/cs/findbugs/annotations/SuppressWarnings.class not found



Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Posted by Kiran Ayyagari <ka...@apache.org>.
On Fri, Jun 4, 2010 at 7:54 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
> Hi Stefan,
>
> Kiran had the same build problem.
>
> Strangely, the problem disappeared when he removed his maven repository and tried again.
>
> Kiran, can you confirm?

yeah the same problem went away when I tried building after removing
the local maven repo

Kiran Ayyagari

Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Stefan,

Kiran had the same build problem.

Strangely, the problem disappeared when he removed his maven repository and tried again.

Kiran, can you confirm?

Maybe we could ask artifacts under org/apache/directory to be removed on the Continuum machine.

Regards,
Pierre-Arnaud

On 4 juin 2010, at 18:48, Stefan Seelmann wrote:

> Felix Knecht wrote:
>> Hi Pierre-Arnaud
>> 
>>> I'm currently reviewing the dependency tree of each project in Apache DS.
>> 
>>> When generating the installers I've found a lot of new dependencies (since the last release) in the generated lib folder, and especially this one: findbugs:annotations.
>> 
>>> Are you sure of the scope of this dependency?
>> 
>> Thanks for heads up!
>> 
>> No. I thought it wouldn't be taken when having scope "compile".... It's
>> used to avoid false positives when generating the findbugs reports.
>> "provided" seems to be the better solution.
> 
> The problem with "provided" is now that the build fails with Java5 [1].
> 
> Seems like the dependent modules have problems when the annotation class
> is missing.
> 
> As a workaround I added the findbugs annotations dependency with scope
> "provided" to each the shared, apacheds, and ldap-api parent pom. Any
> other idea?
> 
> Kind Regards,
> Stefan
> 
> 
> [1]http://vmbuild.apache.org/continuum/buildResult.action?buildId=346851&projectGroupId=139&projectId=2675&projectName=ApacheDS+1.5+Build+With+Dependencies


Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Posted by Stefan Seelmann <se...@apache.org>.
Felix Knecht wrote:
> Hi Pierre-Arnaud
> 
>> I'm currently reviewing the dependency tree of each project in Apache DS.
> 
>> When generating the installers I've found a lot of new dependencies (since the last release) in the generated lib folder, and especially this one: findbugs:annotations.
> 
>> Are you sure of the scope of this dependency?
> 
> Thanks for heads up!
> 
> No. I thought it wouldn't be taken when having scope "compile".... It's
> used to avoid false positives when generating the findbugs reports.
> "provided" seems to be the better solution.

The problem with "provided" is now that the build fails with Java5 [1].

Seems like the dependent modules have problems when the annotation class
is missing.

As a workaround I added the findbugs annotations dependency with scope
"provided" to each the shared, apacheds, and ldap-api parent pom. Any
other idea?

Kind Regards,
Stefan


[1]http://vmbuild.apache.org/continuum/buildResult.action?buildId=346851&projectGroupId=139&projectId=2675&projectName=ApacheDS+1.5+Build+With+Dependencies

Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Felix,

On 1 juin 2010, at 18:41, Felix Knecht wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Pierre-Arnaud
> 
>> I'm currently reviewing the dependency tree of each project in Apache DS.
>> 
>> When generating the installers I've found a lot of new dependencies (since the last release) in the generated lib folder, and especially this one: findbugs:annotations.
>> 
>> Are you sure of the scope of this dependency?
> 
> Thanks for heads up!
> 
> No. I thought it wouldn't be taken when having scope "compile".... It's
> used to avoid false positives when generating the findbugs reports.
> "provided" seems to be the better solution.

I will try that and see the results.

> BTW
> The dependency:analyze goal [1] may be helpfull to find unnecessary
> dependencies (just call it from CL mvn dependency:analyze will do).

Interesting! I didn't know that one...
Thanks for the hint!

Regards,
Pierre-Arnaud

Re: svn commit: r947413 - in /directory/shared/trunk/ldap: pom.xml src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java

Posted by Felix Knecht <fe...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Pierre-Arnaud

> I'm currently reviewing the dependency tree of each project in Apache DS.
> 
> When generating the installers I've found a lot of new dependencies (since the last release) in the generated lib folder, and especially this one: findbugs:annotations.
> 
> Are you sure of the scope of this dependency?

Thanks for heads up!

No. I thought it wouldn't be taken when having scope "compile".... It's
used to avoid false positives when generating the findbugs reports.
"provided" seems to be the better solution.

BTW
The dependency:analyze goal [1] may be helpfull to find unnecessary
dependencies (just call it from CL mvn dependency:analyze will do).

Regards
Felix

[1]
http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwFOFQACgkQ2lZVCB08qHFXqQCg3q1nSjHA4buuRyL1VSTGLihh
tmoAnjuyOG5wOg4xadnQLtU4Uhnfawz1
=iTq9
-----END PGP SIGNATURE-----