Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Maven 2.0.4 or higher
    • If you have never used Maven previously the Maven Getting Started Guide explains some valuable concepts surrounding Maven
  • ServiceMix 3.21-incubating -SNAPSHOT or higher
  • A broadband internet connection so Maven can automatically download dependencies

...

Panel

$ mvn archetype:create \
-DarchetypeGroupId=org.apache.servicemix.tooling \
-DarchetypeArtifactId=servicemix-binding-component \
-DarchetypeVersion=3.21-incubating -SNAPSHOT \
-DgroupId=org.apache.servicemix.samples.helloworld.bc \
-DartifactId=hello-world-bc \
-DremoteRepositories=http://people.apache.org/repo/m2-incubating-repositoryImage Added

The command above will create a directory named hello-world-bc that houses a Maven project for the JBI service engine being created here. The name of the directory is taken from the artifactId parameter.

The first three parameters to the mvn command (-DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-binding-component -DarchetypeVersion=3.2-incubating-SNAPSHOT) identify which Maven archetype to use for the archetype:create goal, while the last two parameters (-DgroupId=org.apache.servicemix.samples.helloworld.bc -DartifactId=hello-world-bc) uniquely identify the Maven project that is being generated. The groupId is used as the Java package and the artifactId is used as the project name. Therefore, only alphanumeric characters are valid values for the groupId and artifactId parameters. The very last parameter tells Maven to look at the Incubator repository at the ASF. Because Incubator policy disallows incubating projects to publish artifacts outside of the Incubator repository, the remoteRepositories system property tells Maven to use the Incbator repository.

Tip

The value of the archetypeVersion parameter in the command above (3.2-incubating-SNAPSHOT) may need to be updated to the current ServiceMix version in order for the command to work correctly. The latest version can always be found in the top level ServiceMix POM in the <version> element.

...