Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Shailesh Welankar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ):

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic