archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kyle Krull <kdkr...@gmail.com>
Subject Re: mvn deploy:deploy-file fails for 3rd party artifact
Date Fri, 06 Feb 2009 19:58:21 GMT
Deng,

Thanks for the suggestion.  I only have settings in one place
($USER_HOME/.m2/settings.xml), so this doesn't seem to have been the
problem in my case.  I think I may have figured it out though, as it
works fine if I switch to another directory.

It turns out that I originally attempted this command while working in
a directory that was for another project.  This other project (with a
different artifactId) has its own POM, which contains a
<distributionManagement> section.  No jars had been uploaded yet for
the project described by the POM.

I wasn't able to prove for sure that this was the cause, but it seems
to be more of an issue with the deploy plugin than with Archiva (which
seems to be working fine).

Hope this helps if anyone else runs into a similar issue.

Thanks,
Kyle

On Fri, Jan 23, 2009 at 3:20 AM, Maria Odea Ching <oching@apache.org> wrote:
> Hi Kyle,
>
> A co-worker of mine experienced the same problem.. he had the appropriate
> permissions and the correct configuration
> in his $M2_HOME/conf/settings.xml. He had another settings.xml configured in
> his $USER_HOME/.m2 directory though and when he removed that one,
> he was able to deploy successfully. I'm not sure if that would work for you
> as well, but it might be worth a try..
>
> Thanks,
> Deng
>
> On Tue, Jan 20, 2009 at 12:45 PM, Kyle Krull <kdkrull@gmail.com> wrote:
>
>> I'm trying to deploy a 3rd party jar file to Archiva 1.1.3 using the
>> following:
>>
>> $mvn -e deploy:deploy-file -DgroupId=jsr -DartifactId=jsr-305
>> -Dversion=0.1-SNAPSHOT -Dpackaging=jar -Dfile=ri-0.1-SNAPSHOT.jar -Durl=
>> http://IPADDR/archiva/repository/snapshots -DrepositoryId=snapshots
>>
>> It gives me back an error saying that it can't find metadata.xml.  That
>> doesn't make much sense - since this is the first time I'm deploying a jar
>> under these groupId/artifactId coordinates, I wouldn't expect there to be
>> any metadata yet.
>>
>> I've also tried the following alternatives, without any luck:
>> 1. Using the webdav method by applying the "dav:" prefix in front of the
>> URL, and I get a similar result.
>> 2. Using the admin login in settings.xml instead of my own admin-created
>> account (other posts suggested some sort of bug here)
>>
>> Is there something I'm missing?
>>
>> -Kyle
>>
>> Here are some details:
>> --settings.xml--
>> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
>>                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
>>    <servers>
>>        <server>
>>            <id>snapshots</id>
>>            <username>USER</username>
>>            <password>PASS</password>
>>        </server>
>>    </servers>
>>    <profiles/>
>>    <activeProfiles/>
>> </settings>
>>
>> --stack trace--
>>
>> + Error stacktraces are turned on.
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'deploy'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building Maven Default Project
>> [INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [deploy:deploy-file]
>> [INFO] Retrieving previous build number from snapshots
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Error retrieving previous build number for artifact
>> 'jsr:jsr-305:jar': repository me
>> tadata for: 'snapshot jsr:jsr-305:0.1-SNAPSHOT' could not be retrieved from
>> repository: sna
>> pshots due to an error: Error transferring file
>>
>> Server returned HTTP response code: 401 for URL: http://IPADDR/archiva
>> /repository/snapshots/jsr/jsr-305/0.1-SNAPSHOT/maven-metadata.xml<http://IPADDR/archiva/repository/snapshots/jsr/jsr-305/0.1-SNAPSHOT/maven-metadata.xml>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: Error retrieving
>> previous build num
>> ber for artifact 'jsr:jsr-305:jar': repository metadata for: 'snapshot
>> jsr:jsr-305:0.1-SNAP
>> SHOT' could not be retrieved from repository: snapshots due to an error:
>> Error transferring
>>  file
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycl
>> eExecutor.java:583)
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Defaul
>> tLifecycleExecutor.java:512)
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycle
>> Executor.java:482)
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>> (DefaultLifecycleExecutor.java:330)
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultL
>> ifecycleExecutor.java:227)
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExec
>> utor.java:142)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
>> a:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>        at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Error retrieving
>> previous build
>> number for artifact 'jsr:jsr-305:jar': repository metadata for: 'snapshot
>> jsr:jsr-305:0.1-S
>> NAPSHOT' could not be retrieved from repository: snapshots due to an error:
>> Error transferr
>> ing file
>>        at
>>
>> org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.java:243)
>>        at
>>
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.ja
>> va:451)
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycl
>> eExecutor.java:558)
>>        ... 16 more
>> Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException:
>> Error retrieving
>>  previous build number for artifact 'jsr:jsr-305:jar': repository metadata
>> for: 'snapshot j
>> sr:jsr-305:0.1-SNAPSHOT' could not be retrieved from repository: snapshots
>> due to an error:
>>  Error transferring file
>>        at
>>
>> org.apache.maven.artifact.transform.SnapshotTransformation.transformForDeploymen
>> t(SnapshotTransformation.java:106)
>>        at
>>
>> org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transfo
>> rmForDeployment(DefaultArtifactTransformationManager.java:78)
>>        at
>>
>> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifac
>> tDeployer.java:71)
>>        at
>>
>> org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.java:239)
>>        ... 18 more
>> Caused by:
>>
>> org.apache.maven.artifact.repository.metadata.RepositoryMetadataResolutionExcept
>> ion: repository metadata for: 'snapshot jsr:jsr-305:0.1-SNAPSHOT' could not
>> be retrieved fr
>> om repository: snapshots due to an error: Error transferring file
>>        at
>>
>> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.r
>> esolveAlways(DefaultRepositoryMetadataManager.java:352)
>>        at
>>
>> org.apache.maven.artifact.transform.SnapshotTransformation.resolveLatestSnapshot
>> BuildNumber(SnapshotTransformation.java:161)
>>        at
>>
>> org.apache.maven.artifact.transform.SnapshotTransformation.transformForDeploymen
>> t(SnapshotTransformation.java:100)
>>        ... 21 more
>> Caused by: org.apache.maven.wagon.TransferFailedException: Error
>> transferring file
>>        at
>>
>> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(Lightwe
>> ightHttpWagon.java:104)
>>        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
>>        at
>>
>> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagon
>> Manager.java:470)
>>        at
>>
>> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadataFromDep
>> loymentRepository(DefaultWagonManager.java:379)
>>        at
>>
>> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.g
>>
>> etArtifactMetadataFromDeploymentRepository(DefaultRepositoryMetadataManager.java:380)
>>        at
>>
>> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.r
>> esolveAlways(DefaultRepositoryMetadataManager.java:348)
>>        ... 23 more
>> Caused by: java.io.IOException: Server returned HTTP response code: 401 for
>> URL:
>>
>> http://IPADDR:8084/archiva/repository/snapshots/jsr/jsr-305/0.1-SNAPSHOT/maven-metada
>> ta.xml<http://IPADDR:8084/archiva/repository/snapshots/jsr/jsr-305/0.1-SNAPSHOT/maven-metadata.xml>
>>        at
>>
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.jav
>> a:1241)
>>        at
>>
>> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(Lightwe
>> ightHttpWagon.java:83)
>>        ... 28 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 1 second
>> [INFO] Finished at: Mon Jan 19 23:35:00 EST 2009
>> [INFO] Final Memory: 3M/6M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>
>
>
> --
> Maria Odea Ching
> Software Engineer | Exist Global | 687-4091 | Skype: maria.odea.ching |
> www.exist.com | Innovation Delivered
>

Mime
View raw message