Date: 2005-03-07T07:09:00 Editor: DuncanMills Wiki: Apache Struts Wiki Page: BuildingShale URL: http://wiki.apache.org/struts/BuildingShale
Added information about building from Eclipse Change Log: ------------------------------------------------------------------------------ @@ -1,12 +1,33 @@ = Building Shale = -This page describes the process for downloading shale from subversion and then the wrinkles in building it for (hopefully) various IDEs - == Pulling Shale from SVN == +This page describes the process for downloading and building Shale from the Apache Subversion repository and then the wrinkles in building it for various IDEs + == The Basics == + === Pulling Shale from SVN === Assuming that you already have a Subversion client installed such as [http://tortoisesvn.tigris.org/ TortoiseSVN]. You need to checkout from the following repository URL http://svn.apache.org/repos/asf/struts/shale/trunk/, or from the command line use '''svn checkout''' with that same URL - + === Dependencies === +Shale needs the following libraries, if you are building without an IDE you'll need to have these available. +If you are using an IDE to inspect and build the Shale code, then some of these libraries may already be available for you. (See below) + ||'''Library'''||'''Version'''|| + ||Servlet Runtime||Tomcat 5.0.28 or equivalent|| + ||JSF||Reference Implementation 1.1.01|| + ||Commons Chain||1.0|| + ||Commons Digester||1.6|| + ||Commons Beanutils||1.7.0|| + ||Commons Logging||1.0.4|| + ||JUnit||3.1.8|| + You will also need Ant installed. + === Building From The Command Line === +To build the core Shale libraries follow these steps. + 1. svn checkout the shale trunk from the url above + 1. Change to the /core-library directory and copy '''build.properties.sample''' to '''build.properties''' + 1. Edit the build.properties to point to the various libraries as above + 1. From the command prompt simply run '''ant''', the default target is ''library'' which will build the core jar file into ''core-library/target/lib/shale.jar'' + = IDEs = == JDeveloper 10.1.3 == -To get the Ant compile to run successfully in JDeveloper a some extra settings have to be added to the build.properties to override locations defined in the build.xml ''if'' you want to use the JSF RI as shipped with JDeveloper and the OC4J servlet API JARs rather than downloading a separate JSF RI and Tomcat. +To get the Ant compile to run successfully in JDeveloper a some extra settings have to be added to the build.properties to override locations defined in the build.xml ''if'' you want to use the JSF RI as shipped with JDeveloper and the OC4J servlet API JARs rather than downloading a separate JSF RI and Tomcat. + This assumes the use of JDeveloper 10.1.3 developer preview (J2EE edition). + Note the versions of the various Jakarta Commons libraries shipped in the JDeveloper install are lower than those needed for Shale, so you should separately download ''beanutils'', ''chain'', ''digester'' and ''logging'' and update your build.properties with the appropriate locations. === General JDeveloper Setup === Set up JDeveloper to exclude the '''.svn''' sub-directories from the source view in the navigator. to do this: @@ -31,21 +52,54 @@ * Commons Digester 1.6 * Commons Beanutils 1.7.0 1.#5 Finally copy the build.properties.sample file to build.properties and make the changes outlined in the next section. - === Extra entries in build.properties === + === build.properties Settings === * The JSF RI jars are in %JDEV_HOME%/jsf-ri * The servet and JSP API jars are in %JDEV_HOME%/j2ee/home/lib and have different names from the Tomcat jars -So add these extra values to your build.properties file (copy the build.properties.sample that comes out of svn). Substitute the physical location of the JDeveloper Home for %JDEV_HOME% + * The correct version of JUnit is available in %JDEV_HOME%/jdev/extensions/oracle.jdeveloper.junit.10.1.3/junit3.8.1 +Also add these extra values to your build.properties file to force the use of OC4J and the shipped JSF RI. Substitute the physical location of the JDeveloper Home for %JDEV_HOME% ||jsf-api.jar||%JDEV_HOME%/jsf-ri/jsf-api.jar|| ||jsf-impl.jar||%JDEV_HOME%/jsf-ri/jsf-impl.jar|| ||jsp-api.jar||%JDEV_HOME%/j2ee/home/lib/ojsp.jar|| ||servlet-api.jar||%JDEV_HOME%/j2ee/home/lib/servlet.jar|| === Building Shale in JDeveloper === -To build you can simply use the defined Ant targets. Select the build.xml and in the structure pane you'll see the various targets. Right mouse click on the required target (e.g. '''library''') and choose run. - +To build you can simply use the defined Ant targets. Select the build.xml and in the structure pane you'll see the various targets. Either choose run on the build.xml as a whole to run the default '''library''' target or right mouse click on the required target inside the structure pane and choose run. == Eclipse 3.0.1 == -<<Coming Soon>> - - + === General Eclipse Setup === +To make the checkout from the Struts subversion repository simpler it's worth installing the Eclipse Subversion plug-in [Subclipse http://subclipse.tigris.org/] if you don't already have it. + 1. Choose ''Help'' > ''Software Updates'' > ''Find and Install'' + 1. Choose ''Search for new features to install'' in the Install wizard dialog. + 1. Hit the '''New Remote Site''' button + 1. In the pop up, set the name to '''Subclipse Update Site''' and the URL to '''http://subclipse.tigris.org/update''' + 1. Install the Subclipse plug-in +Download the following libraries: + * JSF Reference implementation from Sun + * Tomcat 5.0.28 + * Commons Logging 1.0.4 + * Commons Chain 1.0 + * Commons Digester 1.6 + * Commons Beanutils 1.7.0 + + === Creating a Base Project for Shale === +Follow these steps: + 1. Switch to the SVN repository exploring perspective + 1. Right mouse click on the Repository navigator and choose ''New'' > ''Repository Location'' or click the ''Add SVN Repository'' button + 1. In the Add SVN Repository dialog use ''http://svn.apache.org/repos/asf/struts/shale/trunk/'' as the URL and ''http://svn.apache.org'' as the root URL + 1. Expand the node in the navigator and choose the '''core-library''' node + 1. Right mouse click and choose ''Check Out As'' then ''Java Project'' + 1. Go to the project properties and select the ''Java Build Path'' node. + 1. Add ''core-library/src/java'' as the source folder and remove the existing source folder of Eclipse does not do it for you. + 1. In the same dialog set ''Default output folder'' to '''core-library/target/classes''' + 1. Also in the properties dialog, with the ''Java Build Path'' node selected, click on the ''libraries'' tab and define libraries for the various packages as defined above. + 1. Finally copy the build.properties.sample file to build.properties and make the changes outlined in the next section. + === build.properties settings === +Update the build.properties to point at the homes of the various packages downloaded as above. The one exception is JUnit which is shipped in the Eclipse Install: + ||junit.home||%ECLIPSE_HOME%/plugins/org.junit_3.8.1|| + === Building Shale in Eclipse === +To build carry out the following steps. + 1. Use ''Window'' > ''Show View'' > ''Ant'' + 1. In the Ant Window right mouse click or use the icon to add a build file. Select '''build.xml''' + 1. Run the default Ant task from the Ant window, or expand the node and choose a specific task and run that. + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]