|
Size: 9859
Comment:
|
← Revision 5 as of 2009-09-20 22:47:45 ⇥
Size: 9895
Comment: converted to 1.6 markup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 9: | Line 9: |
| * '''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. | * '''Windows XP SP2''' - These instructions are for a Windows XP SP2 system. If you're running Linux, follow the steps described on our [[Tuscany/GetTuscany/Linux|Linux]] page. |
| Line 42: | Line 42: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/jdkinstall.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/jdkinstall.jpg}} |
| Line 117: | Line 117: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifysetup.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifysetup.jpg}} |
| Line 137: | Line 137: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifycheckout.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifycheckout.jpg}} |
| Line 152: | Line 152: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifybuild.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifybuild.jpg}} |
| Line 186: | Line 186: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifyj2se.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/verifyj2se.jpg}} |
| Line 196: | Line 196: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/runhelloworld.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/runhelloworld.jpg}} |
| Line 218: | Line 218: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/tomcatsetup.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/tomcatsetup.jpg}} |
| Line 237: | Line 237: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/starttomcat.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/starttomcat.jpg}} |
| Line 243: | Line 243: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/tomcathome.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/tomcathome.jpg}} |
| Line 249: | Line 249: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/helloworldweb.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/helloworldweb.jpg}} |
| Line 255: | Line 255: |
| http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/helloworldwebsubmit.jpg | {{http://people.apache.org/~jsdelfino/wiki/screencaps/winxp/helloworldwebsubmit.jpg}} |
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 HelloWorld 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 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:
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:
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:
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:
Running the HelloWord sample
To run the HelloWorld 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:
You are now ready to run the Tuscany HelloWorld 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 HelloWorld sample application, you should see the following:
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:
You are now ready to start Tomcat and run the Tuscany HelloWorldWeb 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 HelloWorldWeb 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:
To verify that Tomcat is running, point your Web browser to http://localhost:8080.
You should see the Tomcat home page:
To run the HelloWorldWeb sample Web application, point your Web browser to http://localhost:8080/helloworldWeb-SNAPSHOT.
You should see the following:
Click the Submit button, this will execute the sample HelloWorld SCA service.
You should see the following:
To stop Tomcat, from the command prompt do the following:
apache-tomcat-5.5.16/bin/shutdown.bat