|
Would there be a way to filter the assembly descriptor itself, based on properties from the project/pom using it ?
I'm confused. Why not choose for uploading the assembly descriptor in a repository like it is done for the site.xml of the site plugin???
With this solution:
NOTE: Since i require this functionality, i might implement a site-plugin like solution and post the patch here. John, wouldn't it be possible to bundle multiple assemblies in a single artifact ? On a related note, how can components be (re)used in the context of "artifact'ed" assemblies ?
What are the plans of releasing maven-assembly-artifact-types:2.2-beta-2 ?
I see maven-assembly-plugin:2.2-beta-2 is already available I surprisingly had to add
<configuration>
<ignoreMissingDescriptor>true</ignoreMissingDescriptor>
</configuration>
Also, a little bump on the question above. There's a much simpler way to accomplish all this. In fact, I've even moved away from using the descriptor and component packaging types in favor of it. Simply put all your standardized descriptors, components, etc. into a normal jar project, and install that project. The project directory might look something like this:
/ my-custom-assemblies | +- pom.xml | +- src | | +- main | | | +- resources | | | | +- assemblies | | | | | +- custom-one.xml | | | | | +- custom-two.xml Then, in the plugin-level dependencies of the POM from which you want to create an assembly (or, it could be in the top-level POM for a bunch of projects you want to use the same assembly...you can get pretty creative using pluginManagement here), you simply reference that standardized assembly-descriptor project: <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-2</version> <dependencies> <dependency> <groupId>org.myproject</groupId> <artifactId>my-custom-assemblies</artifactId> <version>1.0</version> </dependency> </dependencies> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptorRefs> <descriptorRef>custom-one.xml</descriptorRef> <descriptorRef>custom-two.xml</descriptorRef> </descriptorRefs> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> </build> Then, wherever you want a sub-module to create these two assemblies, you add this to the sub-module pom: <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> </plugin> </plugins> </build> ha, excellent, works indeed and is simpler. The documentation for descriptorRefs doesn't make this obvious, tho.
Thanks ! |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Define a project that contains the standardized descriptor. Here's an example layout based on the integration test in:
http://svn.apache.org/repos/asf/maven/plugins/maven-assembly-plugin/src/it/basic-features/assemblyDescriptor-artifact
The pom.xml looks like this:
The assembly descriptor is in src/main/resources/assembly-descriptor.xml by default, and looks like this in the example:
(so, pretty much normal).
You can use the standard descriptor after installing it into the repository with a pom.xml like the following:
Note the extension in the standard descriptor's pom.xml.