You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Brian E. Fox" <br...@reply.infinity.nu> on 2005/10/07 19:32:55 UTC

RE: FTP Deploy can't open input stream? --bug fix.

Looks like a bug. I added code to wagon-ftp to handle the case where the
file is missing (mostly copied from the wagon-file):
           is = ftp.retrieveFileStream( PathUtils.filename(
resource.getName() ) );
 //handle missing file
            if ( is == null )
            {
                throw new ResourceDoesNotExistException( "File: " +
resource.getName() + " does not exist" );
            } 

Otherwise it was throwing TransferFailedException which apparently
caused the api provider to hard stop.

I have to say that I am completely in awe at how easy it was to retreive
the code and build these plugins from scratch using maven. It's so nice
to not have to worry about finding all the proper dependencies when you
just want to jump in feet first. I can't wait until we can get this into
production.

-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, October 07, 2005 10:42 AM
To: Maven Users List
Subject: RE: FTP Deploy can't open input stream?

Apparently the problem isn't with my new project. I cleaned the
repository and retried my test project and it fails the same way. I
replaced the ftp with file like this:
  	<repository>
  		<id>STCRepo</id>
		<url>file:///X:/Maven/STC</url>
    	</repository>
And now it's ok. Is this a misconfiguration still or did I find a bug in
the ftp wagon? 

-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu]
Sent: Friday, October 07, 2005 10:19 AM
To: Maven Users List
Subject: FTP Deploy can't open input stream?

I was able to successfully make the ftp deploy work using Brett's
suggestions to add extensions. I created a new project that is from what
I can see, exactly the same as my test project except I get a new
exception. It seems to be getting hung up trying to "retrieve previous
metadata". I checked the repository, and the jar, md5 and .sh1 files are
there. What is missing is the metadata.xml file. Any pointers would be
appreciated!
 
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:
'org.apache.maven.wagon.resource.Resource@76e8a7'
        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]
------------------------------------------------------------------------
----
 
 
POM:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
 
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.stchome.shared</groupId>
  <artifactId>supplementaldata</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>Supplemental Data Module</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.stchome.shared</groupId>
      <artifactId>phinvs</artifactId>
      <version>2.0a</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.stchome.shared</groupId>
      <artifactId>phinvs-browser</artifactId>
      <version>2.0a</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <distributionManagement>
   <repository>
    <id>STCRepo</id>
  <url>ftp://sv1/stc-maven-repo</url>
     </repository>
  </distributionManagement>
 
<build>
 <extensions>
  <extension>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-ftp</artifactId> 
     <version>1.0-alpha-3</version>
  </extension>
 </extensions>
</build>
 </project>
 


---------------------------------------------------------------------
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