aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes problem with mvn deploy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "problem with mvn deploy" Watch "problem with mvn deploy" New topic
Author

problem with mvn deploy

Teena Mariam
Greenhorn

Joined: Jul 14, 2008
Posts: 24
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

Well, that depends where you are trying to deploy it to!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Teena Mariam
Greenhorn

Joined: Jul 14, 2008
Posts: 24
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

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

Joined: Jul 14, 2008
Posts: 24
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

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

Joined: Jul 14, 2008
Posts: 24

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

Joined: Jun 24, 2003
Posts: 3274
    
    5

No problems, Nexus is fairly popular so you'll be able to find assistance out there for it.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem with mvn deploy