You may be able to use the assembly plugin to do something like what
you want - although I'm not sure if the extra jars will make it into
your repository so that you could depend on them in other projects.

Bind the assembly:attached target into your build process in your
pom.xml with something like:

...
<build>
 <plugins>
   <plugin>
     <artifactId>maven-assembly-plugin</artifactId>
     <executions>
       <execution>
         <goals>
           <goal>attached</goal>
         </goals>
         <phase>package</phase>
       </execution>
     </executions>
     <configuration>
       <descriptors>
         <descriptor>src/main/assembly/client.xml</descriptor>
         <descriptor>src/main/assembly/server.xml</descriptor>
         <descriptor>src/main/assembly/util.xml</descriptor>
       </descriptors>
     </configuration>
   </plugin>
 </plugins>
</build>
...

The client/server/util.xml files should be something like (see
documentation for the assembly plugin at
http://maven.apache.org/plugins/maven-assembly-plugin/introduction.html)...

<assembly>
 <id>client</id>
 <formats>
   <format>jar</format>
 </formats>
 <includeBaseDirectory>false</includeBaseDirectory>
 <fileSets>
   <fileSet>
     <includes>
       <include>target/classes/my/package1/**</include>
       <include>target/classes/my/package2/**</include>
     </includes>
   </fileSet>
 </fileSets>
</assembly>

This should build the extra jars in your target directory during the
package phase.

Hope this is helpful, and if anyone more experienced than me has any
input on this method (like it sucks! :-), please let me know.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to