You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2015/10/21 19:56:39 UTC

Reactor versus classifiers ...

I've hit a problem with Maven 3.2.5 and the karaf-maven-plugin.

One module builds a Karaf feature with the karaf maven plugin; this produces:

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>rosapi-features</artifactId>
            <version>${project.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

The packaging of this project is 'feature' to use the karaf-maven-plugin.


The second module consumes it, via the dependency above. It also uses
the karaf-maven-plugin with a different packaging to make the karaf
assembly.

When I try to run release:prepare, I fail, because the features.xml
file is not, apparently, resolved correctly from the reactor. Does
anyone here on the Maven side have any suggestions before I try to
dive into the Karaf side? Of course, it works fine when I am _not_
running the release plugin.

[INFO] [WARNING] Error resolving
artifactcom.basistech.ws:rosapi-features:xml:features:0.7.100:Could
not find artifact
com.basistech.ws:rosapi-features:xml:features:0.7.100 in Basis
Technology Corp. Nexus
(http://nexus.basistech.net:8081/nexus/content/groups/public)
[INFO] shaded.org.eclipse.aether.resolution.ArtifactResolutionException:
Could not find artifact
com.basistech.ws:rosapi-features:xml:features:0.7.100 in Basis
Technology Corp. Nexus
(http://nexus.basistech.net:8081/nexus/content/groups/public)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Reactor versus classifiers ...

Posted by Jörg Schaible <jo...@swisspost.com>.
Hi Benson,

Benson Margulies wrote:

> I've hit a problem with Maven 3.2.5 and the karaf-maven-plugin.
> 
> One module builds a Karaf feature with the karaf maven plugin; this
> produces:
> 
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>rosapi-features</artifactId>
>             <version>${project.version}</version>
>             <classifier>features</classifier>
>             <type>xml</type>
>             <scope>runtime</scope>
>         </dependency>
> 
> The packaging of this project is 'feature' to use the karaf-maven-plugin.
> 
> 
> The second module consumes it, via the dependency above. It also uses
> the karaf-maven-plugin with a different packaging to make the karaf
> assembly.
> 
> When I try to run release:prepare, I fail, because the features.xml
> file is not, apparently, resolved correctly from the reactor. Does
> anyone here on the Maven side have any suggestions before I try to
> dive into the Karaf side? Of course, it works fine when I am _not_
> running the release plugin.

I assume the modules have a shared parent with the same version. Declare the 
artifact in a dependencyManagement section of the parent (don't use a 
property for the version there - the release plugin will handle it) and drop 
the version when you declare the dependency in the modules.

While your approach should have worked in the first place, we had less 
problems with this solution.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Reactor versus classifiers ...

Posted by Benson Margulies <bi...@gmail.com>.
None of this is relevant to the simple build process of incorporating
a feature in a karaf assembly.

Adding 'install' to the preparationGoals of the release plugin is the
workaround.


On Wed, Oct 21, 2015 at 8:41 PM, Martin Gainty <mg...@hotmail.com> wrote:
>
>
>> Date: Wed, 21 Oct 2015 13:56:39 -0400
>> Subject: Reactor versus classifiers ...
>> From: bimargulies@gmail.com
>> To: users@maven.apache.org
>>
>> I've hit a problem with Maven 3.2.5 and the karaf-maven-plugin.
>>
>> One module builds a Karaf feature with the karaf maven plugin; this produces:
>>
>>         <dependency>
>>             <groupId>${project.groupId}</groupId>
>>             <artifactId>rosapi-features</artifactId>
>>             <version>${project.version}</version>
>>             <classifier>features</classifier>
>>             <type>xml</type>
>>             <scope>runtime</scope>
>>         </dependency>
>>
>> The packaging of this project is 'feature' to use the karaf-maven-plugin.
>>
>>
>> The second module consumes it, via the dependency above. It also uses
>> the karaf-maven-plugin with a different packaging to make the karaf
>> assembly.
>>
>> When I try to run release:prepare, I fail, because the features.xml
>> file is not, apparently, resolved correctly from the reactor. Does
>> anyone here on the Maven side have any suggestions before I try to
>> dive into the Karaf side? Of course, it works fine when I am _not_
>> running the release plugin.
>>
>> [INFO] [WARNING] Error resolving
>> artifactcom.basistech.ws:rosapi-features:xml:features:0.7.100:Could
>> not find artifact
>> com.basistech.ws:rosapi-features:xml:features:0.7.100 in Basis
>> Technology Corp. Nexus
>> (http://nexus.basistech.net:8081/nexus/content/groups/public)
>> [INFO] shaded.org.eclipse.aether.resolution.ArtifactResolutionException:
>> Could not find artifact
>> com.basistech.ws:rosapi-features:xml:features:0.7.100 in Basis
>> Technology Corp. Nexus
>> (http://nexus.basistech.net:8081/nexus/content/groups/public)
>
> MG>you can add a jaraf feature to feature repository via MG>feature:addMG>https://karaf.apache.org/manual/latest/users-guide/provisioning.htmlMG>verify the feature registration has taken placeMG>feature:repo-list
> MG>at some point you may want to assemble MG>https://karaf.apache.org/manual/latest/developers-guide/custom-distribution.htmlMG>where maven-assembly specifies descriptor <descriptor>src/main/descriptors/bin.xml</descriptor> in configurationMG>the assembly bin.xml contains filenames you wish to include in <file>
>
> MG>karaf plugin produces kar assemblies from OSGI buildMG>once kar assembly  is created you can cp to deploy folderMG>then use the 'feature-deployer'https://karaf.apache.org/manual/latest/users-guide/deployers.htmlhttps://karaf.apache.org/manual/latest/users-guide/provisioning.html
> Have fun> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Reactor versus classifiers ...

Posted by Martin Gainty <mg...@hotmail.com>.

> Date: Wed, 21 Oct 2015 13:56:39 -0400
> Subject: Reactor versus classifiers ...
> From: bimargulies@gmail.com
> To: users@maven.apache.org
> 
> I've hit a problem with Maven 3.2.5 and the karaf-maven-plugin.
> 
> One module builds a Karaf feature with the karaf maven plugin; this produces:
> 
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>rosapi-features</artifactId>
>             <version>${project.version}</version>
>             <classifier>features</classifier>
>             <type>xml</type>
>             <scope>runtime</scope>
>         </dependency>
> 
> The packaging of this project is 'feature' to use the karaf-maven-plugin.
> 
> 
> The second module consumes it, via the dependency above. It also uses
> the karaf-maven-plugin with a different packaging to make the karaf
> assembly.
> 
> When I try to run release:prepare, I fail, because the features.xml
> file is not, apparently, resolved correctly from the reactor. Does
> anyone here on the Maven side have any suggestions before I try to
> dive into the Karaf side? Of course, it works fine when I am _not_
> running the release plugin.
> 
> [INFO] [WARNING] Error resolving
> artifactcom.basistech.ws:rosapi-features:xml:features:0.7.100:Could
> not find artifact
> com.basistech.ws:rosapi-features:xml:features:0.7.100 in Basis
> Technology Corp. Nexus
> (http://nexus.basistech.net:8081/nexus/content/groups/public)
> [INFO] shaded.org.eclipse.aether.resolution.ArtifactResolutionException:
> Could not find artifact
> com.basistech.ws:rosapi-features:xml:features:0.7.100 in Basis
> Technology Corp. Nexus
> (http://nexus.basistech.net:8081/nexus/content/groups/public)

MG>you can add a jaraf feature to feature repository via MG>feature:addMG>https://karaf.apache.org/manual/latest/users-guide/provisioning.htmlMG>verify the feature registration has taken placeMG>feature:repo-list
MG>at some point you may want to assemble MG>https://karaf.apache.org/manual/latest/developers-guide/custom-distribution.htmlMG>where maven-assembly specifies descriptor <descriptor>src/main/descriptors/bin.xml</descriptor> in configurationMG>the assembly bin.xml contains filenames you wish to include in <file>

MG>karaf plugin produces kar assemblies from OSGI buildMG>once kar assembly  is created you can cp to deploy folderMG>then use the 'feature-deployer'https://karaf.apache.org/manual/latest/users-guide/deployers.htmlhttps://karaf.apache.org/manual/latest/users-guide/provisioning.html
Have fun> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>