Maven Runs out of Memory

Maven 1.0 has some problems with memory leaks. Most of the time these aren’t issues, but if you are trying to compile a multiproject you might run into problems. By default Maven tells java to let it have up to 256MB of ram. If you need to increase this you’ll need to open the maven.bat (windows) or maven.sh (unix) file and change the way that java is called. Somewhere around line 118 (on the .bat file)you should see the following:

if "%MAVEN_OPTS%"=="" SET MAVEN_OPTS="-Xmx256m"

Change the line so it reads:

if "%MAVEN_OPTS%"=="" SET MAVEN_OPTS="-Xmx1000m"

This will give Maven 1GB of memory to work with. While this doesn’t really solve the problem of the memory leak, it may give you enough space to keep the problem from crashing Maven.

You can also set MAVEN_OPTS by setting it up as a variable in your environment. If you do this the environment will override anything you set in the .bat or .sh file.

Software Design

One of the major purposes of software design is to avoid making mistakes. You design your software so you don’t get halfway into the project and say “Oh yeah I didn’t think about that” and have to start over again or continue with a weak foundation. Unfortunatley don’t know exatly what type of mistakes you are likely to make until after you start coding. Since you don’t really know what the real problems are until after you encounter them, you are left with two options. First you can create your design to eliminate problems that you’ve experienced in other project. Second you can build a prototype to get an idea of what will be a problem then design and code the final system.

Trying to plan ahead and eliminate problems before they occur sounds like a great idea, but it often increases the complexity of the project. This isn’t a bad thing if the increased complexity solves real problems, but since you are trying to solve “imagined” problems before they actually occur, some won’t turn out to be problems at all. This means that that software is more complex than necessary.

Setting up SVN over SSH

If you want to access svn over ssh, you need to make sure that everyone has the correct file permissions. In the following steps we create a directory named svn-repo and change it’s ownership to a group called svn. Then we create the repository and change the security to allow access by people in the svn group.

mkdir svn-repo
chgrp -R svn svn-repo
cd svn-repo
svnadmin create
chmod -R 770 .
chmod g+s db

On Unix and Linux clients using svn over ssh is very straight forward. Windows is a little more tricky. You’ll need to download plink.exe (one of the downloads with putty.exe) and the subversion command line client. Install them and then copy all the files to C:\WINDOWS\SYSTEM32. You now need to make sure that SVN knows to run plink for ssh. Do this by issuing:
set SVN_SSH=plink.exe -l [username] -pw [password]
This will tell SVN how to log in using ssh. (You’ll probably want to add this to your profile so you don’t have to run it each time. You may also need to logon once using plink.exe to get the keys to work. To do this just connect to the SVN server using ssh (plink [email protected]).

Once this is set you should be able to use svn normally.

WebObjects 5.3 now part of Xcode 2.1

MacNN | Apple releases WebObjects 5.3 as part of Xcode 2.1
With this release, WebObjects is now part of the Xcode 2.1 Developer Tools distribution. You can now create and edit an entity-relationship model using either Xcode’s EO Model design tool or EOModeler separate development tool packaged with WebObjects.

This is an interesting development. It looks like they won’t be releasing any development tools for other platforms. I haven’t figured out how to go about upgrading to 5.3 on our deployment servers yet.

D’Arcy Norman Dot Net » Blog Archive » Tiger Updated

Tiger Updated
I just finished installing 10.4, XCode 2, WO (5.2, 5.2.2, and 5.2.3), and Subversion. Checked out the APOLLO/Pachyderm source tree, and build and ran Pachyderm2.woa.

Sounds like WebObjects works find under Tiger. I haven’t had a chance to test it myself yet, but this sounds promising.