Thanks Wendy it was very helpful.

You're right it is working with the extensions tag. But I found another solution: use the <dependencies> tag inside the plugin:

I think this tips should be in the assembly plugin documentation.
Here is how I did:

<project ...>
        <artifactId>myAssemblies</artifactId>
        <groupId>com.mycompany.mygroup</groupId>
        <version>1.0.0</version>
        <packaging>jar</packaging>
</project>

Your project just need to contain the assambly descriptor file (the directory "assemblies" is required):
        src\main\resources\assemblies\my-distribution.xml
In this project be sure to disable filtering on resources folder otherwise variables like ${artifactId} will be replaced....

Then in a pom parent (my-pom-parent) you need to declare the assembly configuration:

<build>
 <pluginManagement>
  <plugins>
   <plugin>
    <artifactId>maven-assembly-plugin</artifactId>
     <configuration>
      <descriptorRefs>
       <descriptorRef>my-distribution</descriptorRef>
      </descriptorRefs>
     </configuration>
     <executions>
      <execution>
       <id>my-assembly</id>
       <phase>package</phase>
       <goals>
        <goal>assembly</goal>
       </goals>
      </execution>
     </executions>
     <dependencies>
      <dependency>
       <groupId>com.mycompany.mygroup</groupId>
       <artifactId>myAssemblies</artifactId>
       <version>1.0.0</version>
      </dependency>
     </dependencies>
    </plugin>
   </plugins>
  </pluginManagement>
</build>


And Then in your project (that inherite from the "my-pom-parent") you just need to declare the usage of the assembly plugin:

   <build>
        <plugins>
             <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
             </plugin>
        </plugins>
   </build>

Of course you can overwrite default plugin configuration.

Hope it will help other people.
Yann.



Wendy Smoak wrote:
On 12/2/06, Yann Albou <[EMAIL PROTECTED]> wrote:

I saw I can configure a descriptorRefs, but it seems limited to
predefined assembly files (bin, jar-with-dependencies, or src).
I would like to add my own descriptorRef and make it availables to other
projects.

Maybe as a build extension?  Try creating another module and putting
your assembly descriptor in a jar.  Deploy that to your Maven repo,
then pull it in with <build><extensions><extension>.

I haven't tried it with assembly, but it works for Checkstyle config files.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to