Discussion:
[sonar-user] sonar maven plugin - skip analysis if "sonar.java.binaries" is empty, e.g. for pom packaging artifacts
Torsten Krah
2014-12-02 13:08:10 UTC
Permalink
Hi,

got a multi module project and there are some childs which don't have
any binaries in classes directory (using plugin 4.5.1, sonarqube 4.5.1,
java-plugin-2.6).

Found:

http://sonarqube.15.x6.nabble.com/sonar-binaries-error-when-no-Java-sources-in-Java-plugin-2-6-with-a-Maven-project-td5030221.html

But i am actually using maven 3 already.

Seems to be the cause since:

http://jira.codehaus.org/browse/SONARJAVA-759

How can i tell the sonar plugin, to skip the goal or just ignore
analysis if sonar.java.binaries does not contain something "useful"
because its some war project, some pom or some artifact which just have
no own classes at target/classes?

regards

Torsten


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

http://xircles.codehaus.org/manage_email
Freddy Mallet
2014-12-08 20:53:58 UTC
Permalink
Hi Torsten,

I expect the Java plugin to fail only if the Maven module contains some
java source files but no target/classes directory ? Is it the case, could
you provide a sample Maven project to quickly reproduce this limitation
locally ?

Thanks

-----
twitter.com/FreddyMallet
SonarQube for Continuous Inspection
Post by Torsten Krah
Hi,
got a multi module project and there are some childs which don't have
any binaries in classes directory (using plugin 4.5.1, sonarqube 4.5.1,
java-plugin-2.6).
http://sonarqube.15.x6.nabble.com/sonar-binaries-error-when-no-Java-sources-in-Java-plugin-2-6-with-a-Maven-project-td5030221.html
But i am actually using maven 3 already.
http://jira.codehaus.org/browse/SONARJAVA-759
How can i tell the sonar plugin, to skip the goal or just ignore
analysis if sonar.java.binaries does not contain something "useful"
because its some war project, some pom or some artifact which just have
no own classes at target/classes?
regards
Torsten
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Andreas Höhmann
2014-12-09 00:25:42 UTC
Permalink
Hello,

I have the same problem.
Before 4.5.1 all was working fine.
I run sonar from the root of an reactor project including some pom-modules.
But now the sonar build fails because of missing binaries. Of course ...
pom modules doesn't have binaries ;)

Kind regards
Post by Freddy Mallet
Hi Torsten,
I expect the Java plugin to fail only if the Maven module contains some
java source files but no target/classes directory ? Is it the case, could
you provide a sample Maven project to quickly reproduce this limitation
locally ?
Thanks
-----
twitter.com/FreddyMallet
SonarQube for Continuous Inspection
Post by Torsten Krah
Hi,
got a multi module project and there are some childs which don't have
any binaries in classes directory (using plugin 4.5.1, sonarqube 4.5.1,
java-plugin-2.6).
http://sonarqube.15.x6.nabble.com/sonar-binaries-error-when-no-Java-sources-in-Java-plugin-2-6-with-a-Maven-project-td5030221.html
But i am actually using maven 3 already.
http://jira.codehaus.org/browse/SONARJAVA-759
How can i tell the sonar plugin, to skip the goal or just ignore
analysis if sonar.java.binaries does not contain something "useful"
because its some war project, some pom or some artifact which just have
no own classes at target/classes?
regards
Torsten
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Loading...