Maven 2.x and 3.x Deploy Plugin

<uniqueVersion>false</uniqueVersion> not honored inside <profile>

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: 2.3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP SP2
    Maven 2.0.7
    Java 6 U1
  • Number of attachments :
    2

Description

I am invoking maven as:
mvn deploy -DCCDistribution

The appropriate section of my pom.xml is below.

In the attachment, I've provided the redirected output of "mvn help:effective-pom -DCCDistribution".

And lastly, I've provided a snippet of build console output.

--------- SECTION OF POMNOT BEING HONORED -------->
<profile>
<id>CCDistribution</id>
<activation>
<property>
<name>CCDistribution</name>
</property>
</activation>
<distributionManagement>
<repository>
<id>KenanFX_M2_Repo</id>
<name>KenanFX Maven 2 Repository</name>
<url>ftp://maven.kenan.com/KenanFX/m2_repo</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>
</profile>

---------------- CONSOLE OUTPUT SNIPPET SHOWING UNIQUE DATESTAMPED VERSIONS, THOUGH NONUNIQUE ARE DESIRED -------->
[INFO] ----------------------------------------------------------------------------
[INFO] Building CCBS UDT Functional API
[INFO] task-segment: [deploy]
[INFO] ----------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing c:\ClearCaseSource\mccm03_view3\single_api_src\udt\pom.xml to C:\Documents and Settings\mccm03\.m2\repository\com\comverse\api\udt\c
cbs-udt\1.0.M1-SNAPSHOT\ccbs-udt-1.0.M1-SNAPSHOT.pom
[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from KenanFX_M2_Repo
Uploading: ftp://maven.kenan.com/KenanFX/m2_repo/com/comverse/api/udt/ccbs-udt/1.0.M1-SNAPSHOT/ccbs-udt-1.0.M1-SNAPSHOT.pom
721b uploaded
[INFO] Retrieving previous metadata from KenanFX_M2_Repo
[INFO] Uploading repository metadata for: 'artifact com.comverse.api.udt:ccbs-udt'
[INFO] Retrieving previous metadata from KenanFX_M2_Repo
[INFO] Uploading repository metadata for: 'snapshot com.comverse.api.udt:ccbs-udt:1.0.M1-SNAPSHOT'
[INFO] ----------------------------------------------------------------------------
[INFO] Building CCBS UDT Shared
[INFO] task-segment: [deploy]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [jar:jar]
[INFO] Building jar: C:\ClearCaseSource\mccm03_view3\single_api_src\udt\shared\target\ccbs-udt-shared-1.0.M1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing C:\ClearCaseSource\mccm03_view3\single_api_src\udt\shared\target\ccbs-udt-shared-1.0.M1-SNAPSHOT.jar to C:\Documents and Settings\mc
cm03\.m2\repository\com\comverse\api\udt\ccbs-udt-shared\1.0.M1-SNAPSHOT\ccbs-udt-shared-1.0.M1-SNAPSHOT.jar
[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from KenanFX_M2_Repo
Uploading: ftp://maven.kenan.com/KenanFX/m2_repo/com/comverse/api/udt/ccbs-udt-shared/1.0.M1-SNAPSHOT/ccbs-udt-shared-1.0.M1-20070718.004617-1.jar
6K uploaded
[INFO] Retrieving previous metadata from KenanFX_M2_Repo
[INFO] Uploading repository metadata for: 'artifact com.comverse.api.udt:ccbs-udt-shared'
[INFO] Retrieving previous metadata from KenanFX_M2_Repo
[INFO] Uploading repository metadata for: 'snapshot com.comverse.api.udt:ccbs-udt-shared:1.0.M1-SNAPSHOT'
[INFO] Retrieving previous metadata from KenanFX_M2_Repo

  1. effectivepom2.txt
    17/Jul/07 7:46 PM
    1.35 MB
    Matthew McCullough
  2. pom.xml
    17/Jul/07 7:46 PM
    24 kB
    Matthew McCullough

Issue Links

Activity

Hide
Matthew McCullough added a comment -

Additionally would like to note that this has something to do with hierarchies.

In my situation, my parent pom has the profile and uniqueVersion false settings.

If I run the mvn deploy from any intermediate level in the project directory tree, (I have parents pointing to children as modules and children pointing to parents as parent projects), I get timestamp-unique deployments of any artifact in the tree. However, if I run mvn deploy from any leaf node (has to be a LEAF), then the non-unique version is deployed.

Here's a sample run output from the same project tree as my original defect submission, only this time, I'm running from a leaf directory project's pom.xml. Notice the non-unique version being uploaded:

---------------------------------->

[INFO] ----------------------------------------------------------------------------
[INFO] Building CCBS UDT EJB
[INFO] task-segment: [deploy]
[INFO] ----------------------------------------------------------------------------
[INFO] [apt:execute {execution: business-gen}]
[INFO] [apt:execute {execution: impl-gen}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [ejb:ejb]
[INFO] Building ejb ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT with ejbVersion 3.0
[INFO] Building jar: c:\ClearCaseSource\mccm03_view3\single_api_src\udt\jee\ejb\target\ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing c:\ClearCaseSource\mccm03_view3\single_api_src\udt\jee\ejb\target\ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar to C:\Documents and Settings\
mccm03\.m2\repository\com\comverse\api\udt\ccbs-udt-jee-ejb\1.0.M1-SNAPSHOT\ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar
[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from KenanFX_M2_Repo
Uploading: ftp://maven.kenan.com/KenanFX/m2_repo/com/comverse/api/udt/ccbs-udt-jee-ejb/1.0.M1-SNAPSHOT/ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar
3K uploaded
[INFO] Retrieving previous metadata from KenanFX_M2_Repo
[INFO] Uploading repository metadata for: 'snapshot com.comverse.api.udt:ccbs-udt-jee-ejb:1.0.M1-SNAPSHOT'
[INFO] Retrieving previous metadata from KenanFX_M2_Repo
[INFO] Uploading project information for ccbs-udt-jee-ejb 1.0.M1-SNAPSHOT

Show
Matthew McCullough added a comment - Additionally would like to note that this has something to do with hierarchies. In my situation, my parent pom has the profile and uniqueVersion false settings. If I run the mvn deploy from any intermediate level in the project directory tree, (I have parents pointing to children as modules and children pointing to parents as parent projects), I get timestamp-unique deployments of any artifact in the tree. However, if I run mvn deploy from any leaf node (has to be a LEAF), then the non-unique version is deployed. Here's a sample run output from the same project tree as my original defect submission, only this time, I'm running from a leaf directory project's pom.xml. Notice the non-unique version being uploaded: ----------------------------------> [INFO] ---------------------------------------------------------------------------- [INFO] Building CCBS UDT EJB [INFO] task-segment: [deploy] [INFO] ---------------------------------------------------------------------------- [INFO] [apt:execute {execution: business-gen}] [INFO] [apt:execute {execution: impl-gen}] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Not compiling test sources [INFO] [surefire:test] [INFO] Tests are skipped. [INFO] [ejb:ejb] [INFO] Building ejb ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT with ejbVersion 3.0 [INFO] Building jar: c:\ClearCaseSource\mccm03_view3\single_api_src\udt\jee\ejb\target\ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar [INFO] [install:install] [INFO] Installing c:\ClearCaseSource\mccm03_view3\single_api_src\udt\jee\ejb\target\ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar to C:\Documents and Settings\ mccm03\.m2\repository\com\comverse\api\udt\ccbs-udt-jee-ejb\1.0.M1-SNAPSHOT\ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar [INFO] [deploy:deploy] altDeploymentRepository = null [INFO] Retrieving previous build number from KenanFX_M2_Repo Uploading: ftp://maven.kenan.com/KenanFX/m2_repo/com/comverse/api/udt/ccbs-udt-jee-ejb/1.0.M1-SNAPSHOT/ccbs-udt-jee-ejb-1.0.M1-SNAPSHOT.jar 3K uploaded [INFO] Retrieving previous metadata from KenanFX_M2_Repo [INFO] Uploading repository metadata for: 'snapshot com.comverse.api.udt:ccbs-udt-jee-ejb:1.0.M1-SNAPSHOT' [INFO] Retrieving previous metadata from KenanFX_M2_Repo [INFO] Uploading project information for ccbs-udt-jee-ejb 1.0.M1-SNAPSHOT
Hide
John Allen added a comment -

We have also seen strange things with profiles not appearing to to be active (or not fully applied (sorry for vagueness)) when invoked from a inheriting project of a the hierarchy.

Show
John Allen added a comment - We have also seen strange things with profiles not appearing to to be active (or not fully applied (sorry for vagueness)) when invoked from a inheriting project of a the hierarchy.
Hide
Matthew McCullough added a comment -

My issue appears to be a variant of MNG-1094. uniqueVersion trips back to true on child projects in the hierarchy, but only when a profile is enabled. Oddly, the default and command line enabled profile BOTH have uniqueVersion set to false. So where is the true value coming from? It publishes only uniquely versioned jars.

Show
Matthew McCullough added a comment - My issue appears to be a variant of MNG-1094. uniqueVersion trips back to true on child projects in the hierarchy, but only when a profile is enabled. Oddly, the default and command line enabled profile BOTH have uniqueVersion set to false. So where is the true value coming from? It publishes only uniquely versioned jars.
Hide
Matthew McCullough added a comment -

Related to my more 'end-to-end' issue of jar:jar not agreeing with assembly:assembly

Show
Matthew McCullough added a comment - Related to my more 'end-to-end' issue of jar:jar not agreeing with assembly:assembly
Hide
Matthew McCullough added a comment -

Related to my more 'end-to-end' issue of jar:jar not agreeing with assembly:assembly

Show
Matthew McCullough added a comment - Related to my more 'end-to-end' issue of jar:jar not agreeing with assembly:assembly
Hide
Matthew McCullough added a comment - - edited

Guys, if I can even get some tips on how to fix this, I will do my best to do the coding myself. I need this fixed desperately, but need some pointers on getting started with a fix... My area of code familiarity is not the deploy plugin. This still occurs with Maven 2.0.8 and the latest dependencies in the central repo.

Show
Matthew McCullough added a comment - - edited Guys, if I can even get some tips on how to fix this, I will do my best to do the coding myself. I need this fixed desperately, but need some pointers on getting started with a fix... My area of code familiarity is not the deploy plugin. This still occurs with Maven 2.0.8 and the latest dependencies in the central repo.
Hide
Benjamin Bentmann added a comment -

Guys, if I can even get some tips on how to fix this, I will do my best to do the coding myself.

Here's the source code for the Deploy Plugin:
https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-deploy-plugin
Check it out and setup the Maven project in your IDE with source attachments. You could then start coding and remote debugging your changes.

Show
Benjamin Bentmann added a comment -
Guys, if I can even get some tips on how to fix this, I will do my best to do the coding myself.
Here's the source code for the Deploy Plugin: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-deploy-plugin Check it out and setup the Maven project in your IDE with source attachments. You could then start coding and remote debugging your changes.
Hide
Benjamin Bentmann added a comment -

This was actually a bug in the Maven core (MNG-3885).

Show
Benjamin Bentmann added a comment - This was actually a bug in the Maven core (MNG-3885).

People

Vote (4)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: