jira-importer commented on issue #248:
URL: 
https://github.com/apache/maven-jar-plugin/issues/248#issuecomment-2956687258

   **[Peter 
Kemp](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=peterkemp)** 
commented
   
   I don't have a fix for this - there is a workaround though.
   
   Version 2.4 of the Maven archiver (maven-archiver) uses by default a 
different approach to generating the classpath vs version 2.2.
   
   **maven-archiver version 2.2:** uses artifact file name
   **maven-archiver version 2.4:** uses a pattern that looks a bit like this:
   
   ```
   
${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}
   ```
   
   .. which would give a classpath entry like this: TheJarFile-3.4-SNAPSHOT.jar
   
   (N.B. maven-archiver version 2.2 is used by e.g. maven-ejb-plugin 2.1; 
maven-archiver 2.4 is used by e.g. maven-ejb-plugin 2.2 and 2.3)
   
   The easiest way to construct your classpath entries using the  
\<build>\<finalName> is to use the following configuration:
   
   ```
   <plugin>
        <artifactId>maven-ejb-plugin</artifactId>
        <configuration>
                <archive>
                        <manifest>
                                <addClasspath>true</addClasspath>
                                
<classpathLayoutType>custom</classpathLayoutType>
                                
<customClasspathLayout>$${artifact.file.name}</customClasspathLayout>
                        </manifest>
                </archive>                                                      
                                       
        </configuration>
   </plugin>
   ```
   
   The workaround for maven-jar-plugin and maven-war-plugin is the same.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to