...
Check if you have maven2 installed, if not then please install it. http://maven.apache.org/download.html#InstallationMake sure that you're using maven-archetype-plugin
1.0-alpha4 or above you can look in (~/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin). To install it you can place a minimal pom.xml in the folder where you're calling the mvn archetype:create goal in:
<?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>myversion</version>
<packaging>pom</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>1.0-alpha-4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
1) To create a JBI component as you might have guessed by now - run the mvn command: (needless to say you should create a new directory where you want all your stuff to be generated and you have to remove the trailing backshlashes and make it one line)
...
The version information "3.0-incubating" may have to be changed; just look at any of ServiceMix' pom.xml for the version you are using.
Note | ||
---|---|---|
| ||
The maven-archetype-plugin 1.0-alpha4 or above is required for this tutorial. When an older version is installed, a BUILD ERROR will occur. The version can be checked by having a look at the name of the directories contained in ~/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin (~ is you user directory, on Windows C:\Documents and Settings\<USERNAME>). In case only an older version is present, we create a minimal pom.xml in the folder where we're calling the mvn archetype:create goal in (so the current folder) and fill the created file with the following content: <?xml version="1.0" encoding="UTF-8"?> |
2) After you have successfully run the above command this is what you would end up with
...