jira-importer opened a new issue, #123:
URL: https://github.com/apache/maven-war-plugin/issues/123

   **[Hayarobi 
Park](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hayarobipark)**
 opened 
**[MWAR-296](https://issues.apache.org/jira/browse/MWAR-296?redirect=false)** 
and commented
   
   maven-war-plugin copies jar files of dependent artifacts to WEB-INF/lib 
directory. with filename as is. It could make trouble when the version of 
depenedent artifact is snapshot.
   
   If the artifact was downloaded from remote repository, the jar filename in 
local repository contains timestamp value. (eg. 
deplib-1.0.0-20121220.074535-93.jar )
   If the artifact was built in workspace, the jar file in local repository 
contains 'SNAPSHOT'. (eg. deplib-1.0.0-SNAPSHOT.jar )
   
   Guess multimodule project MyProject which has submodules modA and modWAR, 
where modWAR is dependent to modA.
   MyProject |-- modA
   |-- modWAR
   When I built just modWAR in my PC, maven (maybe war plugin) looks for 
repository, and then find modA-0.1-20130101.074535-93.jar, copy this file to 
WEB-INF/lib with same filename.
   Then, I 'mvn install' upper moudule MyProject, the submodules will be built. 
modA is built and copied to local repository with filename 
modA-0.1-SNAPSHOT.jar, and war plugin will copy modA-0.1-SNAPSHOT.jar to 
WEB-INF/lib when submodule modWAR is built. Now, there are two modA jar files 
in WEB-INF/lib directory of modWAR; modA-0.1-20130101.074535-93.jar and 
modA-0.1-SNAPSHOT.jar.
   
   If co-work developer build modA and deploy next day in his PC, the lastest 
snapshot file will look like modA-0.1-20130102.110000-1.jar
   I build modWAR without cleaning modWAR beforehand. maven will find newer 
snapshot of modA, download it, and copy it to WEB-INF/lib without deleting 
older snapshot version. There are three of modA jar files now.
   
   This behavier is different from that of dependey-plugin. 'mvn 
dependency:copy-dependencies' will copy files to target directory, changing 
timestamp value of filename to 'SNAPSHOT'. There is duplicated dependent 
library problem.
   
   I think maven-war-plugin's copying behavier should be like dependent-plugin.
   
   
   ---
   
   **Affects:** 2.3
   
   **Attachments:**
   - 
[MWAR-296.patch](https://issues.apache.org/jira/secure/attachment/12720526/MWAR-296.patch)
 (_937 bytes_)
   


-- 
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: issues-unsubscr...@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to