I'm using Maven 3. I'm trying to deploy a third party artifact to a remote repository but am getting a strange error. The command I'm using to deploy is
mvn deploy:deploy-file -DgroupId=com.myco.util.ant \
-DartifactId=selenium-ant-task \
-Dversion=1.4 \
-Dpackaging=jar \
-Dfile=/Users/davea/.m2/repository/com/myco/util/ant/selenium-ant-task/1.4/selenium-ant-task-1.4.jar \
-DrepositoryId=sonatype-nexus \
-Durl=http://sonatype.myco.com/nexus/content/repositories/releases
And the error I get when I run this command is
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project maven-selenium-plugin: The parameters 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file are missing or invalid -> [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.
What's going on here? I have defined my repositoryId, "ssonatype-nexus" in my ~/.m2/settings.xml file and verified the credentials in there are correct.
Thanks for any help, - Dave
deploy:deploy-file is not intended to be run in a directory with a pom.xml file - you should run it somewhere else. If you want a specific POM uploaded with it, don't forget the -DpomFile argument as the default is to generate a basic one.
However, I notice that you're deploying a file from the local repository - if this was placed there by a Maven build you are certainly better to have that project do the deployment, using the <distributionManagement> element and deploy lifecycle phase.
Seems like your url is formatted incorrectly.
Try:
-Durl=file://path_to_m2_repo
See here for more.
Edit: Note, the URL is for the local repo in this case. Maven should deploy to a Nexus based on the POM and -DrepositoryId.
Related
I have downloaded the code using
git clone https://git.opendaylight.org/gerrit/p/integration/distribution.git
When I try to build this, it shows following error.
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM # line 4, column 11
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.opendaylight.integration:root:0.5.0-SNAPSHOT (/home/controller/distribution/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM # line 4, column 11 -> [Help 2]
[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/ProjectBuildingException
You need to make sure your settings.xml points to the OpenDaylight Nexus artifact repository. The simplest way to do this is to download https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml and place it in your ~/.m2 folder (wherever that is — it depends on your operating system).
Yes, your settings.xml should be updated. An alternative way of updating (though same result as above):
Run this from your terminal:
cp -n ~/.m2/settings.xml{,.orig} ; \wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
As suggested by stephen, path may be different based on your OS. Change it accordingly.
I am new to Apache Tez and Maven, I tried to install Apache Tez on my system. I used the following link to install ,
http://tez.apache.org/install.html
In that pom.xml present in the apache tez i have only changed hadoop and protobuf version equal to my environment which are following,
hadoop 2.2.0
libprotoc-2.4.1,
Tez-0.5.0
maven 3.0.5
java -1.7.0_65
While doing
“ mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true “
i got the following error,
Error :
[ERROR] /home/karthick/work/apache-tez-0.5.0-src/tez-plugins/tez-yarn-timeline-history/src/main/java/org/apache/tez/dag/history/logging/ats/ATSHistoryLoggingService.java:[195,9] cannot find symbol
[ERROR] symbol: class TimelinePutError
[ERROR] location: class org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService
[ERROR] -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :tez-yarn-timeline-history
I have gone through that file ATSHistoryLoggingService.java present in the apache tez, but i couldn't understand what was happening there. I dont know how to clear History logging Service.So I have tried again as newly. That time also i got the same error. I dont know how to proceed my installation process.
Can anyone help me to solve this problem ?
Thanks in advance.
Check the BUILDING.txt file at the top of the source tree. It has a pointer for "Building against a specific version of hadoop". You are missing a "-P!hadoop24" in your maven command. Also, I believe you need protobuf-2.5.0.
I´m trying to installing maven from Linux command line with a following command:
/opt/apache-maven-2.2.1/bin/mvn -r -Dclient=HSH -Dmaven.test skip=true install
however I keep getting the this:
Invalid task 'skip=true': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
what should I do to avoid this?
You want
-Dmaven.test.skip=true
i.e. you're missing a '.' before the skip
New to maven and equinox. While going through a tutorial on OSGi, I issued the following commmand.
pax-provision
which gave the following error.
-> Provision bundle [mvn:org.compass-project/compass/2.1.1, at default start level, bundle will be started, bundle will
be loaded from the cache]
-> Preparing framework [Equinox 3.6.0]
-> Downloading bundles...
-> Equinox 3.6.0 : connecting...
___
/ /
/ / Oops, there has been a problem!
/ /
/__/ URL [mvn:org.eclipse.osgi/org.eclipse.osgi/3.6.0.v20100517] could not be resolved.
___
/__/ Use --log=debug to see details.
Seems like the Equinox build is not available in the repository. So
1. Where to look for the repository which has the correct version. Is there any command or search tool??
2. I read, I may be able to install it locally, with the below command
mvn install:install-file -DgroupId=<your_group_name> \
-DartifactId=<your_artifact_name> \
-Dversion=<snapshot> \
-Dfile=<path_to_your_jar_file> \
-Dpackaging=jar \
-DgeneratePom=true
How can I get all those parameters (group id, artifactId etc)?
I could find 2 resource where I can get mvn packages.
http://mvnrepository.com/ and http://maven.ozacc.com/ . Please comment if this is the right place. I could get the artifact id etc from the search result. thanks
Newbie question since I'm not up to speed using
maven at all.
I'm trying to use scala + lift using scala 2.8, environment
is a win7 box if that matters.
I create a basic project using:
mvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=2.0-scala280-SNAPSHOT -DarchetypeRepository=http://scala-tools.org/repo-snapshots -DremoteRepositories=http://scala-tools.org/repo-snapshots -DgroupId=com.liftworkshop
-DartifactId=todo -Dversion=1.0-SNAPSHOT
So far so good, but then, I try to cd into my new project
and do:
mvn jetty:run
I after quite a few downloads end up with a error like below:
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) net.liftweb:lift-mapper:jar:2.0-scala280-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=net.liftweb -DartifactId=lift-mapper -D
version=2.0-scala280-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=net.liftweb -DartifactId=lift-mapper -Dve
rsion=2.0-scala280-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Dr
epositoryId=[id]
Path to dependency:
1) com.liftworkshop:todo:war:1.0-SNAPSHOT
2) net.liftweb:lift-mapper:jar:2.0-scala280-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
com.liftworkshop:todo:war:1.0-SNAPSHOT
from the specified remote repositories:
scala-tools.snapshots (http://scala-tools.org/repo-snapshots),
scala-tools.releases (http://scala-tools.org/repo-releases),
central (http://repo1.maven.org/maven2)
Any ideas?
I created the same project using the mvn archetype:generate command you provided but I couldn't reproduce your problem. The lift-mapper-2.0-scala280-SNAPSHOT.jar artifact is definitely in the scala snapshots repository and Maven downloaded it:
...
1619K downloaded (lift-mapper-2.0-scala280-SNAPSHOT.jar)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0c857e2c5de9d5cabb7c972e519528606f19697b'; remote = 'a258cf7d7a49a8d7163d499da06a4d1e231a78e0' - RETRYING
Downloading: http://scala-tools.org/repo-snapshots/net/liftweb/lift-mapper/2.0-scala280-SNAPSHOT/lift-mapper-2.0-scala280-SNAPSHOT.jar
1619K downloaded (lift-mapper-2.0-scala280-SNAPSHOT.jar)
As you can see, Maven had to retry the download because of a failed CHECKSUM check but it worked.
Just try again.