1

I am doing a Java based project where the final thing that is released is a .war file which contains many third-party .jar files and many internally developed .jar files.

So the eclipse workspace looks something like this

Eclipse project webapp   --> produces a .war file
Eclipse project project1 --> produces a .jar file that goes into webapp/WEB-INF/lib
Eclipse project project2 --> produces a .jar file that goes into webapp/WEB-INF/lib

Do you setup a single repo for webapp, project1, and project2? or do you setup individual repos for webapp, project1, project2?

flag

1 Answer

1

Either method will work. If project1 and project2 are useless outside of webapp then you're probably best served keeping them within the webapp repo.

However, if they're separate projects in Eclipse, my guess is that they are re-usable modules, in which case I would treat them as individual repositories in Mercurial.

You can put logic in your webapp build script that pulls project1 and project2, builds them, and copies the .jar files to webapp/WEB-INF/lib. Alternatively, you could use Mercurial's subrepositories feature which will let you push, pull, commit, clone in unison.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.