Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-476

Use classpath resources as fileSets

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.2-beta-4
    • None
    • None
    • None
    • Operating System : Ubuntu 8.04

    Description

      We want to do assemblies of our projects using shared assembly descriptors (http://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html). Also, we want to include some directories and files in the assemblies, but we want to store that particular directories and/or files inside the shared descriptor artifact JAR.
      For example in our shared descriptor jar is included a file src/main/assembly/files/startup/startup.sh and we want to have the assembly generated containing that file.
      Now when we execute the assembly plugin on a project using the shared descriptor, files contained inside sharedDescriptor.jar aren't copied into the assembly.

      The shared assembly descriptor has a fileSet defined like this:

        	<fileSet>
        		<directory>files</directory>
        		<outputDirectory></outputDirectory>
        		<filtered>true</filtered>
        		<includes>
      			<include>**/*.sh</include>
      			<include>**/*.csh</include>
        		</includes>
      		<fileMode>0755</fileMode>
      	</fileSet>
      

      And the *.sh and *.csh files are stored inside sharedDescriptors.jar.

      We have a project "A" and "B" that use the shared descriptor. We want to include sh and csh files on the assembly of A and B but the only way to do this is that the sh and csh files are duplicated in the file structure of both projects in /files directory instead of instead of have them only one place ( at /files directory in sharedDescriptors project)

      Is it possible to provide these files (*.csh, *.sh) within the shared descriptor jar?
      If not, we propose extending the assembly plugin so it can have defined a FileSet in the form:

        	<fileSet>
        		<directory>classpath:/assembly/files</directory>
      		...
      	</fileSet>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            laispuru Leandro Aispuru
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: