List Info

Thread: Update of "Tuscany/GetTuscany/Linux" by JeanSebastienDelfino




Update of "Tuscany/GetTuscany/Linux" by JeanSebastienDelfino
user name
2006-04-22 03:15:37
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 JeanSebastienDelfino:
ht
tp://wiki.apache.org/ws/Tuscany/GetTuscany/Linux

New page:
This document describes the detailed steps to setup your
system, download the Tuscany source code, build the Tuscany
runtime, 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 Red``Hat Linux
Enterprise 4 system.

= System requirements =
  * '''Red``Hat Enterprise Linux 4''' - We're working
on another page with detailed instructions for Windows, will
be available soon.
  * '''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 terminal window, then from the shell prompt create a
tuscany directory as follows:
{{{
mkdir tuscany
cd tuscany
}}}

We're going to download all the tuscany code and the
required dependencies in this directory.

= Downloading and installing the Java JDK 5.0 =
Point your Web browser to http://j
ava.sun.com/j2se/1.5.0/download.jsp.

Select "Download JDK 5.0 Update 6".

Accept the License agreement, then select Linux
self-extracting file - jdk-1_5_0_06-linux-i586.bin.

Download jdk-1_5_0_06-linux-i586.bin to the tuscany
directory.

>From the shell prompt do the following:
{{{
chmod +x ./jdk-1_5_0_06-linux-i586.bin
./jdk-1_5_0_06-linux-i586.bin
}}}
This will extract the Java JDK 5.0 to tuscany/jdk1_5_0_06.

Modify your user profile ($HOME/.bashrc if you're using
bash) and add the following lines:
{{{
JAVA_HOME=$HOME/tuscany/jdk1.5.0_06
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
}}}

= Downloading and installing Apache Maven 2.0.4 =
Point your Web browser to http://maven.a
pache.org/download.html.

Select "Maven 2.0.4 (tar.gz) -
maven-2.0.4-bin.tar.gz".

Download maven-2.0.4-bin.tar.gz to the tuscany directory.

>From the shell prompt do the following:
{{{
	tar xzvf maven-2.0.4-bin.tar.gz
}}}
This will extract Maven 2.0.4 under tuscany/maven-2.0.4.

Modify your user profile and add the following lines:
{{{
MVN_HOME=$HOME/tuscany/maven-2.0.4
export MVN_HOME
PATH=$MVN_HOME/bin:$PATH
}}}

= Downloading and installing Apache Ant 1.6.5 =
Point your Web browser to http://ant.apa
che.org/bindownload.cgi.

Select ".tar.gz archive:
apache-ant-1.6.5-bin.tar.gz".

Download apache-ant-1.6.5-bin.tar.gz to the tuscany
directory.

>From the shell prompt do the following:
{{{
tar xzvf apache-ant-1.6.5-bin.tar.gz
}}}
This will extract Ant 1.6.5 under tuscany/apache-ant-1.6.5.

Modify your user profile and add the following lines:
{{{
ANT_HOME=$HOME/tuscany/apache-ant-1.6.5
export ANT_HOME
PATH=$ANT_HOME/bin:$PATH
}}}

= Downloading and installing Subversion 1.3.0 =
Point your Web browser to h
ttp://subversion.tigris.org/project_packages.html.

Pick a Subversion RPM package for your system, for example
for a Red``Hat Enterprise Linux 4 pick http://summersoft
.fay.ar.us/pub/subversion/latest/rhel-4/bin/subversion-1.3.0
-1.rhel4.i386.rpm.

Download subversion-1.3.0-1.rhel4.i386.rpm to the tuscany
directory.

>From the shell prompt do the following:
{{}}
(you need to be root to install the subversion RPM)
{{{
rpm -iv subversion-1.3.0-1.rhel4.i386.rpm
}}}
This will install Subversion 1.3.0 on your system.

You can now close your terminal window.

= Verifying your setup =
Open a new terminal window, then from the shell prompt do
the following:
{{{
java -version
mvn --version
ant -version
svn --version
}}}

You should see the following:

http://people.apache.org/~jsdelfino/wik
i/screencaps/linux/verifysetup.jpg

You are now ready to check out the Tuscany source code.

= Checking out the Tuscany source code =

>From the shell prompt, do the following:
{{{
cd tuscany
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 tuscany/java directory.

When the check out completes, do the following:
{{{
cd java
ls -1
}}}
You should see the following:

http://people.apache.org/~jsdelfino/
wiki/screencaps/linux/verifycheckout.jpg

You are now ready to build Tuscany.

= Building the Tuscany runtime =
>From the shell prompt do the following:
{{{
cd $HOME/tuscany/java
mvn
}}}

This will build Tuscany with Maven. Maven will download all
the dependency JARs, 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/wik
i/screencaps/linux/verifybuild.jpg

= Running the HelloWord sample =
To run the Hello``World sample you need to have the
following JARs on your Java classpath:
{{{
$HOME/.m2/repository/org/osoa/sca-api/SNAPSHOT/sca-api-SNAPS
HOT.jar
$HOME/.m2/repository/org/apache/tuscany/tuscany-common/SNAPS
HOT/tuscany-common-SNAPSHOT.jar
$HOME/.m2/repository/org/apache/tuscany/tuscany-core/SNAPSHO
T/tuscany-core-SNAPSHOT.jar
$HOME/.m2/repository/org/apache/tuscany/tuscany-model/SNAPSH
OT/tuscany-model-SNAPSHOT.jar
$HOME/.m2/repository/axis/axis-wsdl4j/1.2/axis-wsdl4j-1.2.ja
r
$HOME/.m2/repository/commonj/sdo-api/SNAPSHOT/sdo-api-SNAPSH
OT.jar
$HOME/.m2/repository/org/apache/tuscany/tuscany-sdo-impl/SNA
PSHOT/tuscany-sdo-impl-SNAPSHOT.jar
$HOME/.m2/repository/org/eclipse/emf/ecore/2.2.0-SNAPSHOT/ec
ore-2.2.0-SNAPSHOT.jar
$HOME/.m2/repository/org/eclipse/emf/common/2.2.0-SNAPSHOT/c
ommon-2.2.0-SNAPSHOT.jar
$HOME/.m2/repository/org/eclipse/emf/ecore-change/2.2.0-SNAP
SHOT/ecore-change-2.2.0-SNAPSHOT.jar
$HOME/.m2/repository/stax/stax-api/1.0/stax-api-1.0.jar
$HOME/.m2/repository/woodstox/wstx-asl/2.8.2/wstx-asl-2.8.2.
jar
$HOME/.m2/repository/org/apache/tuscany/sca/containers/
$HOME/.m2/repository/org/apache/tuscany/sca/containers/tusca
ny-container-java/SNAPSHOT/tuscany-container-java-SNAPSHOT.j
ar
}}}

Instead of copying all these JARs by hand, you can use one
of the Tuscany build scripts to create a directory with a
copy of all the required JARs.

>From the shell prompt, do the following:
{{{
ant -f $HOME/tuscany/java/testing/tomcat/build.xml
-Dtuscany.acceptance.target.dir=$HOME/tuscany/java/target
j2se
}}}
This will copy all the required JARs into directory
tuscany/java/target/j2se. From the shell prompt do the
following:
{{}}
You should see the following:

http://people.apache.org/~jsdelfino/wiki
/screencaps/linux/verifyj2se.jpg

You are now ready to run the Tuscany Hello``World sample. Do
the following:
{{{
cd samples/helloworld
java -Djava.ext.dirs=$HOME/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/w
iki/screencaps/linux/runhelloworld.jpg

= Downloading and installing Tomcat =
Point your Web browser to http://apache.secsup.org/d
ist/tomcat/tomcat-5/v5.5.16/bin/apache-tomcat-5.5.16.tar.gz.


Download apache-tomcat-5.5.16.tar.gz to the tuscany
directory.

To install Tomcat, from the shell prompt do the following:
{{{
cd $HOME/tuscany
tar xzvf apache-tomcat-5.5.16.tar.gz
}}}
This will extract Tomcat to tuscany/apache-tomcat-5.5.16.

>From the shell prompt do the following:
{{{
ant -f java/testing/tomcat/build.xml
-Dtuscany.acceptance.tc.dir=$HOME/tuscany/apache-tomcat-5.5.
16 tuscany.tomcat.fixup
}}}
This will configure Tomcat to use Tuscany and will install
the Tuscany JARs under the Tomcat lib directory. You should
see the following:

http://people.apache.org/~jsdelfino/wik
i/screencaps/linux/tomcatsetup.jpg

You are now ready to start Tomcat and run the Tuscany
Hello``World``Web sample.

= Running the HelloWorldWeb sample =

>From the shell prompt, do the following:
{{{
cp
java/samples/helloworld/helloworldweb/target/helloworldWeb-S
NAPSHOT.war apache-tomcat-5.5.16/webapps
}}}
This will install the Hello``World``Web sample Web
application.
{{{
apache-tomcat-5.5.16/bin/startup.sh
}}}
This will start Tomcat. You should see the following:

http://people.apache.org/~jsdelfino/wik
i/screencaps/linux/starttomcat.jpg

Point your Web browser to http://localhost:8080, you
should see the following:

http://people.apache.org/~jsdelfino/wiki
/screencaps/linux/tomcathome.jpg

To run the Hello``World``Web sample Web application, point
your Web browser to http://l
ocalhost:8080/helloworldWeb-SNAPSHOT, you should see the
following:

http://people.apache.org/~jsdelfino/w
iki/screencaps/linux/helloworldweb.jpg

Click the Submit button, this will execute the sample
Hello``World SCA service. You should see the following:

http://people.apache.org/~jsdel
fino/wiki/screencaps/linux/helloworldwebsubmit.jpg

To stop Tomcat, from the shell prompt do the following:
{{{
apache-tomcat-5.5.16/bin/shutdown.sh
}}}
This will stop Tomcat, you should see the following:

http://people.apache.org/~jsdelfino/wiki
/screencaps/linux/stoptomcat.jpg
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )