You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hayarobi Park (JIRA)" <ji...@codehaus.org> on 2013/01/09 11:18:13 UTC

[jira] (MWAR-296) maven-war-plugin can cause multiple dependent lib files with same snapshot version.

Hayarobi Park created MWAR-296:
----------------------------------

             Summary: maven-war-plugin can cause multiple dependent lib files with same snapshot version.
                 Key: MWAR-296
                 URL: https://jira.codehaus.org/browse/MWAR-296
             Project: Maven 2.x WAR Plugin
          Issue Type: Bug
    Affects Versions: 2.3
            Reporter: Hayarobi Park


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-296) maven-war-plugin can cause multiple dependent lib files with same snapshot version.

Posted by "Hayarobi Park (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=318472#comment-318472 ] 

Hayarobi Park edited comment on MWAR-296 at 2/1/13 4:32 AM:
------------------------------------------------------------

I add patch, that make targetName with baseVersion(eg. lib-0.1-SNAPSHOT.jar), not version (lib-0.1-20130101.000001-1.jar)
                
      was (Author: hayarobipark):
    copy targetName to baseVersion(eg. lib-0.1-SNAPSHOT.jar), not version (lib-0.1-20130101.000001-1.jar)
                  
> maven-war-plugin can cause multiple dependent lib files with same snapshot version.
> -----------------------------------------------------------------------------------
>
>                 Key: MWAR-296
>                 URL: https://jira.codehaus.org/browse/MWAR-296
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Hayarobi Park
>         Attachments: MWAR-296.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-296) maven-war-plugin can cause multiple dependent lib files with same snapshot version.

Posted by "Hayarobi Park (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=318472#comment-318472 ] 

Hayarobi Park edited comment on MWAR-296 at 2/1/13 4:32 AM:
------------------------------------------------------------

I added patch MWAR-296.patch that make targetName with baseVersion(eg. lib-0.1-SNAPSHOT.jar), not version (lib-0.1-20130101.000001-1.jar)
                
      was (Author: hayarobipark):
    I add patch, that make targetName with baseVersion(eg. lib-0.1-SNAPSHOT.jar), not version (lib-0.1-20130101.000001-1.jar)
                  
> maven-war-plugin can cause multiple dependent lib files with same snapshot version.
> -----------------------------------------------------------------------------------
>
>                 Key: MWAR-296
>                 URL: https://jira.codehaus.org/browse/MWAR-296
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Hayarobi Park
>         Attachments: MWAR-296.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MWAR-296) maven-war-plugin can cause multiple dependent lib files with same snapshot version.

Posted by "Hayarobi Park (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MWAR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hayarobi Park updated MWAR-296:
-------------------------------

    Attachment: MWAR-296.patch

copy targetName to baseVersion(eg. lib-0.1-SNAPSHOT.jar), not version (lib-0.1-20130101.000001-1.jar)
                
> maven-war-plugin can cause multiple dependent lib files with same snapshot version.
> -----------------------------------------------------------------------------------
>
>                 Key: MWAR-296
>                 URL: https://jira.codehaus.org/browse/MWAR-296
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Hayarobi Park
>         Attachments: MWAR-296.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira