File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven - copying properties file from SVN to Linux based App Server machines Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Maven - copying properties file from SVN to Linux based App Server machines" Watch "Maven - copying properties file from SVN to Linux based App Server machines" New topic
Author

Maven - copying properties file from SVN to Linux based App Server machines

Shailesh Welankar
Ranch Hand

Joined: Dec 30, 2002
Posts: 35
We are using Maven and Jenkins for our automated Build and Deployment needs. Our Build Engineer has left and it is now up to me (not a build engineer) to implement a few remaining stuff. I tried a lot of things to resolve this issue we are having. The problem statement is -

We have made a separate project in Eclipse to store properties files. The Developers check-in the properties file into SVN once they make any changes to it. Now we want that Maven, when triggered to do a deploy, to do the following -
1. Take the latest properties files from the SVN from the project used to store properties files.
2. Copy the same onto the Linux based JBoss App Server's /conf/ folder
3. Carry on with its deployment task.

We would like to have solution to point 1 and 2 above.

--Shailesh Welankar
SCDJWS 1.4 | SCBCD 5.0 | SCWCD 1.4 | SCJP 1.4 | Preparing for SCEA 5
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4875

1) Within Jenkins you can specify multiple Subversion locations to check out for a job. That might be the easiest way to check out the properties project.

2) With Maven Dependency Plugin, it is fairly easy to copy files from outside of the project into the project. However, to copy files from within a project to outside a project (which is what you want to do), you will have to resort to an Ant task. The typical mechanism is to use the Maven Ant Plugin and do the copy task using it. Here is an example (set or adjust the properties in the copy task as best meets your needs ):



JBoss In Action
 
 
subject: Maven - copying properties file from SVN to Linux based App Server machines
 
Threads others viewed
Why Maven?
Configuration management of JBoss files
Multi module hot deployment with maven
Any ideas on remote deployment?
Maven: What's the big deal?
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture