Liav, the SU pom.xml must contain the following elements :
[...] <packaging>jbi-service-unit</packaging> [...] <dependencies> <dependency> <groupId>org.apache.servicemix</groupId> <!-- The component that you need in your SU --> <!-- like http for exemple --> <artifactId>servicemix-http</artifactId> <version>2008.01</version> </dependency> </dependencies> [...] <build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*</include> </includes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.servicemix.tooling</groupId> <artifactId>jbi-maven-plugin</artifactId> <version>4.0</version> <extensions>true</extensions> </plugin> </plugins> </build> You can use a parent for this, it's not a problem. Regards JB On Tuesday 23 December 2008 - 00:18, Liav Ezer wrote: > > Hi, > > Hi, > > I wrote a root pom.xml file in order to generate a SU from it: > I think i do something basiclly wrong. > > <?xml version="1.0" encoding="UTF-8"?> > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>mygroup</groupId> > <artifactId>myartifact</artifactId> > <version>1.0-SNAPSHOT</version> > <packaging>pom</packaging> > <name>ProxyTask</name> > <url>http://servicemix.org</url> > <modules> > > </modules> > </project> > > When I run this: > mvn archetype:create -DarchetypeArtifactId=servicemix-service-unit > -DarchetypeGroupId=mygroup -DartifactId=myartifact > > I get this error: > > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'archetype'. > [INFO] > ------------------------------------------------------------------------ > [INFO] Building ProxyTask > [INFO] task-segment: [archetype:create] (aggregator-style) > [INFO] > ------------------------------------------------------------------------ > [INFO] Setting property: classpath.resource.loader.class => > 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. > [INFO] Setting property: velocimacro.messages.on => 'false'. > [INFO] Setting property: resource.loader => 'classpath'. > [INFO] Setting property: resource.manager.logwhenfound => 'false'. > [INFO] [archetype:create] > [WARNING] This goal is deprecated. Please use mvn archetype:generate instead > [INFO] Defaulting package to group ID: mygroup > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Failed to resolve artifact. > > GroupId: mygroup > ArtifactId: servicemix-service-unit > Version: RELEASE > > Reason: Unable to determine the release version > > Try downloading the file manually from the project website. > > Then, install it using the command: > mvn install:install-file -DgroupId=mygroup > -DartifactId=servicemix-service-unit -Dversion=RELEASE -Dpackaging=jar > -Dfile=/path/to/file > > Alternatively, if you host your own repository you can deploy the file > there: > mvn deploy:deploy-file -DgroupId=mygroup > -DartifactId=servicemix-service-unit -Dversion=RELEASE -Dpackaging=jar > -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] > > > mygroup:servicemix-service-unit:jar:RELEASE > > > > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 4 seconds > [INFO] Finished at: Tue Dec 23 10:14:19 IST 2008 > [INFO] Final Memory: 8M/14M > [INFO] > ------------------------------------------------------------------------ > > Any idea? > > -- > View this message in context: > http://www.nabble.com/Getting-an-error-while-trying-to-build-a-SU-tp21141043p21141043.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > -- Jean-Baptiste Onofré (Nanthrax) BuildProcess/AutoDeploy Project Leader http://buildprocess.sourceforge.net j...@nanthrax.net PGP : 17D4F086