Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven, Subversion, Trunk and Branches

 
Gianfranco OLDANI
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I want to use maven as project dashboard/ Build tool. I also use Subversion as SCM tool. The standard directory tree used with subversion is with the "famous" trunk/branches/tags. In the project.xml maven POM file we can specify the trunk and branches source directories. My problem now is when I want to build the trunk or a branch. HOw do I specify to maven what I want to build ? DO i have to have a POM xml file for each?
Probably a naive question, I am new to maven..;o))

Thanks for help, Regards.
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well .... if you have created branches (using 'svncopy' for example), you already have (logically) different copies of the POM.

In the POM, you should not be coding directory names like .../trunk/src or .../branches/my-branch/src. You should be using relative directory names only.

Then you just CD to where you have the trunk or one of the branches checked out, and run a standard Maven build.

(Hope I understood the question!)

Regards, Guy
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic