karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Pozolotin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-1972) karaf-maven-plugin should respect scope
Date Sun, 10 Feb 2013 01:59:12 GMT

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

Andrei Pozolotin commented on KARAF-1972:
-----------------------------------------

JB:

This change
https://github.com/barchart/barchart-apache-karaf/blob/d7149eddeb9c0427463f46f28ed0a4ac46e7d819/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo2.java

Resolves issue #1 from this list
https://gist.github.com/carrot-garden/4747691

Although it feels like a hack, I think it is fast compromise.
Alternative would be complete re-write of GenerateDescriptorMojo goal.

Will you accept it?

Andrei.

                
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message