aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes synchronizing files in maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "synchronizing files in maven" Watch "synchronizing files in maven" New topic
Author

synchronizing files in maven

Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239
Normally, I google and download needed java archive files, then copy them to server folder, and then include the new file into the project and finally I need to google again about what to write in the maven xml file so that maven will have that same file. Is there a way to achieve these three steps in one go?
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2066
    
  22

Which server are you deploying to? How are you packaging your application

Is it a war that you are deploying to the web server? If you use maven to pacakge your war, it should download all the jars from the dependency tree and put them in the lib folder of the war. You shouldn't need to manually copy the jar into the server
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

A few suggestions:

1) What IDE are you using? With Eclipse and the m2e plugin, I can open the pom.xml file, go the the dependencies tab in the POM editor, and click the Add button, This gives me a dialog where I can do a search. I type in part of the artifact name and get a list or artifacts and their versions that match. I then pick the one I want.

2) Maven Central has a search feature. Go to http://repo1.maven.org/maven2/ and type in a search term and it will find the artifact you need and provide the necessary dependency information.

3) If you development team has a local Maven repository run by Nexus or Artifactory, they also have search functions that you can use to look up artifacts and get the dependency clause.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: synchronizing files in maven
 
Similar Threads
deploying the content inside the target folder
Seeing properties
Maven Vs Ant
maven pom.xml: downloading dependancy from maven public repository
Installing Maven plugin in eclipse galileo