Talk:ESAPI-Building

--MichaelCoates 06:59, 22 January 2009 (EST) Just ran through these setup steps and it worked pretty well. Here are a few notes:

I had some trouble getting subclipse to work in Eclipse. It kept throwing an error "cannot find svn client". I finally fixed this by also installing the JavaHL Adapter plugin along with sublclipse. JavaHL was listed as recommended under the Software tree for http://subclipse.tigris.org/update_1.4.x. Its also good to note that the current version of subclipse is 1.5.x. However, the link, http://subclipse.tigris.org/update_1.4.x., is still the correct one to use and will provide the most up-to-date version.

The bat file has a few errors Line 11 should be changed to the following. Without the semicolon, the path doesn't get setup right and mvn is not found. I think that's because there is a trailing space. SET PATH=%PATH%;%MAVEN_HOME%\bin;

Important The REM statements need to be moved on several lines. The should be on their own lines and not at the end of a set statement. This caused me errors until I moved the REM statements to their own lines.

Also, I would change the anti-samy (line ~19) install to an absolute path. I didn't realize for a bit that the relative path was failing because I was running the .bat from an unrelated directory. When I added the absolute path it worked just fine.

Here is the bat file which worked for me:

@ECHO ON

REM -

REM set to your workspace path

REM This line sets how much memory Maven is granted

SET MAVEN_OPTS=-Xmx512M

REM this directory specifies your ESAPI workspace directory. It is assumed that an ESAPI project and a Swingset project will be contained in this workspace.

SET ESAPI_HOME=C:\Users\mcoates\workspace

REM set your maven home

SET MAVEN_HOME=C:\apache-maven-2.0.9

REM the following line should not be changed

SET PATH=%PATH%;%MAVEN_HOME%\bin;

REM - REM install AntiSamy in repository

REM the only thing that may need to be changed is the location of antisamy-bin.1.2.jar

CALL mvn install:install-file -DgroupId=OWASP -DartifactId=AntiSamy -Dversion=1.2 -Dpackaging=jar -Dfile=C:\Users\mcoates\workspace\resources\AntiSamy\antisamy-bin.1.2.jar

REM -

REM build and install ESAPI (and all dependencies) in repository

REM this should point to your ESAPI project. The default assumes it is located inside the ESAPI_HOME directory declared above

CD %ESAPI_HOME%\ESAPI

REM the following line should not be changed

CALL mvn install site -Dmaven.test.failure.ignore=true

REM -

REM build swingset -- Remove the two lines below if you are not installing Swingset also

cd %ESAPI_HOME%\SwingSet

CALL mvn clean package