Question

How should I handle WAR files (using GWT) along with Subversion in Eclipse?

The problem atm. is when adding the war folder to SVN, it includes all the compiled code, which I don't have a option to filter out, making svn checkouts long and pointless.

I don't want my compiled class files on my subversion server, and I don't want svn information in the war package either. But I still need the client-content (html, javascript, css) to be included with the subversion.

So what's the Java EE way of handling this?

Was it helpful?

Solution

Other places have pointed out the ideal solution is trying another project structure, or writing a custom ANT build.

OTHER TIPS

Do you know about the svn:ignore property you can set for every folder? Take a look at the very good book "Version Control with Subversion".

Edit If eclipse doesn't show you the folder structure of your procject as it really is, I'd recommend to switch to the shell and use the svn commandline utility.

Edit 2: svn:ignore support patterns for filenames. So you don't have to explicitly ignore every file you are not interested in.

Why would you want a .war file in your Subversion without the compiled sources? The point of the .war (web archive) is that it can be deployed to a server.

If you decide to archive your Java packages (.jar, .war, .ear) with subversion, do so in the complete and final version you would also use for your applications on production/test servers. The whole point of archiving these would be to save a package version that can be used/deployed/... as is, without further tampering.

I would advice you to save only the major versions/releases/branches of your Java packages on subversion. The minor releases can easily be built ad hoc, so there would be no point in archiving them. And when you have your whole project subversion-ized it is also no problem to manage client content like html, css, ... .

You can add the war (and any file you don't want to be in SVN) to svn:ignore.

In Eclipse you can do:

  1. right click the file(s) you don't want in SVN
  2. Team -> add to svn:ignore

You can also use wildcard.

Eclipse doesn't support it directly, but you can do in the root of your project:

  1. Team -> set property
  2. add svn:ignore as property and *.class or whatever you want in text property
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top