Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with mvn deploy

 
Teena Mariam
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was going through the maven tutorial in apache site, maven in 5 minutes
I created a project 'my-app' using the command:
mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

I packaged it using the command : mvn package. The result showed BUILD SUCCESSFUL.

When I try to deploy it using : mvn deploy, it throws an exception, which is given below:


The pom.xml file is like below:




I know the <distributionManagement> tag information i provided is wrong, especially the <url>. I don't know what should be value.

Can anybody help me with it?

Thanks in advance,
Teena
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that depends where you are trying to deploy it to!
 
Teena Mariam
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Martijn,
Thank you. But I didn't get your point.
I don't know the values to be given to the repository and snapshotRepository elements.
IS the url the location of the .jar file?

Regards,
Teena

 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Teena,

See the documentation Here basically it is specifynig where you are going to upload your artifact to, e.g. a local maven repository (Nexus, Artifactory etc) or perhaps a hosted repository out there on the internet (e.g. Central)
 
Teena Mariam
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I added distributionManagement and gave the url after checking settings.xml.
My settings.xml


My pom.xml now :

When i package it it shows build succesful. when i try to deploy it throws error with return code 405.
The error is :


What is it that I am doing wrong?

Thanks,
Teena
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to talk to the people who run the Jboss repository, it'll be limited as to who can upload what. In general you won't need to upload artifacts to an external repo like this unless you are at the stage where your code is ready to share with hte world. For a more localised sharing you'll want to install something like Nexus or Artifactory, you then upload your artifacts to them and that can be shared across your local network etc.
 
Teena Mariam
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Okay, I got it. Thanks Martijn. My choice is Nexus.
Let me implement it and see if it works.

Thanks,
Teena
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problems, Nexus is fairly popular so you'll be able to find assistance out there for it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic