File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven, Subversion, Trunk and Branches Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven, Subversion, Trunk and Branches" Watch "Maven, Subversion, Trunk and Branches" New topic

Maven, Subversion, Trunk and Branches

Gianfranco OLDANI

Joined: Oct 14, 2005
Posts: 1
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

Joined: Nov 24, 2000
Posts: 776
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
I agree. Here's the link:
subject: Maven, Subversion, Trunk and Branches
It's not a secret anymore!