Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.
The following page has been changed by edslattery: http://wiki.apache.org/ws/Tuscany/TuscanyJava/GetTuscany/WinXP_old ------------------------------------------------------------------------------ + deleted - ## page was renamed from Tuscany/TuscanyJava/GetTuscany/WinXP - = Building Tuscany on Windows = - This document describes the detailed steps to setup your system, download the Tuscany source code, build the Tuscany runtime and run two SCA samples, a simple J2SE program and a Web application invoking a Hello``World SCA service. - - These instructions have been tested on a Windows XP SP 2 system. - - = System requirements = - * '''Windows XP SP2''' - These instructions are for a Windows XP SP2 system. If you're running Linux, follow the steps described on our [wiki:Self/Tuscany/GetTuscany/Linux Linux] page. - * '''Java JDK 5.0 update 06''' - Tuscany is written in Java, and has been tested with this level of JDK. - * '''Apache Maven 2.0.4 and Apache Ant 1.6.5''' - We are using Maven 2 to build Tuscany, plus a few Ant scripts. - * '''Subversion 1.3.0''' - The Tuscany source code is stored in a Subversion (SVN) repository, you need Subversion to download it. - * '''Apache Tomcat 5.5.16''' - This is the Web container that we integrate with, to allow you to use the SCA programming model in Web applications. - - = Creating a tuscany directory = - Open a Command Prompt window, then from the command prompt create a tuscany directory as follows: - {{{ - C: - mkdir C:\tuscany - cd C:\tuscany - }}} - - This is the directory where we're going to download the Tuscany code as well as the tools and packages required to build and run Tuscany. - - = Downloading and installing the Java JDK 5.0 = - Point your Web browser to http://java.sun.com/j2se/1.5.0/download.jsp. - - Select "Download JDK 5.0 Update 6". - - Accept the License agreement, then select Windows Online Installation, Multi-language - jdk-1_5_0_06-windows-i586-p-iftw.exe. - - Download jdk-1_5_0_06-windows-i586-p-iftw.exe to the C:\tuscany directory. - - From the command prompt do the following: - {{{ - jdk-1_5_0_06-windows-i586-p-iftw.exe - }}} - This will run the JDK 5.0 Installation Wizard. Accept the License agreement, then proceed through the pages of the wizard. Accept all the default options. - - After a few minutes the installation will complete and you should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/jdkinstall.jpg - - Press Finish to close the installation wizard. - - Create a new .bat file C:\tuscany\setenv.bat and add the following line: - {{{ - set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_06 - }}} - - = Downloading and installing Apache Maven 2.0.4 = - Point your Web browser to http://maven.apache.org/download.html. - - Select "Maven 2.0.4 (zip) - maven-2.0.4-bin.zip". - - Download maven-2.0.4-bin.zip to the C:\tuscany directory. - - From the command prompt do the following: - {{{ - unzip maven-2.0.4-bin.zip - }}} - This will extract Maven 2.0.4 to the C:\tuscany\maven-2.0.4 directory. - - Modify C:\tuscany\setenv.bat and add the following line: - {{{ - set PATH=%PATH%;C:\tuscany\maven-2.0.4\bin - }}} - - = Downloading and installing Apache Ant 1.6.5 = - Point your Web browser to http://ant.apache.org/bindownload.cgi. - - Select ".zip archive: apache-ant-1.6.5-bin.zip". - - Download apache-ant-1.6.5-bin.zip to the C:\tuscany directory. - - From the command prompt do the following: - {{{ - unzip apache-ant-1.6.5-bin.zip - }}} - This will extract Ant 1.6.5 to the C:\tuscany\apache-ant-1.6.5 directory. - - Modify C:\tuscany\setenv.bat and add the following lines: - {{{ - set PATH=%PATH%;C:\tuscany\apache-ant-1.6.5\bin - }}} - - = Downloading and installing Subversion 1.3.0 = - Point your Web browser to http://subversion.tigris.org/project_packages.html. - - Pick a Subversion package for your system, for example for a Windows XP pick http://subversion.tigris.org/files/documents/15/29039/svn-win32-1.3.0.zip. - - Download svn-win32-1.3.0.zip to the C:\tuscany directory. - - From the command prompt do the following: - {{{ - unzip svn-win32-1.3.0.zip - }}} - This will extract Subversion 1.3.0 to the C:\tuscany\svn-win32-1.3.0 directory. - - Modify C:\tuscany\setenv.bat and add the following line: - {{{ - set PATH=%PATH%;C:\tuscany\svn-win32-1.3.0\bin - }}} - - = Verifying your setup = - From the command prompt do the following: - {{{ - C:\tuscany\setenv.bat - java -version - mvn --version - ant -version - svn --version - }}} - - You should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifysetup.jpg - - You are now ready to check out the Tuscany source code. - - = Checking out the Tuscany source code = - - From the command prompt, do the following: - {{{ - svn co http://svn.apache.org/repos/asf/incubator/tuscany/java - }}} - - This should check out all the source code from the Tuscany SVN repository into the C:\tuscany\java directory. - - When the check out completes, do the following: - {{{ - cd java - dir /b - }}} - You should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifycheckout.jpg - - You are now ready to build the Tuscany runtime. - - = Building the Tuscany runtime = - From the command prompt do the following: - {{{ - cd C:\tuscany\java - mvn - }}} - - This will build the Tuscany runtime with Maven. Maven will download all the JAR dependencies, build all the Tuscany sub-projects and run the unit tests. - - When the build completes you should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifybuild.jpg - - = Running the HelloWord sample = - To run the Hello``World sample you need to have the following JARs on your Java classpath: - {{{ - %USERPROFILE%/.m2/repository/org/osoa/sca-api/SNAPSHOT/sca-api-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/org/apache/tuscany/tuscany-common/SNAPSHOT/tuscany-common-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/org/apache/tuscany/tuscany-core/SNAPSHOT/tuscany-core-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/org/apache/tuscany/tuscany-model/SNAPSHOT/tuscany-model-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/axis/axis-wsdl4j/1.2/axis-wsdl4j-1.2.jar - %USERPROFILE%/.m2/repository/commonj/sdo-api/SNAPSHOT/sdo-api-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/org/apache/tuscany/tuscany-sdo-impl/SNAPSHOT/tuscany-sdo-impl-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/org/eclipse/emf/ecore/2.2.0-SNAPSHOT/ecore-2.2.0-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/org/eclipse/emf/common/2.2.0-SNAPSHOT/common-2.2.0-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/org/eclipse/emf/ecore-change/2.2.0-SNAPSHOT/ecore-change-2.2.0-SNAPSHOT.jar - %USERPROFILE%/.m2/repository/stax/stax-api/1.0/stax-api-1.0.jar - %USERPROFILE%/.m2/repository/woodstox/wstx-asl/2.8.2/wstx-asl-2.8.2.jar - %USERPROFILE%/.m2/repository/org/apache/tuscany/sca/containers/tuscany-container-java/SNAPSHOT/tuscany-container-java-SNAPSHOT.jar - }}} - - Instead of copying all the JARs by hand, you can use one of the Tuscany build scripts to create a directory containing all the required JARs. - - From the command prompt, do the following: - {{{ - ant -f C:\tuscany\java\testing\tomcat\build.xml -Dtuscany.acceptance.target.dir=C:\tuscany\java\target j2se - }}} - This will copy all the required JARs into directory C:\tuscany\java\target\j2se. - - From the command prompt do the following: - {{{ - dir /b target\j2se - }}} - You should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifyj2se.jpg - - You are now ready to run the Tuscany Hello``World sample. Do the following: - {{{ - cd samples\helloworld - java -Djava.ext.dirs=C:\tuscany\java\target\j2se -classpath helloworld\target\helloworld-SNAPSHOT.jar org.apache.tuscany.samples.helloworld.HelloWorldClient - }}} - - This will run the Hello``World sample application, you should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/runhelloworld.jpg - - = Downloading and installing Tomcat = - Point your Web browser to http://www.ibiblio.org/pub/mirrors/apache/tomcat/tomcat-5/v5.5.16/bin/apache-tomcat-5.5.16.zip - - Download apache-tomcat-5.5.16.zip to the C:\tuscany directory. - - To install Tomcat, from the command prompt do the following: - {{{ - cd C:\tuscany - unzip apache-tomcat-5.5.16.tar.gz - }}} - This will extract Tomcat to the C:\tuscany\apache-tomcat-5.5.16 directory. - - From the command prompt do the following: - {{{ - ant -f java\testing\tomcat\build.xml -Dtuscany.acceptance.tc.dir=C:\tuscany\apache-tomcat-5.5.16 tuscany.tomcat.fixup - }}} - This will configure Tomcat to use Tuscany and will install the required JARs under the Tomcat lib directory. - - You should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/tomcatsetup.jpg - - You are now ready to start Tomcat and run the Tuscany Hello``World``Web sample. - - = Running the HelloWorldWeb sample = - - From the command prompt, do the following: - {{{ - copy java\samples\helloworld\helloworldweb\target\helloworldWeb-SNAPSHOT.war apache-tomcat-5.5.16\webapps - }}} - This will install the Hello``World``Web sample Web application. - - To start Tomcat do the following: - {{{ - set CATALINA_HOME=C:\tuscany\apache-tomcat-5.5.16 - apache-tomcat-5.5.16\bin\startup.bat - }}} - This will start Tomcat in a new command prompt window. You should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/starttomcat.jpg - - To verify that Tomcat is running, point your Web browser to http://localhost:8080. - - You should see the Tomcat home page: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/tomcathome.jpg - - To run the Hello``World``Web sample Web application, point your Web browser to http://localhost:8080/helloworldWeb-SNAPSHOT. - - You should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/helloworldweb.jpg - - Click the Submit button, this will execute the sample Hello``World SCA service. - - You should see the following: - - http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/helloworldwebsubmit.jpg - - To stop Tomcat, from the command prompt do the following: - {{{ - apache-tomcat-5.5.16/bin/shutdown.bat - }}} -
