Laurent Vaills schrieb: > Hi, > > We are moving our build system from ant to maven. > We have some components that contains some Java classes and some shell > scripts. Our ant-build system compiles the Java classes and then > generates a .tar.gz containing the shell scripts and the Java classes. > So we now want to do the same with Maven. > > We have started to write our pom.xml by defining the packaging as POM > and by writing an assembly description to produce the tar.gz. Our > problem is that the Java classes are not compiled anymore (because > setting the packaging to pom starts at the pahse "package"). I've tried > to explicitly execute the maven-compiler-plugin to compile the Java > classes but without success. > > Any ideas on how to achieve this with Maven ? >
For a normal (simple) project, you just have a single pom with packaging=jar (which is the default). This will of course compile the classes and build a jarfile. Then you can just add the maven-assembly-plugin as a plugin in the build section. This plugin can be configured to build zip or tgz files from the classes/jarfile plus files checked in elsewhere (eg under src/scripts for your shellscripts). In a more complex case, you may want to split the java code up into seperate maven modules, each with their own pom. Then you can declare a separate module with packaging=pom which declares dependencies on your other modules. The maven-dependency-plugin can then download all the deps into a directory for the maven-assembly-plugin to work with. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
