lastUpdated is not showing in maven-metadata.xml
I have an issue with an artifact's maven-metadata.xml is not showing up. Here is the environment i am working on: Apache Archiva , Ivy, ant.
Problem: When I am Deploying artifact via the Web UI Form, I am able to see all the attributes in maven-metadata.xml.
<metadata>
<groupId>twitter evt</groupId>
<artifactId>authentication</artifactId>
<versioning>
<latest>1.1</latest>
<release>1.1</release>
<versions>
<version>LATEST</version>
<version>1.0</version>
<version>1.1</version>
</versions>
<lastUpdated>20090729142510</lastUpdated>
</versioning>
</metadata>
But when i开发者_如何学JAVA deploy the artifact through ivy by command prompt (ant publish-latest -Dversion=1.0.3), artifact is updating fine with latest changes but artifact's maven-metadata.xml is missing attribute with latest time stamp.
<metadata>
<groupId>twitter evt</groupId>
<artifactId>twitter_account_management</artifactId>
<versioning>
<latest>1.1.1</latest>
<release>1.1.1</release>
<versions>
<version>LATEST</version>
<version>1.0</version>
<version>1.0.1</version>
<version>1.0.2</version>
<version>1.0.3</version>
<version>1.0.4</version>
<version>1.0.5</version>
<version>1.1</version>
<version>1.1.1</version>
</versions>
</versioning>
</metadata>
Here is my ant publish-latest target:
<target name="publish_latest" depends="_loadantcontrib,dist" >
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
<ivy:resolve file="${ant.dir}/ivy.xml" transitive="false" />
<ivy:findrevision organisation="${ivy.organisation}" module="${ivy.module}" revision="latest.integration"/>
<echo message="looking in: ${basedir}/${build_distdir}/${jar_tcs_libdir}/${component.distfilename}/${component_version}/" />
<ivy:publish resolver="ibiblio" artifactspattern="${basedir}/${build_distdir}/${jar_tcs_libdir}/${component.distfilename}/${component_version}/[artifact].[ext]" pubrevision="${version}" overwrite="true" update="true"/>
</target>
Please help me on this issue, I struck at this point in process of getting the latest artifact.
I'm not familiar with this aspect of Ivy, but there's potential that it's a bug in Ivy that doesn't write the field.
One potential way to correct this is to turn on Archiva's automated metadata correction. Try enabling the metadata-updater consumer in the Consumers of Known Content section at the bottom of the Repository Scanning admin page, then deploy the artifact again.
More information is available here: http://archiva.apache.org/docs/1.3/adminguide/consumers.html
精彩评论