I am in the following situation...
I am used to being able to check out a Subversion server subproject into JBoss as an exploded war: in my case, I call a directory Blah.war, put it in C:\jboss-6.1.0.Final\server\default\deploy\Blah.war, and JBoss picks it right up.
I'm having trouble doing this with Git. The SVN repository I'm pulling from is laid out as follows:
.../Project/trunk/Services
.../Project/trunk/Web
If I check the entire project into the deploy/ folder, there won't be a .war directory at the top. Obviously, I can't check out make trunk/ into my deploy/ directory. I've thought of using some kind of symbolic link, but can't see this working in Windows.
Does anyone have any idea how to do this? I've been hearing good things about DVCS, but Git is useless to me if I can't handle the server development use case.
That is a good illustration of the difference of granularity between SVN repo and git repo:
So ideally Services and web would be two repos.
Note that having one checked out git repo outside jboss, and a symbolic link can work, even on Windows, which does support symlink (with mklink
).
Finally, if you don't want several repos or symlink, you can do a sparse checkout, with git read-tree
, as describe in this blog post "Using Git Sparse Checkout", by Brian Coyner (briancoyner
).
cd C:\jboss-6.1.0.Final\server\default\deploy\
git init Blah.war
cd Blah.war
git config core.sparsecheckout true
echo Web >> .git/info/sparse-checkout
git remote add -f origin /url/to/your/repo.git
git pull origin master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With