DistributionStrategy has been edited by Marc Prud'hommeaux (Aug 21, 2006).

(View changes)

Content:

Aggregate jars

Right now, we have a ton of jars, most of which are needed to actually run OpenJPA. For real users, we should create aggregates of these jars, for example:

openjpa-0.9.0-full.jar contains all openjpa code, openjpa-*.jars merged
openjpa-0.9.0-nodep.jar contains all openjpa code and all third party dependency jars

See the related JIRA item:

ASF JIRA (1 issues)
T Key Summary Assignee Reporter Pr Status Res Created Updated Due
Task OPENJPA-29 Create aggregate jars of OpenJPA Marc Prud'hommeaux David Blevins Major ResolvedResolved FIXED Aug 21, 2006 Sep 08, 2006

Maven assemblies

There's a way to build these using maven.

Declare the maven-assembly-plugin

Add the maven-assembly-plugin to the "build" section of your pom.xml like so:

pom.xml
<build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>assembly</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/full.xml</descriptor>
            <descriptor>src/main/assembly/nodep.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
    </plugins>
  </build>

Create the "full" assembly descriptor

In the directory "src/main/assembly/", create the following file:

full.xml
<assembly>
  <id>full</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
      <outputDirectory>/</outputDirectory>
      <unpack>true</unpack>
      <scope>runtime</scope>
      <includes>
          <include>org.apache.openjpa:openjpa-jdbc-5</include>
          <include>org.apache.openjpa:openjpa-jdbc</include>
          <include>org.apache.openjpa:openjpa-kernel-4</include>
          <include>org.apache.openjpa:openjpa-kernel-5</include>
          <include>org.apache.openjpa:openjpa-kernel</include>
          <include>org.apache.openjpa:openjpa-lib</include>
          <include>org.apache.openjpa:openjpa-persistence-jdbc</include>
          <include>org.apache.openjpa:openjpa-persistence</include>
          <include>org.apache.openjpa:openjpa-project</include>
          <include>org.apache.openjpa:openjpa-xmlstore</include>
      </includes>
    </dependencySet>
  </dependencySets>
</assembly>

Create the "nodep" assembly descriptor

Also in the directory "src/main/assembly/", create the following file:

full.xml
<assembly>
  <id>full</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
      <outputDirectory>/</outputDirectory>
      <unpack>true</unpack>
      <scope>runtime</scope>
    </dependencySet>
  </dependencySets>
</assembly>

Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request

Unsubscribe or edit your notifications preferences