Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] tycho-compiler-plugin - working with outputjars doesn't compile to project.build.outputDirectory

Hi Jan,

I was thinking about the possibility of Tycho, compiling dotjar (main jar) in @dot-classes like PDEBuild does.

This is the line of the error in the console:

[ERROR] Failed to execute goal org.codehaus.sonar:sonar-maven3-plugin:3.0.1:sonar (default-cli) on project es.tycho.test.core: Execution default-cli of goal org.codehaus.sonar:sonar-maven3-plugin:3.0.1:sonar failed: Can not execute Findbugs: Findbugs needs sources to be compiled. Please build project before executing sonar and check the location of compiled classes. -> [Help 1]

Thanks for your quick reply.

On Fri, May 25, 2012 at 1:36 PM, Sievers, Jan <jan.sievers@xxxxxxx> wrote:
I think this is a fundamental limitation of the maven model:
it has only one output folder for classes per module.
PDE allows more and hence if you use more then we can't map those back to the maven model for intra-reactor dependencies.

Simply copying all classes to the output folder is not a valid solution because then all classes would end up merged in the main jar.

AFAICT this is one of the points where the maven and PDE build model simply can't be mapped 1:1.
As such it's a limitation for non-OSGi aware tools from the maven world such as sonar (tycho itself supports all the nested jar/dir cases).
For details see https://issues.sonatype.org/browse/TYCHO-483

If you can provide a sample project demonstrating the sonar issue, we may be able to suggest a workaround.

Regards,
Jan

From: tycho-dev-bounces@xxxxxxxxxxx [mailto:tycho-dev-bounces@xxxxxxxxxxx] On Behalf Of Juan Alonso
Sent: Freitag, 25. Mai 2012 13:20
To: Tycho developers list
Subject: [tycho-dev] tycho-compiler-plugin - working with outputjars doesn't compile to project.build.outputDirectory

Hi all,

We have some problems building a feature with bundles that contains outputjars in the build.properties file because tycho-compiler-plugin compiles to: jarName + "-classes".

Our problems came when trying to execute Sonar because sonar (and all others) is looking for the value of variable project.build.outputDirectory. I'm wondering if the problem is when we execute maven in two different steps. 
1. maven install 
2. maven sonar:sonar (in another jenkins/hudson job for example)
But, also with one step, if tycho sets the project.build.outputDirectory to the outputjar folder, What will be the variable value with multiple outputjars?

I attached a possible patch, that works for me. I'm working with tycho 0.14.x

Rgds, Juan.
_______________________________________________
tycho-dev mailing list
tycho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-dev

Attachment: es.tycho.test.core.zip
Description: Zip archive

Attachment: es.tycho.test.core (sonar).launch
Description: Binary data


Back to the top