Using maven-osgi-compiler-plugin for building only one module

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Using maven-osgi-compiler-plugin for building only one module

treiboll
Hi,

I have product which consists of some plug-ins and their test fragments. Building and run the tests works fine if I start with the main pom. Certainly the main pom lists all modules in the modules section.  I am wondering why it is not possible to build/compile only one of the plug-ins or rather one fragement by calling "mvn clean compile" on the sub pom. I always get compile errors.

Using tycho 0.10.0

kind regards
Fabian
Reply | Threaded
Open this post in threaded view
|

Re: Using maven-osgi-compiler-plugin for building only one module

Igor Fedorenko-2
Assuming you ran "mvn clean install" on entire project at least once,
running "mvn clean compile" is expected to work for individual modules.
Please open a bug report in Tycho jira [1] and provide sample project
and steps to reproduce the problem

[1] https://issues.sonatype.org/browse/TYCHO

--
Regards,
Igor

On 11-03-17 12:45 PM, treiboll wrote:

> Hi,
>
> I have product which consists of some plug-ins and their test fragments.
> Building and run the tests works fine if I start with the main pom.
> Certainly the main pom lists all modules in the modules section.  I am
> wondering why it is not possible to build/compile only one of the plug-ins
> or rather one fragement by calling "mvn clean compile" on the sub pom. I
> always get compile errors.
>
> Using tycho 0.10.0
>
> kind regards
> Fabian
>
> --
> View this message in context: http://software.2206966.n2.nabble.com/Using-maven-osgi-compiler-plugin-for-building-only-one-module-tp6181695p6181695.html
> Sent from the Tycho Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Using maven-osgi-compiler-plugin for building only one module

treiboll
My problem is located in the dependency resoulution of maven tycho.

Example:
I have two plug-ins A and B. B depends on A but no version is configured in the MANIFEST for the dependency.
In the local maven repository there are versions "1.0.0" , "2.0.0" and "1.0.0-SNAPSHOT" of both plug-ins. If I am starting "mvn clean compile" only for plug-in B the classpath of the maven-osgi-compiler-plugin points always to version "2.0.0" of A. Whatever I configure in the MANIFEST of B it is always version "2.0.0". I think thats ok.
If I delete the version "2.0.0" of A in the maven repo, the maven-osgi-compiler-plugin uses the "1.0.0-SNAPSHOT" version. Thats why I am getting in my real project compile errors. My assumption is that "1.0.0" should be used because "1.0.0-SNAPSHOT" is less then "1.0.0".

I am not sure if it is a bug or if I configured someting wrong. So I haven't open a bug report up to now.

Fabian
Reply | Threaded
Open this post in threaded view
|

Re: Using maven-osgi-compiler-plugin for building only one module

Vlad Tatavu
IIRC, in osgi,  version "1.0.0-SNAPSHOT" is greater than "1.0.0"...

Vlad


On 3/21/2011 10:21 AM, treiboll wrote:

> My problem is located in the dependency resoulution of maven tycho.
>
> Example:
> I have two plug-ins A and B. B depends on A but no version is configured in
> the MANIFEST for the dependency.
> In the local maven repository there are versions "1.0.0" , "2.0.0" and
> "1.0.0-SNAPSHOT" of both plug-ins. If I am starting "mvn clean compile" only
> for plug-in B the classpath of the maven-osgi-compiler-plugin points always
> to version "2.0.0" of A. Whatever I configure in the MANIFEST of B it is
> always version "2.0.0". I think thats ok.
> If I delete the version "2.0.0" of A in the maven repo, the
> maven-osgi-compiler-plugin uses the "1.0.0-SNAPSHOT" version. Thats why I am
> getting in my real project compile errors. My assumption is that "1.0.0"
> should be used because "1.0.0-SNAPSHOT" is less then "1.0.0".
>
> I am not sure if it is a bug or if I configured someting wrong. So I haven't
> open a bug report up to now.
>
> Fabian
>
> --
> View this message in context: http://software.2206966.n2.nabble.com/Using-maven-osgi-compiler-plugin-for-building-only-one-module-tp6181695p6192412.html
> Sent from the Tycho Users mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Using maven-osgi-compiler-plugin for building only one module

treiboll
Ah ok. You are right. I thought in the versioning style of maven.

So, I am still have the problem why the maven-osgi-compiler-plugin seems to ignore the MANIFEST configuration for version ranges of dependencies...

Fabian

Reply | Threaded
Open this post in threaded view
|

Re: Using maven-osgi-compiler-plugin for building only one module

treiboll
I checked it. All fine. Sorry but it was my confusion about the different versioning of OSGI and Maven.