[ http://jira.codehaus.org/browse/WAGONFTP-8?page=comments#action_54058 ]
John Wells commented on WAGONFTP-8:
-----------------------------------
The AIOOB exception can be fixed by changing the following line:
(@ approximately line 329 in file FtpWagon.c - the 1.0-alpha-5 version)
if ( ftpFiles == null )
{
throw new ResourceDoesNotExistException( "Could not find file: '" + resource
+ "'" );
}
long contentLength = ftpFiles[0].getSize();
to this:
(@ approximately line 329 in file FtpWagon.c - the 1.0-alpha-5 version)
if ( ftpFiles == null || ftpFiles.length <= 0)
{
throw new ResourceDoesNotExistException( "Could not find file: '" + resource
+ "'" );
}
long contentLength = ftpFiles[0].getSize();
I have no idea whether or not this will fix the underlying problem (that the
previous line is returning an empty array) or not. I can't seem to make my
ant-task pick up my local:
1.0-alpha-6-SNAPSHOT
version. I keep getting the following error:
Buildfile: build.xml
deploy:
[artifact:install-provider] Installing provider:
org.apache.maven.wagon:wagon-ftp:jar:1.0-alpha-6-SNAPSHOT
[artifact:deploy] Deploying to ftp://lcjms1.bea.com
[artifact:deploy] [INFO] Retrieving previous build number from remote
[artifact:deploy] [ERROR] Nonexistent component: org.apache.maven.wagon.Wagonftp
[artifact:deploy] [WARNING] repository metadata for: 'snapshot
com.bea.core:dioce:1.1-SNAPSHOT' could not be retrieved from repository: remote
due to an error: Unsupported Protocol: 'ftp': Cannot find wagon which supports
the requested protocol: ftp
[artifact:deploy] [INFO] Repository 'remote' will be blacklisted
[artifact:deploy] [ERROR] Nonexistent component: org.apache.maven.wagon.Wagonftp
[artifact:deploy] An error has occurred while processing the Maven artifact
tasks.
[artifact:deploy] Diagnosis:
[artifact:deploy]
[artifact:deploy] Error deploying artifact 'com.bea.core:dioce:jar': Error
deploying artifact: Unsupported Protocol: 'ftp': Cannot find wagon which
supports the requested protocol: ftp
[artifact:deploy] Component descriptor cannot be found in the component
repository: org.apache.maven.wagon.Wagonftp.
[artifact:deploy]
I would love to help out more if someone could tell me how to make the ant-task
pick up my newer version of the plugin properly. Or I can spend time and
figure it out myself.
John Wells (Aziz)
[EMAIL PROTECTED]
> ArrayIndexOutOfBoundsException upon deploy
> ------------------------------------------
>
> Key: WAGONFTP-8
> URL: http://jira.codehaus.org/browse/WAGONFTP-8
> Project: wagon-ftp
> Type: Bug
> Environment: Win xp, sp2
> Reporter: Michael Fiedler
>
>
> I am trying to deploy for the first time. I am using wagon-ftp, 1.0-alpha-4
> as an extension for a maven 2 deploy goal. The repository location (on the
> host) is new and empty.
> c:\...> .../bin/mvn clean:clean install deploy
> ...
> [INFO] [deploy:deploy]
> [INFO] Retrieving previous build number from M2_repo_ftp
> Uploading:
> ftp://host/com/company/modules/1.0-SNAPSHOT/modules-1.0-20051202.165702-1.pom
> 4K uploaded
> [INFO] Retrieving previous metadata from M2_repo_ftp
> [INFO]
> ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] 0
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.ArrayIndexOutOfBoundsException: 0
> at
> org.apache.maven.wagon.providers.ftp.FtpWagon.fillInputData(FtpWagon.java:326)
> at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
> at
> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:367)
> at
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:295)
> at
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:334)
> at
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.deploy(DefaultRepositoryMetadataManager.java:379)
> at
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:83)
> at
> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:138)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
> [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]