[ 
https://issues.apache.org/jira/browse/KARAF-1972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808035#comment-13808035
 ] 

Christian Schneider commented on KARAF-1972:
--------------------------------------------

I applied the patch attached to this issue but when I build I get this 
exception:
[ERROR] Failed to execute goal 
org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:install-kars 
(process-resources) on project apache-karaf-minimal: Couldn't resolve artifact 
wrap:mvn:org.apache.karaf/org.apache.karaf.util/3.0.0-SNAPSHOT: Failure to find 
wrap:mvn:jar:org.apache.karaf/org.apache.karaf.util/3.0.0-SNAPSHOT in 
http://repository.apache.org/content/groups/snapshots-group was cached in the 
local repository, resolution will not be reattempted until the update interval 
of apache-snapshots has elapsed or updates are forced -> [Help 1]

So looks like it searches for the warp: url in the maven repo which of course 
makes no sense. Any idea? I am not aware how  this might relate to the patch.


> karaf-maven-plugin should respect scope
> ---------------------------------------
>
>                 Key: KARAF-1972
>                 URL: https://issues.apache.org/jira/browse/KARAF-1972
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 3.0.0.RC1
>            Reporter: Andrei Pozolotin
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>         Attachments: 0001-Fixing-the-scope-handling.patch
>
>
> PROBLEM:
> currently, in project with dependencies such as these:
> {code}
>               <dependency>
>                       <groupId>org.osgi</groupId>
>                       <artifactId>org.osgi.core</artifactId>
>                       <scope>provided</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.osgi</groupId>
>                       <artifactId>org.osgi.compendium</artifactId>
>                       <scope>provided</scope>
>               </dependency>
> {code}
> karaf-maven-plugin with invocation like this:
> {code}
>       <build>
>               <plugins>
>                       <plugin>
>                               <groupId>org.apache.karaf.tooling</groupId>
>                               <artifactId>karaf-maven-plugin</artifactId>
>                               <version>3.0.0-SNAPSHOT</version>
>                               <executions>
>                                       <execution>
>                                               <id>generate-descriptor</id>
>                                               <phase>package</phase>
>                                               <goals>
>                                                       
> <goal>features-generate-descriptor</goal>
>                                               </goals>
>                                               <configuration>
>                                                       
> <installMode>auto</installMode>
>                                                       
> <startLevel>90</startLevel>
>                                                       
> <outputFile>./target/${project.artifactId}-${project.version}-features.xml</outputFile>
>                                               </configuration>
>                                       </execution>
>                               </executions>
>                       </plugin>
>               </plugins>
>       </build>
> {code}
> will produce features.xml with entries:
> {code}
>         <bundle start-level="90">mvn:org.osgi/org.osgi.core/4.3.0</bundle>
>         <bundle 
> start-level="90">mvn:org.osgi/org.osgi.compendium/4.2.0</bundle>
> {code}
> which is not as expected. scope==provided should not show up there.
> SOLUTION:
> instead, karaf-maven-plugin should respect scope;
> I suggest to add karaf-maven-plugin config parameters such as:
> {code}
> <scopeInclude>
>    <scope>compile</scope>
> </scopeInclude>
> {code}
> or
> {code}
> <scopeExclude>
>    <scope>provided</scope>
>    <scope>runtime</scope>
>    <scope>test</scope>
> </scopeExclude>
> {code}
> IMPACT:
> current plugin behavior forces to create a separate maven
> project to generate features.xml, since scope==provided
> is in fact excluded from transitive dependencies in that case.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to