This works but I can't control the files that get put into the jar, because the jar plugin includes everything.
I could probably use the assembly plugin or maybe call and ant task to delete unneeded files. If I use the assembly plugin can I disable the normal jar that gets created? -----Original Message----- From: Douglas Ferguson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 17, 2006 4:43 PM To: 'Maven Users List' Subject: RE: including classes from a dependent jar I just came up with a plan of attack: 1) Use the dependency:unpack goal. 2) Then update the jar plugin config to use the unpack dir. -----Original Message----- From: Donald Ness [mailto:[EMAIL PROTECTED] Sent: Thursday, August 17, 2006 4:40 PM To: Maven Users List Subject: RE: including classes from a dependent jar You could try using the ant plugin: <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>package</phase> <configuration> <tasks> <mkdir dir="${project.build.directory}/${project.build.finalName}/applets"/> <jar destfile="${project.build.directory}/${project.build.finalName}/applets/ YourJarName.jar" update="true" basedir="${project.build.outputDirectory}" includes="com/yourcompany/Class1.class com/yourcompany/Class2.class ..."/> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> I'm not sure how well this will work for you, since you need to pull classes from other modules, but you may be able to tweak this to suit your needs. You could add several more jar tasks with basedirs pointing to your other modules, keeping destfile the same and update set to true. --Don -----Original Message----- From: Douglas Ferguson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 17, 2006 4:24 PM To: 'Maven Users List' Subject: including classes from a dependent jar I have a module that needs to build a jar file from a subset of classes from other modules. Any suggestions on a clean way to do this? __________________________________________ Douglas W. Ferguson EPSIIA - Another Fiserv Connection Development Office Phone: 512-329-0081 ext. 3309 Dial Toll Free: 800-415-5946 Mobile Phone: 512-293-7279 Fax: 512-329-0086 [EMAIL PROTECTED] www.epsiia.com <http://www.epsiia.com/> __________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]