You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Massimiliano Guillaro <m....@gmail.com> on 2010/11/29 12:22:24 UTC

features-maven-plugin: Error populating repository

Hello,
i'm a newbie in apache karaf. I would use apache servicemix in local but i
need a local copy of features in a local maven repository.
I try to use  org.apache.karaf.tooling:features-maven-plugin but when i run
it, i have all the time the same error: Error populating repository !!
I've tried to use both maven 3.0 and maven 2.2.1 and i have also tried to
use both an xml feature's file local and remote.
I'm working on knoppix 2.6.
Please help me  and if necessary please can you post an example of pom?.

Thank you
Massimiliano Guillaro
 
Output:

root@Microknoppix:/home/knoppix/my-app# mvn
org.apache.karaf.tooling:features-maven-plugin:add-features-to-repo -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building Unnamed - it.vitrociset.app:my-app:jar:1.0-SNAPSHOT
[INFO]    task-segment:
[org.apache.karaf.tooling:features-maven-plugin:add-features-to-repo]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing features:add-features-to-repo
[WARNING] Removing: add-features-to-repo from forked lifecycle, to prevent
recursive invocation.
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (ISO-8859-15 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/knoppix/my-app/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [features:add-features-to-repo {execution: default-cli}]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error populating repository

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error populating
repository
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error populating
repository
        at
org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.execute(AddFeaturesToRepoMojo.java:171)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
Caused by: java.lang.NullPointerException
        at
org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.execute(AddFeaturesToRepoMojo.java:85)
        ... 19 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Mon Nov 29 11:40:12 CET 2010
[INFO] Final Memory: 14M/26M
[INFO]
------------------------------------------------------------------------

POM:

<project>
<modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <version>1.0-SNAPSHOT</version>

  <pluginRepositories>
          <pluginRepository>
                <id>releases</id>
                <name>Releases</name>
         
<url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
        </pluginRepository>
 </pluginRepositories>

  <build>
        <plugins>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>features-maven-plugin</artifactId>
                <version>2.0.0-fuse-02-00</version>
                <executions>
                    <execution>
                        <id>add-features-to-repo</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-features-to-repo</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                               
<descriptor>mvn:org.apache.servicemix/apache-servicemix/4.3.0-fuse-02-00/xml/features</descriptor>
                            </descriptors>
                            <features>
                                <feature></feature>
                            </features>
                           
<repository>${project.build.directory}/features-repo</repository>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build> 
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/features-maven-plugin-Error-populating-repository-tp3284232p3284232.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: features-maven-plugin: Error populating repository

Posted by Massimiliano Guillaro <m....@gmail.com>.
No problem

http://servicemix.396122.n5.nabble.com/file/n3284585/pom.xml pom.xml 
http://servicemix.396122.n5.nabble.com/file/n3284585/apache-servicemix-nmr-1.3.0-fuse-01-00-features.xml
apache-servicemix-nmr-1.3.0-fuse-01-00-features.xml 

Thank you again
MG
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/features-maven-plugin-Error-populating-repository-tp3284232p3284585.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: features-maven-plugin: Error populating repository

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

could you send your POM and features descriptor ?
I will make a try.

Thanks,
Regards
JB

On 11/29/2010 03:51 PM, Massimiliano Guillaro wrote:
>
> Hi JB,
> Thank you very clear!!
> But when i try your suggestions i have the same problem!! I post you the new
> pom. In this case i have tried to dowload a single feature "naming" that has
> only one bundle but when it downloads i see many [INFO] unable to dowload...
> When i control if the url are correct i found the pom so the url are
> correct.What is the problem now? Is there a more simple machanism to create
> a local Maven repository to use servicemix without internet access?
>
> New pom
>
> <project>
> 	<modelVersion>4.0.0</modelVersion>
> 	<groupId>it.vitrociset.app</groupId>
> 	<artifactId>my-app</artifactId>
> 	<version>1.0-SNAPSHOT</version>
> 	
> 	
> 	
> 	<pluginRepositories>
> 		
> 		<pluginRepository>
> 			<id>releases</id>
> 			<name>Releases</name>
> 			
> 			<url>
> 				http://repo.fusesource.com/nexus/content/repositories/releases
> 			</url>
> 		</pluginRepository>
> 	</pluginRepositories>
> 	
> 	<repositories>
> 		
> 		<repository>
> 			<id>sourceforge</id>
> 			<name>Sourceforge</name>
> 			<url>http://repo.fusesource.com/maven2</url>
> 		</repository>
> 		<!--
> 		<repository>
> 			<id>sourceforgerepo</id>
> 			<name>SourceforgeRepo</name>
> 			
> 			<url>
> 				http://repo.fusesource.com/nexus/content/repositories/releases
> 			</url>
> 		</repository>
> 		
> 		
> 		<repository>
> 			<id>ops4j</id>
> 			<name>Ops4j</name>
> 			<url>http://repository.ops4j.org/maven2</url>
> 		</repository>
> 		<repository>
> 			<id>apache</id>
> 			<name>Apache</name>
> 			<url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
> 		</repository>
> 		<repository>
> 			<id>springsourcerelease</id>
> 			<name>SpringSourceRelease</name>
> 			<url>http://repository.springsource.com/maven/bundles/release</url>
> 		</repository>
> 		<repository>
> 			<id>springsourceexternal</id>
> 			<name>SpringSourceExternal</name>
> 			<url>http://repository.springsource.com/maven/bundles/external</url>
> 		</repository>
> 		-->
> 	</repositories>
> 	
> 	<dependencies>
> 		
> 		<dependency>
> 			<groupId>org.apache.servicemix.naming</groupId>
> 			<artifactId>org.apache.servicemix.naming</artifactId>
> 			<version>1.3.0-fuse-01-00</version>
> 		</dependency>
> 		
> 	</dependencies>
> 	
> 	<build>
> 		
> 		<plugins>
> 			
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>features-maven-plugin</artifactId>
> 				<version>2.0.0-fuse-02-00</version>
> 				
> 				<executions>
> 					
> 					<execution>
> 						<id>add-features-to-repo</id>
> 						<phase>generate-resources</phase>
> 						
> 						<goals>
> 							<goal>add-features-to-repo</goal>
> 						</goals>
> 						
> 						<configuration>
> 							
> 							<descriptors>
> 								
> 								<descriptor>
> 									
> mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.3.0-fuse-01-00/xml/features
> 								</descriptor>
> 							</descriptors>
> 							
> 							<features>
> 								<feature>naming</feature>
> 							</features>
> 							<repository>${project.build.directory}/features-repo</repository>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> 		</plugins>
> 	</build>
> </project>
> 		
> Regards
> Massimiliano

Re: features-maven-plugin: Error populating repository

Posted by Massimiliano Guillaro <m....@gmail.com>.
Hi JB,
Thank you very clear!! 
But when i try your suggestions i have the same problem!! I post you the new
pom. In this case i have tried to dowload a single feature "naming" that has
only one bundle but when it downloads i see many [INFO] unable to dowload...
When i control if the url are correct i found the pom so the url are
correct.What is the problem now? Is there a more simple machanism to create
a local Maven repository to use servicemix without internet access?

New pom

<project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>it.vitrociset.app</groupId>
	<artifactId>my-app</artifactId>
	<version>1.0-SNAPSHOT</version>
	
	
	
	<pluginRepositories>
		
		<pluginRepository>
			<id>releases</id>
			<name>Releases</name>
			
			<url>
				http://repo.fusesource.com/nexus/content/repositories/releases
			</url>
		</pluginRepository>
	</pluginRepositories>
	
	<repositories>
		
		<repository>
			<id>sourceforge</id>
			<name>Sourceforge</name>
			<url>http://repo.fusesource.com/maven2</url>
		</repository>
		<!--
		<repository>
			<id>sourceforgerepo</id>
			<name>SourceforgeRepo</name>
			
			<url>
				http://repo.fusesource.com/nexus/content/repositories/releases
			</url>
		</repository>
		
		
		    <repository>
			    <id>ops4j</id>
			    <name>Ops4j</name>
			    <url>http://repository.ops4j.org/maven2</url>
		    </repository>
		    <repository>
			    <id>apache</id>
			    <name>Apache</name>
			    <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
		    </repository>
		    <repository>
			    <id>springsourcerelease</id>
			    <name>SpringSourceRelease</name>
			    <url>http://repository.springsource.com/maven/bundles/release</url>
		    </repository>
		    <repository>
			    <id>springsourceexternal</id>
			    <name>SpringSourceExternal</name>
			    <url>http://repository.springsource.com/maven/bundles/external</url>
		    </repository> 
		    -->
	    </repositories>
	    
	<dependencies>
		
		<dependency>
			<groupId>org.apache.servicemix.naming</groupId>
			<artifactId>org.apache.servicemix.naming</artifactId>
			<version>1.3.0-fuse-01-00</version>
		</dependency>
		
	</dependencies>    
	    
	<build>
		    
		    <plugins>
			    
			    <plugin>
				    <groupId>org.apache.karaf.tooling</groupId>
				    <artifactId>features-maven-plugin</artifactId>
				    <version>2.0.0-fuse-02-00</version>
				    
				    <executions>
					    
					    <execution>
						    <id>add-features-to-repo</id>
						    <phase>generate-resources</phase>
						    
						    <goals>
							    <goal>add-features-to-repo</goal>
						    </goals>
						    
						    <configuration>
							    
							    <descriptors>
								    
								    <descriptor>
									   
mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.3.0-fuse-01-00/xml/features
								    </descriptor>
							    </descriptors>
							    
							    <features>
								    <feature>naming</feature>
							    </features>
							    <repository>${project.build.directory}/features-repo</repository>
						    </configuration>
					    </execution>
				    </executions>
			    </plugin>
		    </plugins>
	    </build>
</project>
		    
Regards
Massimiliano 
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/features-maven-plugin-Error-populating-repository-tp3284232p3284512.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: features-maven-plugin: Error populating repository

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

yes it is.

If you have a feature defined like this:

<feature name="my.feature" version="my.version">
   <feature version="other.version">other.feature</feature>
   <bundle>mvn:my.groupId/my.artifactId/my.version</bundle>
</feature>

you should have alll bundles from other.feature in your local maven 
repo. It means that you have to define all dependencies.

I'm agree that it's not trivial and the feature maven plugin should be 
able to update the local repo.

Regards
JB

On 11/29/2010 01:59 PM, Massimiliano Guillaro wrote:
>
> Hi JB,
> thank you for your support. I'm very confused!! i haven't inserted the
> dependency because i suppose that when i select the features, presents in
> the xml, automatically it downloads every dependencies itself. So i must
> insert every  dependency in the pom like this:
>
> <feature name="servicemix-wsn2005" version="2010.02.0-fuse-01-00">
> <feature version="2010.02.0-fuse-01-00">servicemix-shared</feature>
> <feature version="5.4.1-fuse-00-00">activemq</feature>
> <bundle>
> mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.2
> </bundle>
>
> in the pom will be
>
> <dependency>
>     <groupId>org.apache.geronimo.specs</groupId>
>     <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
>     <version>1.1.2</version>
> </dependency>
>
>
> is it correct?
> If this is the problem i say thank you for your helpfulness.
>
> Regards
> Massimiliano

Re: features-maven-plugin: Error populating repository

Posted by Massimiliano Guillaro <m....@gmail.com>.
Hi JB,
thank you for your support. I'm very confused!! i haven't inserted the
dependency because i suppose that when i select the features, presents in
the xml, automatically it downloads every dependencies itself. So i must
insert every  dependency in the pom like this:

<feature name="servicemix-wsn2005" version="2010.02.0-fuse-01-00">
<feature version="2010.02.0-fuse-01-00">servicemix-shared</feature>
<feature version="5.4.1-fuse-00-00">activemq</feature>
<bundle>
mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.2
</bundle>

in the pom will be

<dependency>
   <groupId>org.apache.geronimo.specs</groupId>
   <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
   <version>1.1.2</version>
</dependency> 


is it correct?
If this is the problem i say thank you for your helpfulness.

Regards
Massimiliano 
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/features-maven-plugin-Error-populating-repository-tp3284232p3284353.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: features-maven-plugin: Error populating repository

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Massimiliano,

In your POM, did you define the dependency corresponding to the bundles 
used in features descriptor ?
The features maven plugin is not able to go on a remote repository for 
now. So before running the features maven plugin, the bundles should be 
present in your local maven repo.

For example, if you have a features descriptor like this:

<feature name="my" version="my.version">
   <bundle>mvn:my.groupId/my.artifactId/my.version</bundle>
</feature>

you need the corresponding dependency in the POM:

<dependency>
   <groupId>my.groupId</groupId>
   <artifactId>my.artifactId</artifactId>
   <version>my.version</version>
</dependency>

Is it the case ?

Regards
JB

On 11/29/2010 12:22 PM, Massimiliano Guillaro wrote:
>
> Hello,
> i'm a newbie in apache karaf. I would use apache servicemix in local but i
> need a local copy of features in a local maven repository.
> I try to use  org.apache.karaf.tooling:features-maven-plugin but when i run
> it, i have all the time the same error: Error populating repository !!
> I've tried to use both maven 3.0 and maven 2.2.1 and i have also tried to
> use both an xml feature's file local and remote.
> I'm working on knoppix 2.6.
> Please help me  and if necessary please can you post an example of pom?.
>
> Thank you
> Massimiliano Guillaro
>
> Output:
>
> root@Microknoppix:/home/knoppix/my-app# mvn
> org.apache.karaf.tooling:features-maven-plugin:add-features-to-repo -e
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Unnamed - it.vitrociset.app:my-app:jar:1.0-SNAPSHOT
> [INFO]    task-segment:
> [org.apache.karaf.tooling:features-maven-plugin:add-features-to-repo]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing features:add-features-to-repo
> [WARNING] Removing: add-features-to-repo from forked lifecycle, to prevent
> recursive invocation.
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (ISO-8859-15 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> /home/knoppix/my-app/src/main/resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [features:add-features-to-repo {execution: default-cli}]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error populating repository
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error populating
> repository
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>          at
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>          at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>          at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:597)
>          at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>          at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>          at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error populating
> repository
>          at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.execute(AddFeaturesToRepoMojo.java:171)
>          at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>          at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>          ... 17 more
> Caused by: java.lang.NullPointerException
>          at
> org.apache.karaf.tooling.features.AddFeaturesToRepoMojo.execute(AddFeaturesToRepoMojo.java:85)
>          ... 19 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 8 seconds
> [INFO] Finished at: Mon Nov 29 11:40:12 CET 2010
> [INFO] Final Memory: 14M/26M
> [INFO]
> ------------------------------------------------------------------------
>
> POM:
>
> <project>
> <modelVersion>4.0.0</modelVersion>
>    <groupId>com.mycompany.app</groupId>
>    <artifactId>my-app</artifactId>
>    <version>1.0-SNAPSHOT</version>
>
>    <pluginRepositories>
>            <pluginRepository>
>                  <id>releases</id>
>                  <name>Releases</name>
>
> <url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
>          </pluginRepository>
>   </pluginRepositories>
>
>    <build>
>          <plugins>
>              <plugin>
>                  <groupId>org.apache.karaf.tooling</groupId>
>                  <artifactId>features-maven-plugin</artifactId>
>                  <version>2.0.0-fuse-02-00</version>
>                  <executions>
>                      <execution>
>                          <id>add-features-to-repo</id>
>                          <phase>generate-resources</phase>
>                          <goals>
>                              <goal>add-features-to-repo</goal>
>                          </goals>
>                          <configuration>
>                              <descriptors>
>
> <descriptor>mvn:org.apache.servicemix/apache-servicemix/4.3.0-fuse-02-00/xml/features</descriptor>
>                              </descriptors>
>                              <features>
>                                  <feature></feature>
>                              </features>
>
> <repository>${project.build.directory}/features-repo</repository>
>                          </configuration>
>                      </execution>
>                  </executions>
>              </plugin>
>          </plugins>
>      </build>