Hi, Im working with a multi-module project and trying to create an install directory. The directory will eventually be copied to a destination server (or servers depending on configs).
Ive been working with the assembly and dependency copy plugins to try and get things copied into their proper places into the install folder. I want to endup with a structure like so: top level pom.xml /Release/dev/ /Release/qa/ /Release/prod/ And then all the projects in their respective subdirectories. The project has 2 types of components: regular jar, and j2ee. For the regular jar components, I want the jar file to in the root of its respective environment. For the j2ee components, I want the jar, ear and rar, and misc config files to be placed in a folder with the same name as the j2ee component. >From what ive read in the documentation, this seems to be a job for both the dependancy and assembly plugins. I found this in the docs: http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html In particular "The dependency:copy goal can also be used to copy the just built artifact to a custom location" so I added that to my top level POM, and setup the paths to copy to /Release/<envType>. That works just fine. But the problem is trying to get the output of my assembly to be copied as a dependency. I setup an assembly to create a zip file for my j2ee component and that works. I also setup the build-helper pugin to attach the generated zip file to the packaging project for my j2ee component, and it gets installed into my local repository just fine. But now I need to get the zip file copied to my install directory and unpacked. How do i do that? Then once that is solved, I want the whole install directory to be zipped up and installed into the repository so we can get retreive it at any time. And lastly - this is more of an annoyance factor: When I used the dependency plugin to copy the just built artifacts, it tried to copy the pom only projects and failed. in order to fix that, I moved the dependency copy to the install phase instead of the package phase. Im worried this may cause other problems in the future. Is there a way to exclude certian categories of things from the dependency copy? Ideas and suggestions are welcome, Jon.
