Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added the warning section regarding local repository dependencies

...

Code Block
mvn jbi:embeddedServicemix

Warning regarding local repository dependencies

If you are only using dependencies for your Component (or any project type) from remote repositories then you can ignore this section.  However, if you have jars or zip files that which are perhaps internal to your company or a 3rd party jar which you just want to put in your local repository and use as a dependency then you need to be sure to generate a POM for these files.  If you do not then these dependencies won't be included in the installer zip file for your jbi Component (or other project type) no matter what scope you specify.  Here's how to tell maven 2 to install the jar and generate a pom for it:

Code Block

 mvn install:install-file -Dfile=abc.jar -DgroupId=com.mycompany.myproduct -DartifactId=abc -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true

If you leave off the generatePom parameter, then in your local repository you'll just see the jar file with version attached, e.g. "abc-1.0.jar".  But if you include the generatePom, then you'll also see "abc-1.0.pom".  You add the dependency to your JBI project like this:

Code Block

<dependency>
  <groupId>com.mycompany.myproduct</groupId>
  <artifactId>abc</artifactId>
  <version>1.0</version>
  <scope>compile</scope>
</dependency>

When you run "mvn install", you can see if it worked by looking for the following near the bottom of your build results:

Code Block

[INFO] jbi:jbi-component[INFO] Including: com.mycompany.myproduct:abc:jar:1.0:compile

You can also double check by opening the installer zip file that is created for your jbi project and verifying that your dependency is showing up in the lib folder.

Full Plugin Information

Include Page
SM:Full Description
SM:Full Description

...