maven in 5 min not working - maven-2

I have downloaded latest
maven 3.0.3, java version "1.6.0_18".
mvn –version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: C:\software\apache-maven-3.0.3
Java version: 1.5.0_05, vendor: Sun Microsystems Inc.
Java home: C:\software\jdk1.5.0.15\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
My application located at: C:\Temp\ecm_esv\app\ENT_APP\ESV>. I am getting following error message:
C:\Temp\ecm_esv\app\ENT_APP\ESV>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.5/maven-deploy-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.5: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.5
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0.1/maven-site-plugin-2.0.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:2.0.1: Plugin org.apache.maven.plugins:maven-site-plugin:2.0.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:2.0.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.0/maven-release-plugin-2.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.0: Plugin org.apache.maven.plugins:maven-release-plugin:2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.0
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.406s
[INFO] Finished at: Mon Apr 18 15:51:05 CEST 2011
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Temp\ecm_esv\app\ENT_APP\ESV), central (http://repo1.maven.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
C:\Temp\ecm_esv\app\ENT_APP\ESV>
C:\software\apache-maven-3.0.3\conf\settings.xml
I have enabled proxies here as:
….
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|-->
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>www.BT.co.uk</host>
<port>80</port>
<nonProxyHosts>localhost|google.com</nonProxyHosts>
</proxy>
</proxies>
What is the problem I am facing here? Why it is not downloading?

Found solution:
Solution #1:
issue was with proxy in settings.xml file:
<host>webproxy</host>
to get host goto IE->tools->connection->LAN settings->advanced->http.
=====
Solution #2:
if auto configured proxy is given: then
1> open IE(or any browser)
2> get the url address from your browser through IE->Tools->internet option->connections->LAN Settings-> get address and give in url eg: as http://autocache.abc.com/ and enter, a file will be downloaded with .pac format, save to desktop
3> open .pac file in textpad, identify PROXY:
In your editor, it will come something like:
return "PROXY web-proxy.ind.abc.com:8080; PROXY proxy.sgp.abc.com:8080";
4> go to Maven settings.xml and enter as:
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>web-proxy.ind.abc.com</host>
<port>8080</port>
</proxy>
5> run mvn:install through command prompt or run through eclipse.
=====
Solution #3:
For any other issues delete maven local repository and run mvn:install again.

Clearly this is an issue of proxy. Either use VPN or edit procy setting in setting.xml.
I searched lot about this error. Finally, I used VPN(Virtual private network ) to disable the proxy and was able to use cemtral repository of Maven.

Window-Preferences-Maven-User Settings. Check, does settings.xml exists? if eclipse says no, get settings.xml from you friend or set the path to it.

Try checking proxy settings in settings.xml file located under following directory:
C:\Users\UserName\.m2

I just copied setting.xml which comes under "\apache-maven-3.1.1\conf" directory, to the directory "${user.home}/.m2/)" of windows machine and change the required proxy setting according to my network as below and it worked for me.
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>www-proxy.xxxx</host>
<port>8080</port>
</proxy>
Thanks --
Kamran Shahzad

We have observed that the maven project creation fails when it tries to download the archtype from this URL: Maven Repository which falls under "https" protocol.
So solution #2 mentioned above worked only after a little change to the settings.xml. Instead of using "http" protocol I have to use "https"
<proxy>
<id>optional</id>
<active>true</active>
<protocol>https</protocol>
<host>web-proxy.ind.abc.com</host>
<port>8080</port>
Hope it helps someone.
Note: Make sure that you check the following internet settings.
Internet Explorer > Internet Options > Connections [TAB] > LAN Settings > Under Proxy server check Use proxy server for LAN > Advanced > Check "same proxy server for all protocols" and Click OK.

Adding below under proxy tag in settings.xml worked for me
<proxy>
<id>optional</id>
<active>true</active>
<protocol>https</protocol>
<host>web-proxy.ind.abc.com</host>
<port>8080</port>
</proxy>

Related

Not able to execute scripts from Jenkins although working fine locally & via command line

I am Not able to run scripts from Jenkins. How ever working fine from Command line & Local. I am within office network. Getting Below Error. I don't understand why Jenkins is trying to download Maven plugin? I am new to Jenkins. Any suggestion will be appretiated.
[INFO] ------------------------< Test:Junit-Demo >-------------------------
[INFO] Building Junit-Demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.695 s
[INFO] Finished at: 2018-04-11T14:29:52-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.68.215] failed: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding="UTF-8"
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Maven, triggered by Jenkins, downloads the maven-clean-plugin as part of its normal execution. This happened on your location machine in the first run and was then cached in ~/.m2/.
Your Jenkins build agent, however, cannot connect to the server from which maven downloads artifacts:
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.68.215] failed: Connection timed out: connect
Make sure that there is no firewall involved blocking these connections or configure Jenkins to use a local artifact repository (like Nexus or Artifactory).
Missing some info to fully know what's wrong.
To use maven in Jenkins you have to install the jenkins maven plugin and call the binary in your Jenkins file.
Did you have to do any maven configuration for your local set up?
ie inside ~/.m2 is usually where you would set up your account for nexus credentials inside settings.xml.
You would have to do this same config on your jenkins machine, either in the Jenkins user account's ~/.m2 or inside the maven plugin folder.

Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5

I am new to Maven,
I want to install all the artifacts to my local maven, when i tried to run my script.Got bellow error.
[INFO] Scanning for projects...Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or on
e of its dependencies could not be resolved: Failed to read artifact descriptorfor org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Please help in resolving this issue. What do i need to do in my setting.xml, which proxy ip i need to give as my poxy is been disabled on my system.

error in deploying jar to remote repository in maven

i am trying to deploy a jar file from my local machine to a remote machine which has an artifactory. I tried the following command :
mvn deploy:deploy-file -DgroupId=<some-id>
-DartifactId=<some-artifact>
-Dversion=<version>
-Dpackaging=jar
-Dfile=<path to the file in my local system>
-Durl=http://<ip of remote machine>:<port>/artifactory/repo/
-DrepositoryId=<artifactory -id in remote machine>
but on executing it gives error that:
[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] -----------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] -----------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for 'deploy:
ploy-file'
[0] Inside the definition for plugin 'maven-deploy-plugin' specify the following
:
<configuration>
...
<url>VALUE</url>
</configuration>
-OR-
on the command line, specify: '-Durl=VALUE'
As i am specifying the value for Durl in my command why am i still getting this error?
How to resolve this?
The maven version is 2.2.1
Thanks.
Answered in comments:
Not sure about the Maven error itself, but I did notice that the
deployment URL points to Artifactory's "/repo" repository (which is a
global virtual aggregator of all the repositories in the instance);
since it's a virtual repository, one cannot deploy to it; you should
point the URL to one of Artifactory's local repositories
(libs-release-local, etc.). – noamt Jan 20 '12 at 8:44
i changed it to local repo name but still same error – pranay Jan 20
'12 at 13:02
yes i got it wokring now..actually was putting the wrong url ..thanks
a lot – pranay Jan 25 '12 at 6:33

Maven : Parent project not resolved, transitive dependencies not used for compiling

After searching and trying a lot of things I need a Maven maven :)
So, my problem is that on my development box (which is Windows 2003) I can build my maven project, but on the Bamboo server (x86_64 x86_64 x86_64 GNU/Linux) it fails because one of the modules doesn't have a library and the compiling doesn't find a class.
The class is found in a transitive dependency, dependency that it seems to me that is not resolved.
I've run the command "mvn -X clean install" on both boxes and compared the output.
The only change I think it's relevant is
On dev-box
[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: pl.com.abg.iacsro:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.
On Bamboo box
[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: null:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.
It seems to me that maven doesn't resolve the parent of the module, because later in the build process I've seen (on Bamboo box)
[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[DEBUG] Reason: Failed to validate POM for project pl.com.abg.iacsro:sapscndp-claimprocessing-api at Artifact [pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided]
Validation Errors:
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:systemcore-jobs-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:workflow-crossconflictresolution-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:iacs-commons-objectfactory:jar
[DEBUG] 'dependencies.dependency.version' is missing for ro.siveco.iacsro:farmerregistry-api:jar
I've also found this
[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.
but I've checked and validated myself the pom of the dependency against the xsd, so the pom is valid.
Do you have any idea how to resolve this ?
Many thanks!
P.S. : In case maybe I've overlooked something, here's the full listing from the Bamboo box http://dl.dropbox.com/u/402296/install.txt
When I see such an entry:
[DEBUG] Connecting to repository: 'Artifactory-internal-repository' with url: 'http://192.168.0.59:8081/artifactory/repo'.
Downloading: http://192.168.0.59:8081/artifactory/repo/pl/com/abg/iacsro/onthespotcheck/1.0-SNAPSHOT/onthespotcheck-1.0-SNAPSHOT.pom
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG] Artifact resolved
[WARNING] POM for 'pl.com.abg.iacsro:onthespotcheck-checks-api:pom:DEV2009_2:provided' is invalid.
I'm tempted to ask if there is anything particular to say about onthespotcheck-1.0-SNAPSHOT.pom?
As a side note, you have a bunch of:
for project: null:artifactId:version
that I find pretty weird. Why is the groupId null? Anything worth to mention about your pom?

Maven FTP distribution problem

maven release:perform is failing to distribute via FTP.
The first thing I checked is that I can access the target server with the given credentials from the command line. I can with passive FTP but not with active FTP (known firewall restriction). What I can see from googling is that Maven uses passive FTP by default. Is that correct? If not, how can I cause it to use passive FTP?
Assuming Maven is using passive FTP, I would appreciate any other advice.
My configuration:
settings.xml:
<servers>
<server>
<id>repo-ftp</id>
<username>myUserName</username>
<password>myPassword</password>
</server>
</servers>
parent POM:
<distributionManagement>
<repository>
<id>repo-ftp</id>
<url>ftp://myServer</url>
</repository>
<snapshotRepository>
<id>repo-ftp</id>
<url>ftp://myServer</url>
</snapshotRepository>
</distributionManagement>
The error message:
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] FATAL ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] org.apache.maven.wagon.AbstractWagon.openConnection()V
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Trace
[INFO] java.lang.AbstractMethodError: org.apache.maven.wagon.AbstractWagon.openConnection()V
[INFO] at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:143)
[INFO] at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:235)
[INFO] at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:153)
[INFO] at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80)
[INFO] at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:162)
[INFO] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
[INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
[INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
[INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
[INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
[INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
[INFO] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
[INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
[INFO] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
[INFO] at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:616)
[INFO] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
[INFO] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[INFO] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
[INFO] at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 16 seconds
[INFO] [INFO] Finished at: Wed Oct 21 17:43:11 UTC 2009
[INFO] [INFO] Final Memory: 25M/47M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'
UPDATE
I did have an extension node in the parent POM:
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-beta-5</version>
</extension>
After reviewing the reply from cetnar I realized that I need beta-2 for my particular version of maven. When I switched the extension node to reference beta-2, maven properly complained about not having it available. So, I downloaded and installed using
mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-ftp -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=./wagon-ftp-1.0-beta-2-sources.jar
(which is a cut-and-paste from the error message I got, with my local copy of the .jar in the appropriate location).
Now, I get:
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Error deploying artifact: Unsupported Protocol: 'ftp': Cannot find wagon which supports the requested protocol: ftp
[INFO]
[INFO] Component descriptor cannot be found in the component repository: org.apache.maven.wagon.Wagonftp.
Any advice for that problem?
UPDATE 2
I did not have wagon-ftp.jar or commons-net.jar in $M2_HOME/lib but do now. I get the same error.
$M2_HOME/lib:
commons-cli.jar -> ../../java/commons-cli.jar
commons-net.jar -> ../../java/commons-net.jar
doxia-sink-api.jar -> ../../java/doxia-sink-api.jar
jsch.jar -> ../../java/jsch.jar
jtidy.jar -> ../../java/jtidy.jar
maven2.jar -> ../../java/maven2.jar
plexus-container-default.jar -> ../../java/plexus-container-default.jar
plexus-interactivity-api.jar -> ../../java/plexus-interactivity-api.jar
plexus-utils.jar -> ../../java/plexus-utils.jar
wagon-file.jar -> ../../java/wagon-file.jar
wagon-ftp-1.0-beta-2.jar -> ../../java/wagon-ftp.jar
wagon-ftp.jar -> ../../java/wagon-ftp.jar
wagon-http-lightweight.jar -> ../../java/wagon-http-lightweight.jar
wagon-http-shared.jar -> ../../java/wagon-http-shared.jar
wagon-provider-api.jar -> ../../java/wagon-provider-api.jar
wagon-ssh-common.jar -> ../../java/wagon-ssh-common.jar
wagon-ssh-external.jar -> ../../java/wagon-ssh-external.jar
wagon-ssh.jar -> ../../java/wagon-ssh.jar
xml-apis.jar -> ../../java/xml-apis.jar
Note that all other dependencies were deployed using symbolic links to another directory so I continued the same pattern. Access rights are the same for all files. I tried providing both a wagon-ftp.jar and wagon-ftp-1.0-beta-2.jar symbolic link.
I'm not very excited about the prospect of upgrading to the latest version of maven (for fear of new problems), but is that my best option? Any other ideas?
SOLUTION
It worked! Kind of. Now I get an authentication error, but that's a different issue.
The a-ha moment was the mention of -sources and I realized I had downloaded wagon-ftp-1.0-beta-2-sources.jar but installed with -Dversion=1.0-beta-2 (no -sources)... so I copied the sources JAR to the binary jar file name :-).
Thank you all for your help with this!
The setup looks good. And yes, passive mode is the default (see WAGON-143). That said, according to the trace (java.lang.AbstractMethodError is thrown when something tries to call an abstract method), it's obvious that your wagon isn't compatible with your version of maven. Wagon madness...
It's surely not the best place but this is actually documented in the Guide to using Extenstions (pay a special attention to the "Note" at the bottom):
Extensions are used to enable Wagon
providers, used for the transport of
artifact between repositories, and
plug-ins which provide lifecycle
enhancements. Wagon providers
<project>
...
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-beta-2</version>
</extension>
</extensions>
</build>
...
</project>
Note: Wagon 1.0-beta-3+ requires Maven 2.1.0 or above. For Maven 2.0.10
and earlier, use Wagon 1.0-beta-2.
EDIT: About the new error, the maven deploy plugin FAQ describes something very similar:
If you are using the deploy:deploy-file goal and encounter this error:
"Error deploying artifact: Unsupported Protocol: 'ftp': Cannot find wagon which supports the requested protocol: ftp"
Then you need to place the appropriate wagon provider in your %M2_HOME%/lib. In this case the provider needed is ftp, so we have to place the wagon-ftp jar in the lib directory of your Maven 2 installation.
If the error description is something like this:
"Error deploying artifact: Unsupported Protocol: 'ftp': Cannot find wagon which supports the requested protocol: ftp org/apache/commons/net/ftp/FTP"
Then you need to place the commons-net jar in %M2_HOME%/lib.
I don't get why one would have to do that but try to put wagon-ftp-1.0-beta-2.jar in %M2_HOME%/lib.
EDIT2: I've read the question again and it looks like you did install a "sources" jar which, of course, doesn't contain the required classes for the runtime. Before following the advice above, try to put wagon-ftp-1.0-beta-2.jar in your repository (and not wagon-ftp-1.0-beta-2-sources.jar).
Did you define wagon-ftp as a extension in your pom?
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-alpha-3</version>
</extension>
</extensions>
If yes I thing the problem is in wrong versions maven and wagon-ftp. Here is one article about this problem.
In maven-user-list I found that you need to use 1.0-beta-2 of the ftp wagon with 2.0.9. 1.0-beta-3 will work with 2.0.10 and Wagon 1.0-beta-5 release will only work as an extension in Maven 2.1.0-M1 and above.