Anita
Anita

Reputation: 185

maven - how to use local repository

I am newbie to maven. I have few questions on it.

I have to build a webapp and prepare a war out of it. I have put my web application under ..\src\main\webapp. And all classes of it, which were under web-inf\classes, i have copied to ..\src\main\java. And i have put pom.xml in the root directory. I have numerous jars in web-inf\lib folder, on which my compilation of classes depends on. I want to add all those to my local repository. My local repository is default folder, which i have not changed in settings.xml. So, how do i put all these jars to my local repository? Just copying jars to local repository folder is not working.

Should i create a folder for each jar as per its groupid? Am i doing things correctly? Or i am missing something?

Kindly help. Thanks in advance!

Upvotes: 0

Views: 1969

Answers (2)

Skizzo
Skizzo

Reputation: 2983

Your question is confused enough. Firstly try to explain in a better way how to are doing? If you are trying to add maven nature at your project (like I think) there are something to review.

I'm not able to understand when you say:

And all classes of it, which were under web-inf\classes, i have copied to ..\src\main\java

Usually in web-inf/classes there are the .class files, while in src/main/java there must be the source files. And this is an strange thing

Finally fon dependencies copy you have to just configure maven correctly and add all jar like project's dependencies. Then when you try to install you application maven will download the jars file in your folder

Upvotes: 0

Tarlog
Tarlog

Reputation: 10154

To deploy to maven local repository you can use an install plugin: http://maven.apache.org/plugins/maven-install-plugin/examples/specific-local-repo.html

Upvotes: 1

Related Questions