Archiva, maven-metadata.xml and versions (latest, release)

2007-10-09 Thread Duncan Doyle
Hello,

I've setup an Archiva server (1.0-beta-2) on a Debian Linux machine (Tomcat
6.0.14, Sun JVM 1.5.0_12). I have a managed local repository
(internal-central) which is connected via a proxy connector to the central
repository. I have another managed local repository (release) for my own
development and deployment. I've created a Maven2 plugin (to deal with our
CA Harvest SCM system) which I deploy to the release repository. The
generated maven-metadata.xml file looks as follows:

?xml version=1.0 encoding=UTF-8?metadata
  groupIdorg.test.maven.plugins/groupId
  artifactIdmaven-harvest-plugin/artifactId
  version1.0/version
  versioning
latest1.0/latest
release1.0/release
versions
  version1.0/version
/versions
lastUpdated20071009112946/lastUpdated
  /versioning
/metadata

When I then use a client to retrieve the pluging (by calling the 'mvn
harvest:update' mojo), I get the following error:
The plugin 'org.test.maven.plugins:maven-harvest-plugin' does not exist or
no valid version could be found

When I look at the 'maven-metadata.xml' file in the repository it contains
this:

?xml version=1.0 encoding=UTF-8?

metadata
  groupIdorg.test.maven.plugins/groupId
  artifactIdmaven-harvest-plugin/artifactId
  versioning
versions
  version1.0/version
/versions
  /versioning
/metadata

For some reason, Archiva has regenerated the 'maven-metadata.xml' file,
removing the 'latest','release' and 'lastUpdated' version information. This,
as far as I know, results in the 'no valid version could be found' error.

I've seen this behaviour also on the proxied repository
(internal-central). For example when proxying spring jars, I notice that
the 'latest' and 'release' version information, which is present in the
metadata files at 'repo1.maven.org', are not present in the local central
repository.

The regeneration seems to happen even when the 'metadata-updater' consumer
is switched off (it doesn't update the metadata when scanning the repository
when it is switched off, but the metadata is regenerated when a client tries
to download the plugin).

My question is whether this is expected behaviour or whether it's a bug? The
workaround for my problem is to specify the exact version of the plugin to
be used in my pom.xml, which is something I don't want because the plugin is
under heavy development. I also don't seem to understand why Archiva should
even regenerate the 'maven-metadata.xml' files.

With kind regards,

Duncan Doyle


Re: Deploy Maven 1 artifacts to Archiva

2007-10-09 Thread Brett Porter
What version of Maven are you using? I believe webdav can work under
1.1, though I haven't tried it.

You can also use an alternate deployment technique (scp, ftp) to drop
it directly into the repository directory on the server - Archiva will
pick it up on the next repository scan.

Cheers,
Brett

On 10/10/2007, Zach Legein [EMAIL PROTECTED] wrote:
 Hi All,



 How can I deploy an internal maven1 artifact as a snapshot to Archiva?
 It seems I need to use wagon-webdav, which doesn't exists for maven1.
 How do I configure my project.properties file to do this?



 Thanks



 -zach






-- 
Brett Porter
Blog: http://www.devzuz.org/blogs/bporter/