2 Replies Latest reply on Nov 10, 2011 10:21 AM by Gaurav Lohiya

    maven Camel servicemix archetype

    Sam Asura Newbie

      Can someone tell me where l can get something that works that can generate the initial project that l can deploy to servicemix 4 ?even before l begin to modify anything like the camel routes?

       

      these for instance do not work

       

      mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-osgi-camel-archetype -DarchetypeVersion=2010.01.0-fuse-01-00 -DgroupId=GroupId -DartifactId=ArtifactId -Dversion=Version

       

      mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-osgi-camel-archetype -DarchetypeVersion=4.0.0.2-fuse -DgroupId=com.yourcompany -DartifactId=camel-router -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/

       

      Error:

       

       

       

      D:\>mvn archetype:create  -DarchetypeGroupId=org.apache.servicemix.tooling   -Da

      rchetypeArtifactId=servicemix-osgi-camel-archetype   -DarchetypeVersion=4.0.0.2-

      fuse -DgroupId=com.yourcompany   -DartifactId=camel-router    -DremoteRepositori

      es=http://people.apache.org/repo/m2-snapshot-repository/

      Scanning for projects...

      -


      Building Maven Stub Project (No POM) 1

      -


      --- maven-archetype-plugin:2.1:create (default-cli) @ standalone-pom ---

      This goal is deprecated. Please use mvn archetype:generate instead

      Defaulting package to group ID: com.yourcompany

      We are using command line specified remote repositories: http://people.ap

      ache.org/repo/m2-snapshot-repository/

      Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/ser

      vicemix/tooling/servicemix-osgi-camel-archetype/4.0.0.2-fuse/servicemix-osgi-cam

      el-archetype-4.0.0.2-fuse.jar

      -


      BUILD FAILURE

      -


      Total time: 4.938s

      Finished at: Thu Nov 10 11:53:32 EAT 2011

      Final Memory: 6M/16M

      -


      Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2

      .1:create (default-cli) on project standalone-pom: Error creating from archetype

      : org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested org

      .apache.servicemix.tooling:servicemix-osgi-camel-archetype:jar:4.0.0.2-fuse down

      load does not exist. Could not find artifact org.apache.servicemix.tooling:servi

      cemix-osgi-camel-archetype:jar:4.0.0.2-fuse in id0 (http://people.apache.org/rep

      o/m2-snapshot-repository/)

      Try downloading the file manually from the project website.

      Then, install it using the command:

      mvn install:install-file -DgroupId=org.apache.servicemix.tooling -Dartif

      actId=servicemix-osgi-camel-archetype -Dversion=4.0.0.2-fuse -Dpackaging=jar -Df

      ile=/path/to/file

      Alternatively, if you host your own repository you can deploy the file t

      here:

      mvn deploy:deploy-file -DgroupId=org.apache.servicemix.tooling -Dartifac

      tId=servicemix-osgi-camel-archetype -Dversion=4.0.0.2-fuse -Dpackaging=jar -Dfil

      e=/path/to/file -Durl=[url] -DrepositoryId=[id]

      org.apache.servicemix.tooling:servicemix-osgi-camel-archetype:jar:4.0.0.

      2-fuse

      from the specified remote repositories:

      id0 (http://people.apache.org/repo/m2-snapshot-repository/, releases=tru

      e, snapshots=true)

      ->

      To see the full stack trace of the errors, re-run Maven with the -e swit

      ch.

      Re-run Maven using the -X switch to enable full debug logging.

      For more information about the errors and possible solutions, please rea

      d the following articles:

      http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

      xception

      D:\>

      D:\>

       

      Edited by: samasura on Nov 10, 2011 9:20 AM

       

      Edited by: samasura on Nov 10, 2011 9:21 AM

        • 1. Re: maven Camel servicemix archetype
          sandy2011 Newbie

          >>mvn achetype:generate

           

          Enter either 114 camel-archetype-java   for JAVA DSL Route

          or 116 camel-archetype-spring for Spring DSL Route.

           

          SpringDSL route you can directly deploy it in servicemix4.

           

          If it JavaDSL route, you need to create OSGI bundle first before deploying it to servicemix4

          • 2. Re: maven Camel servicemix archetype
            Gaurav Lohiya Newbie

            Run command prompt, go to the directory where you want to create your project and execute the following command:

             

            mvn archetype:generate -DgroupId=com.myDomain.MyProj -DartefactId=MyModule

             

            This will list the various types of archetypes that you can create. For instance, you may  choose camel-blueprint if you would like to create a blueprint project by entering its respective bundle ID.  Then it will ask you to choose the version that you would like to use.  Choose the one suitable to your needs (I would recommend to choose the latest one).

             

            NOTE: Change the group id and artefact id as per your need.