[ http://jira.codehaus.org/browse/WAGONFTP-6?page=all ]

Brett Porter updated WAGONFTP-6:
--------------------------------

    Fix Version: 1.0-alpha-5

> deploy fails if metadata doesn't already exist on the repo
> ----------------------------------------------------------
>
>          Key: WAGONFTP-6
>          URL: http://jira.codehaus.org/browse/WAGONFTP-6
>      Project: wagon-ftp
>         Type: Bug
>     Versions: 1.0-alpha-4
>  Environment: WinXP
>     Reporter: Brian Fox
>      Fix For: 1.0-alpha-5

>
>
> If I try to deploy a new project using ftp, it fails trying to retreive the 
> previous metadata. See stack trace below. If I use file as the deploy type 
> first, then everything is ok. I compared the code of the file and ftp wagon 
> and found that the ftp wagon is throwing a TransferFailedException in the 
> case of a missing file. I changed the code to this:
>            is = ftp.retrieveFileStream( PathUtils.filename(
> resource.getName() ) );
>  //handle missing file
>             if ( is == null )
>             {
>                 throw new ResourceDoesNotExistException( "File: " +
> resource.getName() + " does not exist" );
>             } 
> And this seems to have solved the problem. I'm not positive if this is the 
> most effective way to fix it, but does solve my problem for now and should 
> give a giant headstart to a correct fix.
> Uploading:
> ftp://sv1/stc-maven-repo/com/stchome/shared/supplementaldata/1.0/supplem
> entaldata-1.0.jar
> 2K uploaded
> [INFO] Retrieving previous metadata from STCRepo [INFO]
> ------------------------------------------------------------------------
> ----
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Diagnosis: Error deploying artifact [INFO]
> ------------------------------------------------------------------------
> ----
> [DEBUG] Trace:
>  
> org.apache.maven.plugin.MojoExecutionException: Error deploying artifact
>         at
> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:154)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:417)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:554)
>  
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> ycle(DefaultLifecycleExecut
> or.java:508)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
> ifecycleExecutor.java:494)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.ja
> va:307)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
> ycleExecutor.java:149)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:217)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:247)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         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.artifact.deployer.ArtifactDeploymentException: Error 
> deploying artifact:
>         at
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Defaul
> tArtifactDeployer.java:95)
>         at
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Defaul
> tArtifactDeployer.java:53)
>         at
> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:142)
>         ... 16 more
> Caused by:
> org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException:
> Unable to retrieve metadata
>         at
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataM
> anager.resolveAlways(Defaul
> tRepositoryMetadataManager.java:287)
>         at
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataM
> anager.deploy(DefaultReposi
> toryMetadataManager.java:311)
>         at
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Defaul
> tArtifactDeployer.java:83)
>         ... 18 more
> Caused by: org.apache.maven.wagon.TransferFailedException:
> ftp://sv1/stc-maven-repo - Could not open input str eam for resource:
> '[EMAIL PROTECTED]'
>         at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:76)
>         at
> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(Defa
> ultWagonManager.java:347)
>         at
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadat
> a(DefaultWagonManager.java:
> 276)
>         at
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataM
> anager.resolveAlways(Defaul
> tRepositoryMetadataManager.java:273)
>         ... 20 more
> [INFO]
> ------------------------------------------------------------------------
> ----

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to