Ok, thanks Stephen.

For the boolean parameter, processDependencies, the documentation
<http://mojo.codehaus.org/versions-maven-plugin/set-mojo.html> states,
"Whether to process the dependencies section of the project."

Apparently I mis-interpreted that. I think it would be helpful to edit the
documentation, to be more clear. Perhaps, 'whether to process module
dependencies in the dependencies section of the project sub-modules poms' ?
Hmm, that's not so good either...it's difficult to describe without a
picture...but I think I get it now:

for artifact A, with modules B, C, D, if module D depends on module B,
then setting processDependencies=true will change the version of the module
B dependency in module D.


On Thu, Aug 28, 2014 at 2:12 AM, Stephen Connolly <
stephen.alan.conno...@gmail.com> wrote:

> Versions:set sets the version of the project and updates any references to
> that project in the reactor. It does not change other dependencies.
>
>
> On Thursday, 28 August 2014, Jam Levi <jamlev...@gmail.com> wrote:
>
>> I have run the following command in anticipation of dependency versions
>> changing from 4.11.1-SNAPSHOT to 4.11.0:
>>
>> versions:set -X
>> -DprocessDependencies=true
>> -DgenerateBackupPoms=false
>> -DoldVersion=4.11.1-SNAPSHOT
>> -DnewVersion=4.11.0
>> -DprocessParent=false
>> -DprocessPlugins=false
>> -DprocessProject=false
>> -DallowSnapshots=true
>>
>>  I have observed that this does not work.
>>
>> Another issue is that -X output is useless. This is a general problem
>> throughout maven, but debug output should give a clue as to what is
>> happening and it does not. To illustrate, here is the debug output:
>>
>> [DEBUG] Configuring mojo
>> 'org.codehaus.mojo:versions-maven-plugin:2.1.company:set' with basic
>> configurator -->
>> [DEBUG]   (f) allowSnapshots = true
>> [DEBUG]   (f) artifactId = report
>> [DEBUG]   (f) generateBackupPoms = false
>> [DEBUG]   (f) groupId = com.company
>> [DEBUG]   (f) localRepository =        id: local
>>       url: file:///var/lib/jenkins/.m2/repository/
>>    layout: none
>>
>> [DEBUG]   (f) newVersion = 4.11.0
>> [DEBUG]   (f) oldVersion = 4.11.1-SNAPSHOT
>> [DEBUG]   (f) processDependencies = true
>> [DEBUG]   (f) processParent = false
>> [DEBUG]   (f) processPlugins = false
>> [DEBUG]   (f) processProject = false
>> [DEBUG]   (s) project = MavenProject: com.company:report:4.11.1-SNAPSHOT
>> @
>> /mnt/cloud/var/lib/jenkins/workspace/RELEASE_PROCESSOR/re_release/artifacts/re_release_report/pom.xml
>> [DEBUG]   (f) reactorProjects = [MavenProject:
>> com.company:report:4.11.1-SNAPSHOT @
>> /mnt/cloud/var/lib/jenkins/workspace/RELEASE_PROCESSOR/re_release/artifacts/re_release_report/pom.xml]
>> [DEBUG]   (f) remoteArtifactRepositories = [       id: nexus
>>       url: https://nexus.va.company.it/nexus/content/groups/public
>>    layout: default
>> snapshots: [enabled => true, update => daily]
>>  releases: [enabled => true, update => daily]
>> ]
>> [DEBUG]   (f) remotePluginRepositories = [       id: nexus
>>       url: https://nexus.va.company.it/nexus/content/groups/public
>>    layout: default
>> snapshots: [enabled => true, update => daily]
>>  releases: [enabled => true, update => daily]
>> ]
>> [DEBUG]   (f) serverId = serverId
>> [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@3d2f3481
>> [DEBUG]   (f) settings =
>> org.apache.maven.execution.SettingsAdapter@4737f519
>> [DEBUG]   (f) updateMatchingVersions = true
>> [DEBUG] -- end configuration --
>> [INFO] Searching for local aggregator root...
>> [DEBUG] Checking to see if
>> /mnt/cloud/var/lib/jenkins/workspace/RELEASE_PROCESSOR/re_release/artifacts
>> is an aggregator parent
>> [DEBUG] Local aggregation root is
>> /mnt/cloud/var/lib/jenkins/workspace/RELEASE_PROCESSOR/re_release/artifacts/re_release_report
>> [INFO] Local aggregation root:
>> /mnt/cloud/var/lib/jenkins/workspace/RELEASE_PROCESSOR/re_release/artifacts/re_release_report
>> [DEBUG] Finding child modules...
>> [DEBUG] Child modules:
>> [DEBUG] None.
>> [DEBUG] Removing child modules which are missing...
>> [DEBUG] After removing missing
>> [DEBUG] None.
>> [DEBUG] Processing root module as parent
>> [DEBUG] Looking for modules which use com.company:report as their parent
>> Props: {project.version=4.11.1-SNAPSHOT, project.parent.version=4.11.0,
>> project.parent.groupId=com.company, project.artifactId=report,
>> project.groupId=com.company, project.parent.artifactId=main-parent}
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>>
>> Beyond indicating that the parameters I passed were set, it indicates
>> nothing at all. *Can anyone shed light onto why I cannot explicitly set
>> dependency versions with these arguments ? *
>>
>> On a side note, I am attempting to do this because one cannot use
>> versions:use-releases, because it "only replaces any -SNAPSHOT versions
>> with the corresponding release version." It does not replace -SNAPSHOT
>> versions with the latest release, as it should (or at least have an option
>> for). A versions:use-releases call would try to replace the version with
>> 4.11.1, which is not released.
>>
>> Thanks,
>>
>> James
>>
>>
>>
>>
>
> --
> Sent from my phone
>

Reply via email to