...
Let's try to build the jar. Remove the test classes and sample classes if you used the artifact, then from the command line, run:
The end of the maven output should look like:
Code Block |
---|
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
|
Tip |
---|
|
If you see something like that: Code Block |
---|
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
| /Users/gnodet/work/servicemix/smx4/tmp/org.apache.servicemix.kernel.gshell.config/xxx/src/main/java/org/apache/servicemix/kernel/gshell/config/ListCommand.java:[6,1] annotations are not supported in -source 1.3
(try -source 1.5 to enable annotations)
@CommandComponent(id="config:list", description="List the available configurations")
|
that's because we forgot to enable Java 5. So let's add that to the pom: Code Block |
---|
|
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build> |
|
Let's try again, and we should now have:
Code Block |
---|
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------ |
Turning the jar into an OSGi bundle
...