Hi,

I am trying to use maven2 assembly plug-in. It seems to be completely broken:

- First, a small problem: the standard assembly descriptor is not usable because of it very strange name. If the app is called "myapp", the resulting jar will be called myapp-jar-with-dependencies.jar. It seems there is no way to change the name of the resulting jar except by creating another descriptor with a different id. So, I copied the standard descriptor and change the id to "app" and the application name to "my", resulting in a file called my-app.jar. Not exactly what I wanted, but better than the default name. Does anybody know an option to choose the file name?

- Now, a bigger broblem : when using the jar-with-dependencies external assembly descriptor described on Maven site, it works only if the assembly workdir from previous internal assembly is broken. In other word, if I use :

     <plugin>
       <artifactId>maven-assembly-plugin</artifactId>
       <configuration>
         <descriptorRefs>
           <descriptorRef>jar-with-dependencies</descriptorRef>
         </descriptorRefs>
          ....

It works.

If I then use

     <plugin>
       <artifactId>maven-assembly-plugin</artifactId>
       <configuration>
         <descriptors>
           <descriptor>assembly.xml</descriptor>
         </descriptors>
          ...

it works using the previously created assembly directory. So I can have a resulting jar named from the assembly descriptor id.

But if I delete the assembly directory and run mvn assembly:assembly again, it does not work. It include only one dependencies in the assembly. In my case, I am using Spring and it includes only Avallon, which is a transitive dependency of Spring.


Looks like a bug ?


- Even worst if possible, the plugin creates broken manifest. The lines are cut after 70 characters, in the middle of a jar name. This makes the <addClasspath>true</addClasspath> option completely useless. I though I could use <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile> instead, using my own manifest. This would be an inconvenient, because I would have to update this file each time a dependency is added to the application, but at least it would work. Not at all. the plugin still breaks the line after 70 characters.



Pierre-Yves

Reply via email to