geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwengr <rwdonap...@bellsouth.net>
Subject Re: DependencyManager and car-maven-plugin problem
Date Tue, 25 Feb 2014 16:02:33 GMT
The answer to this post is:

For a lot of standard components, this type of error message is not fatal. 
Geronimo or the car-maven-plugin can load the basics.

For your target project (e.g. custom plugin) it's a different story.

For Geronimo 3.0.1, to generate CAR packaging, the maven project that
compiles your program must generate a bundle with the dependencies embedded. 
During packaging, when the car-maven-plugin boots the geronimo kernel, the
dependency manager will have all the info to resolve the dependencies.  It
is no longer sufficient to generate a simple jar artifact.  For a basic
Geronimo bean, the plugin to generate the bundle looks like this.

The packaging for the target project must be "bundle" instead of "jar"

The geronimo kernel has no access to maven repository when it processes a
bundle, so the bundle has to contain everything that geronimo is not
providing in its processing container (or already loaded in a previously
processed bundle?).  This example is for a project that does compilation and
packaging only (no test).

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>bundle</goal>
            </goals>
            <configuration>
              <unpackBundle>true</unpackBundle>
              <instructions>
                <Import-Package></Import-Package>
               
<Export-Package>org.apache.geronimo.directory;version=9.0.2</Export-Package>
                <Private-Package></Private-Package>
                <Embed-Dependency>*</Embed-Dependency>
                <_exportContents></_exportContents>
              </instructions>
            </configuration>
          </execution>
        </executions>
        <configuration>
        </configuration>
      </plugin>

The jar file will contain the classes you compiled.  Any jars necessary for
compilation should be included in their entireity in the target jar file



--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/DependencyManager-and-car-maven-plugin-problem-tp3987646p3987661.html
Sent from the Users mailing list archive at Nabble.com.

Mime
View raw message