views:

98

answers:

4

We are currently using JDeveloper to build our production EARs. One problem with this is that if the developer doesn't add new files to a VCS, then that developer is the only one capable of making EARS, and therefore he can use unversioned files as well. What would be a good system that seperates this, so that EAR files can be correctly produced without depending on the local developers workspace (this would also ensure that they add their files to a VCS before allowing to make a deployment/check-in).

+3  A: 

Here's my recommendation:

  1. Get a better IDE - IntelliJ, Eclipse, or NetBeans. Nobody uses JDeveloper
  2. Have developers check into a central version control system like Subversion or Git.
  3. Set up a continuous integration facility using Ant and either Cruise Control or Hudson to automate your builds.
duffymo
1) Can't, we use Jdeveloper for ADF2) Yes3) Sound recommendations, thanks.
Zombies
Also, cruisecontrol doesn't have a plugin for Serena Dimensions... would this be required to use cc?
Zombies
You're screwed - PVCS is the worst SCM system on the market. There's almost no support in the industry as a result.
duffymo
Wait, Visual Source Safe is the worst. PVCS is second worst. My bad!
duffymo
Hudson has a Dimensions plugin: http://hudson-ci.org/
Matthew Flynn
+1  A: 

What we do is use cruisecontrol. It does two things, it lets us do continuous integration builds, so that we have nightly builds as well as lightweight builds that get built every time a change is checked it.

We also use it to more specifically address your issue. When we want to ship, we use cruisecontrol to kick off a build, that is tagged with the proper production build version. It will grab the code from our version control system (we use SVN) and will build on that, so it is not dependent on developers local environments.

One thing you might also want to consider is creating a production branch to build out of. So, production ears for a particular release are always built from that branch. This way you have even have a bit more control over what goes into the build.

nstehr
I wish cruisecontrol supported Serena Dimensions :(
Zombies
A: 

Instead of doing builds from developer workspaces, setup Maven, and have something like Hudson run your Maven build. The artificats of this build (your ear) gets deployed.

Marcus
+2  A: 

One problem with this is that if the developer doesn't add new files to a VCS, then that developer is the only one capable of making EARS,

If the developer doesn't use the VCS, this is not your only problem:

  • You cannot reproduce things in another environment, you're tied to the developer machine (but you're aware of that). What if he is sick?
  • Not versioning files means you don't have any history of modifications and that you don't know what you put into production ("Hmm, what is in this version? Wait, let's open the EAR to check that.").
  • And last but not least, in case of hardware failure (e.g. a hard drive crash), you can say good bye to everything that is not in the VCS.

So, the first thing to fix is to ALWAYS version files, even if there is only one developer as working alone doesn't save you from the mentioned problems. These points should be reminded (the developer needs to be aware of them to understand their importance).

To make sure this happens, you should actually not rely on the developer machine to build the EAR but rather rely on an "external" process that would be the reference. You want to avoid this syndrome:

alt text

To put such a process in place, you need to automate the build (i.e. your whole build can be run in one command) and to break the dependency with your IDE. In other words, do not use the IDE to build your EAR but rather use a tool like Maven or Ant (which are IDE agnostic). That would be the second thing to fix.

Once you'll have automated your build process, you could go one step further and run it continuously: this is called Continuous Integration (CI) and allows to get frequent, ideally immediate, feedback about changes (to avoid big bang integration problems). That would be the third thing to fix.

Given your actual toolset (which is far from ideal, there is not much community support for the tools you are using), my recommendation would be to use Ant (or Maven if you have some knowledge of it) for the build and Hudson for the continuous integration (because it's extremely easy to install and to use, and it has a Dimensions plugin).

Pascal Thivent
+1 - really nice. The visual is eye-popping.
duffymo
@duffymo Thanks. I like this image and keep it on my machine to use it when required, send it by email,... :)
Pascal Thivent
LOL - very nice, indeed.
duffymo