Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jar names collision when building embedded jetty with maven

I am building my web module with maven. It contains embedded Jetty jars with JSP support from Apache. So with assembly maven plugin I create ZIP with all needed dependencies. But there is one catch - in my distribution there are 2 jars that have the same artifactId name:

-- org.eclipse.jetty:apache-jsp:9.2.10.v20150310
-- org.mortbay.jasper:apache-jsp:8.0.9.M3

First module depends on the second one. In my assembly descriptor we create lib folder with short library names: ${artifact.artifactId}-${artifact.extension}. This leads to collision and one jar is not added to result ZIP:

[INFO] --- maven-assembly-plugin:2.2:single (make-assembly) @ webviewer ---                
[INFO] webviewer/lib/apache-jsp.jar already added, skipping                                
[INFO] Building zip: ...\trunk\web\webviewer\target\            
[INFO] webviewer/lib/apache-jsp.jar already added, skipping                                

I know that I can work around this problem by using full name with group Id and version, but this way jar names can get rather lengthy. Default maven naming scheme includes only artifact name and version. It can happen that both Apache and Jetty versions collide in future thus resulting in easy to miss build warnings and obscure runtime errors.

So I have a question - was this name collision done on purpose or I can submit change request to rename the module?

I could find only this link - - where adding of the new module was described, but I am not sure that the same artifact naming is really needed (in maven all coordinates have to include both group and artifact.)

Alex Ekushev

Back to the top