Failed to exectue goal, error during deploy

11,295 views
Skip to first unread message

Husein, Tanveer Contractor, Advanced Onion

unread,
Sep 17, 2012, 6:31:17 PM9/17/12
to kc.techni...@kuali.org
Hello All, 
We are getting the following Maven error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin2.5:deploy (default-deploy) on 
project kc-project: Deployment failed: repository element was not specified inthe POM inside 
distributionManagement element or in -DaltDeploymentRepsoitory=id::id::layout::url parameter -> [Help1]

The command I am using is:
mvn -Dmaven.test.skip=true -Dbuild.environment=dev -Dbuild.version=5.0 deploy

I used the same command successfully to perform: clean, validate, compile, package, install, and site prior to deploy command. 

Research on Google suggests that we may have to modify pom.xml or settings.xml, but not sure what changes.

We feel that we are almost there, may be this is just a last hurdle. 
We are desperate, please let us know if anyone ran into this issue and remembered how to fix it.
Appreciate the help, 
Tanveer Husein 
Naval Postgraduate School

Leo Przybylski

unread,
Sep 17, 2012, 6:47:49 PM9/17/12
to Husein, Tanveer Contractor, Advanced Onion, kc.techni...@kuali.org
Tanveer,

In order for the maven deploy plugin to push artifacts to your maven
repository, you need to configure your distribution management section
in the pom.xml file. The KC project does not define this by default.
You will have to do this yourself for your institution. See:
http://maven.apache.org/pom.html#Distribution_Management

Once you have done this, you can configure credentials for this server
in your settings.xml file.

Leo
--
Leo Przybylski
rSmart | 5204401252
1375 N. Scottsdale Road, Suite 480
Scottsdale, AZ 85257
www.rsmart.com
kualigan.blogspot.com

Husein, Tanveer Contractor, Advanced Onion

unread,
Sep 17, 2012, 7:20:22 PM9/17/12
to Leo Przybylski, kc.techni...@kuali.org
Leo,
I am struggling to define the downloadUrl for my distributionManagement. I cannot find any good example of it on Google.
I was wondering if it's OK for you to share how you defined your downloadUrl.

I am also seeing the repository tag in the examples that I don't have in my POM file. Actually, the entire distributionManagement tag is missing from my POM file.
Truly appreciate the help,
Tanveer
BTW, we worked with Adam Campbell and Kyle from rSmart until last month on the KS project. Good guys.

Leo Przybylski

unread,
Sep 18, 2012, 10:23:58 AM9/18/12
to Husein, Tanveer Contractor, Advanced Onion, kc.techni...@kuali.org
Tanveer,

Maven uses several wagons for distribution management. FTP, WebDAV
HTTP, SSH, Git, etc...

This is what the Rice Team uses for their <distributionManagement /> section.

<distributionManagement>
<downloadUrl>${kuali.site.download.url}</downloadUrl>
<site>
<id>${kuali.site.server.id}</id>
<name>Kuali Maven Site</name>
<url>${kuali.site.publish.url}</url>
</site>
<repository>
<id>${kuali.repo.release.id}</id>
<name>${kuali.repo.release.name}</name>
<url>${kuali.repo.release.url}</url>
</repository>
<snapshotRepository>
<id>${kuali.repo.snapshot.id}</id>
<name>${kuali.repo.snapshot.name}</name>
<url>${kuali.repo.snapshot.url}</url>
</snapshotRepository>
</distributionManagement>

Below are the properties for those sections:

<kuali.nexus.sonatype.url>https://oss.sonatype.org</kuali.nexus.sonatype.url>
<kuali.nexus.sonatype.description>Releasing
${project.artifactId} version
${project.version}</kuali.nexus.sonatype.description>
<kuali.nexus.sonatype.phase>deploy</kuali.nexus.sonatype.phase>
<kuali.nexus.sonatype.automatic>true</kuali.nexus.sonatype.automatic>
<kuali.nexus.sonatype.promote.auto.select.override>true</kuali.nexus.sonatype.promote.auto.select.override>
<kuali.nexus.sonatype.release.repository.id>releases</kuali.nexus.sonatype.release.repository.id>

<kuali.repo.release.id>sonatype-nexus-staging</kuali.repo.release.id>
<kuali.repo.release.name>Sonatype Nexus Release
Repository</kuali.repo.release.name>
<kuali.repo.release.url>${kuali.nexus.sonatype.url}/service/local/staging/deploy/maven2</kuali.repo.release.url>

<!-- These are for reference only. Not currently publishing
snapshots to Sonatype's Nexus instance
<kuali.repo.snapshot.id>sonatype-nexus-snapshots</kuali.repo.snapshot.id>
<kuali.repo.snapshot.name>Sonatype Nexus
Snapshots</kuali.repo.snapshot.name>
<kuali.repo.snapshot.url>https://oss.sonatype.org/content/repositories/snapshots/</kuali.repo.snapshot.url>
-->

You can view the POM at
http://svn.kuali.org/repos/foundation/trunk/kuali-pom/pom.xml

I hope this helps you out,

Leo

On Mon, Sep 17, 2012 at 4:20 PM, Husein, Tanveer Contractor, Advanced
Reply all
Reply to author
Forward
0 new messages