You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marcin Kuthan <ma...@gmail.com> on 2010/12/22 16:44:52 UTC

metadata.versioning.release entry in maven-metadata.xml file is not updated by Maven 3

Hi

My assumption is that after artifact deployment into repository the
maven-metadata.xml is updated. The metadata.versioning.release element
should be updated to the latest deployed artifact version. The
assumption is true for Maven 2.2.1 but not for 3.0.1.

You can easily reproduce the issue with direct "mvn deploy:deploy
-DupdateReleaseInfo=true" call.
For Maven 2.2.1 the "metadata.versioning.release" element is updated
for Maven 3 not. In both cases the metadata file is uploaded into
repository and new "metadata.versioning.version" element is appended.

For testing I used the latest m-deploy-p, version 2.5.

Did I miss something about Maven 3 compatibility? There is no
information that "metadata.versioning.release" element in metadata is
handled by Maven 3 in different way.

Thanks,
Marcin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: metadata.versioning.release entry in maven-metadata.xml file is not updated by Maven 3

Posted by Marcin Kuthan <ma...@gmail.com>.
Thanks Benjamin. I will keep the artifacts in the repository for reference.

Marcin

On 23 December 2010 13:22, Benjamin Bentmann <be...@udo.edu> wrote:
> Marcin Kuthan wrote:
>
>> After 1.1 deployment latest release version has not been updated:
>>
>> http://code.google.com/p/m4enterprise/source/browse/release-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=806
>
> Good catch, filled as http://jira.codehaus.org/browse/MNG-4952.
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: metadata.versioning.release entry in maven-metadata.xml file is not updated by Maven 3

Posted by Benjamin Bentmann <be...@udo.edu>.
Marcin Kuthan wrote:

> After 1.1 deployment latest release version has not been updated:
> http://code.google.com/p/m4enterprise/source/browse/release-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=806

Good catch, filled as http://jira.codehaus.org/browse/MNG-4952.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: metadata.versioning.release entry in maven-metadata.xml file is not updated by Maven 3

Posted by Marcin Kuthan <ma...@gmail.com>.
Thanks for the link to the metadata reference.

I just checked again for released versions. First I cleaned up local
repository and remote repositories as well.

After 1.0 deployment latest release version has been updated:
http://code.google.com/p/m4enterprise/source/browse/release-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=798

After 1.1 deployment latest release version has not been updated:
http://code.google.com/p/m4enterprise/source/browse/release-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=806

When I switched back to Maven 2, latest release version has been updated:
http://code.google.com/p/m4enterprise/source/browse/release-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=814

After metadata reference lecture I checked again snapshot deployment:
http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=826
(Maven2)
http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=837
(Maven2)
http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=845
(Maven3)

>From the reference documentation:
latest		What the latest version in the directory is, including snapshots
release		What the latest version in the directory is, of the releases
snapshot		The current snapshot data in use for this version
versions/version*		(Many) Versions available for the artifact
lastUpdated		When the metadata was last updated
snapshotVersions/snapshotVersion*	(Many) The snapshot versions
available for the artifact.

It looks that "latest", "snapshot" and "snapshotVersions" elements are
not used at all. And "release" and "versions" elements are used
incorrectly.

Thanks,
Marcin

On 23 December 2010 12:06, Benjamin Bentmann <be...@udo.edu> wrote:
> Marcin Kuthan wrote:
>
>>
>> http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=770
>> The last revision 770 is a result of deploying 1.3-SNAPSHOT by Maven 2
>>
>> Only in the last case, when Maven 2 was used for deployment, element
>> "metadata.versioning.release" is defined.
>
> A snapshot is not a release and that Maven 2.x happily marks a snapshot as
> such is a bug.
>
>> Could you tell me where I can find the official reference for
>> maven-metadata format? Has it been changed since Maven 2.x?
>
> http://maven.apache.org/ref/3.0.1/maven-repository-metadata/repository-metadata.html
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: metadata.versioning.release entry in maven-metadata.xml file is not updated by Maven 3

Posted by Benjamin Bentmann <be...@udo.edu>.
Marcin Kuthan wrote:

> http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=770
> The last revision 770 is a result of deploying 1.3-SNAPSHOT by Maven 2
>
> Only in the last case, when Maven 2 was used for deployment, element
> "metadata.versioning.release" is defined.

A snapshot is not a release and that Maven 2.x happily marks a snapshot 
as such is a bug.

> Could you tell me where I can find the official reference for
> maven-metadata format? Has it been changed since Maven 2.x?

http://maven.apache.org/ref/3.0.1/maven-repository-metadata/repository-metadata.html


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: metadata.versioning.release entry in maven-metadata.xml file is not updated by Maven 3

Posted by Marcin Kuthan <ma...@gmail.com>.
Hi Benjamin

Thank you for test against foo:bar:1.0. Could you take another look at:

http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=748
Revision 748 is a result of deploying version 1.1-SNAPSHOT by Maven 3

http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=759
Next revision 759 is a result of deploying 1.2-SNAPSHOT by Maven 3

http://code.google.com/p/m4enterprise/source/browse/snapshot-repository/com/googlecode/m4enterprise/test1/maven-metadata.xml?r=770
The last revision 770 is a result of deploying 1.3-SNAPSHOT by Maven 2

Only in the last case, when Maven 2 was used for deployment, element
"metadata.versioning.release" is defined. For revisions 748 and 759 it
doesn't exist. You can checkout the example code from
http://m4enterprise.googlecode.com/svn/trunk/test1.

Could you tell me where I can find the official reference for
maven-metadata format? Has it been changed since Maven 2.x?

Thanks,
Marcin

On 22 December 2010 16:59, Benjamin Bentmann <be...@udo.edu> wrote:
> Marcin Kuthan wrote:
>
>> You can easily reproduce the issue with direct "mvn deploy:deploy
>> -DupdateReleaseInfo=true" call.
>
> I just ran "mvn deploy:deploy" on a project foo:bar:1.0:pom and got the
> expected metadata. So I can only suggest you fill an issue with a complete
> example project that eliminates any guess work about your setup.
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: metadata.versioning.release entry in maven-metadata.xml file is not updated by Maven 3

Posted by Benjamin Bentmann <be...@udo.edu>.
Marcin Kuthan wrote:

> You can easily reproduce the issue with direct "mvn deploy:deploy
> -DupdateReleaseInfo=true" call.

I just ran "mvn deploy:deploy" on a project foo:bar:1.0:pom and got the 
expected metadata. So I can only suggest you fill an issue with a 
complete example project that eliminates any guess work about your setup.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org