Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] tycho 2.1.0 failed to auto generate non OSGi module as Bundle we can depend on ?

Hi,

I'm giving a try to this new feature as described here : https://wiki.eclipse.org/Tycho/Release_Notes/2.1 under the section

Automatic generation of OSGi metadata for maven dependencies.

 

I payed attention to put in my root pom.xml to add my dependency on my non OSGI java module:

<dependencies>

        <dependency>

            <groupId>sam</groupId>

            <artifactId>sam-commons</artifactId>

            <version>3.0.0</version>

        </dependency>

    </dependencies>

 

I also configure thisplugin in <plugins></plugin> section

             <plugin>

                <groupId>org.eclipse.tycho</groupId>

                <artifactId>target-platform-configuration</artifactId>

                <version>${tycho-version}</version>

                <configuration>

                    <executionEnvironment>JavaSE-11</executionEnvironment>

                    <pomDependencies>consider</pomDependencies>

                </configuration>

            </plugin>

 

In my bundle sam.ui manifest I have this OSGi directive : Import-Package: sam.commons.http.ws;version="3.0.0"

 

 

When running mvn clean I got an error reporting:

ERROR] Cannot resolve project dependencies:

[ERROR]   Software being installed: sam.ui 11.0.0.qualifier

[ERROR]   Missing requirement: sam.ui 11.0.0.qualifier requires 'java.package; sam.commons.http.ws 3.0.0' but it could not be found

 

 

Indeed in the trace, it reports my java module is not a bundle and it is ignored:

[INFO] Maven Artifact sam:sam-commons:3.0.0 is not a bundle and will be ignored, automatic wrapping of such artifacts can be enabled with <pomDependencies>use</pomDependencies> in target platform configuration.

 

This error explains the previous one.

 

I tried to replace 'consider' value by 'use'. It is worse, it is reporting 'use' is not part of PomDependencies enum.

I had a look at this enum and tried 'wrapAsBundle' then it reports:

[WARNING] Maven Artifact sam:sam-commons:3.0.0 is not a bundle a will be automatically wrapped with bundle-symbolic name sam.sam-commons, ignoring such artifacts can be enabled with <pomDependencies>consider</pomDependencies> in target platform configuration.

 

 

Here we are 'consider' seems to be the good value but it does nothing I mean my simple java module is not wrapped as an OSGi bundle + its metadata generated.

 

Does aynone test it successfully ?


Stéphane


Back to the top