summaryrefslogtreecommitdiffstats
path: root/tags/java-M1-final/java/testing/tomcat/sourceBuild.htm
blob: d764faf799a7167d1834661759a2febb59cd05d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><!-- Copyright (c) 2005 The Apache Software Foundation or its licensors,
as applicable. Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"><meta content="text/css" http-equiv="Content-Style-Type"><title>Tuscany Sample Setup</title><!-- LINK rel="stylesheet" href="ait.css" type="text/css" -->
<style type="text/css" media="all">
@import url("../../css/maven-base.css");
@import url("../../css/maven-theme.css");
@import url("../../css/site.css");
</style><link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></head>
<body>
<h2>Tuscany&nbsp;Sample Setup</h2><h3></h3>Getting
Tuscany
Obtain Subversion <a target="_blank" href="http://subversion.tigris.org/">Subversion</a><br>
<ul><li>md
tuscany</li>
<li>cd tuscany</li>
<li>svn co
http://svn.apache.org/repos/asf/incubator/tuscany/java</li>
</ul><h3>&nbsp;Build
Tuscany&nbsp;</h3>
Obtain <a target="_blank" href="http://maven.apache.org/">Maven
2.0.2</a><br>
<ul><li>cd
java</li>
<li>mvn</li>
</ul><h3>Setup</h3>
<h4><a name="J2SE_setup"></a>J2SE
setup</h4>
Tuscany applications can be run in a J2SE 5.0
environment. Before you
can run Tuscany applications in that environment, the Tuscany runtime
JAR files and the JAR files they depend on must be added to your J2SE
classpath.<br>
Samples&nbsp;not requiring invoking web
services
need at least the following jars in their classpath<br>
<a name="#J2SEJARSNWS"></a><br><table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
<tbody><tr>
<td><pre style="margin-left: 40px;">asm-2.2.jar<br>common-2.2.0-RC4.jar<br>commons-logging-1.0.4.jar<br>concurrent-1.3.4.jar<br>ecore-2.2.0-RC4.jar<br>ecore-change-2.2.0-RC4.jar<br>ecore-xmi-2.2.0-RC4.jar<br>geronimo-connector-1.0.jar<br>geronimo-j2ee-connector_1.5_spec-1.0.jar<br>geronimo-jta_1.0.1B_spec-1.0.jar<br>geronimo-transaction-1.0.jar<br>js-1.6R2.jar<br>sca-api-incubating-M1.jar<br>sdo-api-incubating-M1.jar<br>stax-api-1.0.jar<br>tuscany-binding-jsonrpc-incubating-M1.jar<br>tuscany-common-incubating-M1.jar<br>tuscany-container-java-incubating-M1.jar<br>tuscany-container-rhino-incubating-M1.jar<br>tuscany-core-incubating-M1.jar<br>tuscany-databinding-sdo-incubating-M1.jar<br>tuscany-model-incubating-M1.jar<br>tuscany-sdo-impl-incubating-M1.jar<br>wsdl4j-1.5.2.jar<br>wstx-asl-2.9.3.jar<br>xbean-2.1.0.jar<br>xsd-2.2.0-RC4.jar</pre>
</td></tr>
</tbody></table>
<span style="font-style: italic;">There is an <a href="http://ant.apache.org/bindownload.cgi" target="_blank">ant</a>
script in java\testing\tomcat\build.xml that will produce in
tuscany\java\testing\tomcat\target\j2se all the jars above once you
have completed the full maven build at the root. Run "<span style="font-weight: bold;">ant j2se</span>"
&nbsp;Use in java -Djava.ext.dirs to point to this directory to
include all these jars.</span><br>
<br>If
you're planning to use SCA Web Service bindings from your Tuscany
application, add the following JAR files to your classpath:<br>
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2"><tbody>
<tr><td>
<pre style="margin-left: 40px;">axiom-api-1.0.jar<br>axiom-impl-1.0.jar<br>axis2-kernel-1.0.jar<br>commons-codec-1.3.jar<br>commons-httpclient-3.0.jar<br>commons-logging-1.0.3.jar<br>junit-3.8.1.jar<br>neethi-1.0.1.jar<br>tuscany-binding-axis2-incubating-M1.jar<br>XmlSchema-1.0.2.jar</pre></td>
</tr></tbody>
</table><span style="font-style: italic;">here is an
<a href="http://ant.apache.org/bindownload.cgi" target="_blank">ant</a>
script in java\testing\tomcat\build.xml that will produce in
tuscany\java\testing\tomcat\target\j2sews all the jars above once you
have completed the full maven build at the root. Run "<span style="font-weight: bold;">ant j2sews</span>
&nbsp;Use in java -Djava.ext.dirs to point to this directory to
include all these jars.</span>
<h4><a name="Tomcat_Setup"></a>Tomcat
Setup</h4>
<p>The setup and configuration of &nbsp;the
Tomcat web server is a little more complex. &nbsp;If you are not
interested in the details the easiest means of &nbsp;configuring
this environment is by running "ant" in &nbsp;<span style="font-style: italic;">java\testing\tomcat </span>that
will configure a server that is
ready to run the samples and deploy your own SCA applications..</p>
<p>For
any other&nbsp;SCA application that is run in a Tomcat environment,
package it&nbsp;as a standard J2EE war file and deploy it as
usual. For
Tomcat this is simply done by copying them to its webapps
directory.&nbsp; </p>
<p>The
details:</p>
<ul compact="compact"><li>Unzip
Tomcat to acceptance\target\apache-tomcat-5.5.15 </li>
<li>Add
org.apache.Tuscany.tomcat.lifecycle.listener.TomcatServerLifecycleListener
to conf\server.xml<br>
<table style="width: 100%; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2"><tbody>
<tr><td style="background-color: rgb(204, 204, 204);"><code>Change
the Host element to add </code><span style="font-weight: bold;">className="org.apache.tuscany.tomcat.TuscanyHost"</span>
attribute like this<code>:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;Host <span style="color: rgb(255, 0, 0);">className="org.apache.tuscany.tomcat.TuscanyHost"
</span>name="localhost" appBase="webapps"
unpackWARs="true"
autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false"&gt;<br>
<br></code></td>
</tr></tbody>
</table><p>The following jars need to be placed in tomcats
common/lib directory</p>
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2"><tbody>
<tr><td>
<pre>	common-2.2.0-snapshot.jar<br>	ecore-2.2.0-snapshot.jar<br>	ecore-change-2.2.0-snapshot.jar<br>	ecore-xmi-2.2.0-snapshot.jar<br>	js-1.6r2.jar<br>	sca-api-incubating-m1.jar<br>	sdo-api-incubating-m1.jar<br>	stax-api-1.0.jar<br>	tuscany-das-rdb-incubating-m1.jar<br>	tuscany-sdo-impl-incubating-m1.jar<br>	wstx-asl-2.9.3.jar<br>	xbean-2.1.0.jar<br>	xsd-2.2.0-snapshot.jar<br>	jsonrpc-1.0.jar <span style="font-style: italic;"><span style="font-weight: bold;">Optional if you want javascript components</span></span><br><span style="font-style: italic;"><span style="font-weight: bold;"></span></span>	derby-10.1.2.1.jar <span style="font-style: italic;"><span style="font-weight: bold;">Optional if you want database support</span></span></pre></td>
</tr></tbody>
</table></li>
<li><p>The
following jars need to go into the server/lib</p>
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2"><tbody>
<tr><td>
<pre>	asm-2.2.jar<br>  	axiom-api-1.0.jar<br>  	axiom-impl-1.0.jar<br>  	axis2-kernel-1.0.jar<br>  	commons-codec-1.3.jar<br>  	commons-httpclient-3.0.jar<br>  	commons-logging-1.0.4.jar<br>  	concurrent-1.3.4.jar<br>  	geronimo-connector-1.0.jar<br>  	geronimo-j2ee-connector_1.5_spec-1.0.jar<br>  	geronimo-jta_1.0.1b_spec-1.0.jar<br>  	geronimo-transaction-1.0.jar<br>  	neethi-1.0.1.jar<br>  	tuscany-binding-axis2-incubating-m1.jar<br>  	tuscany-binding-jsonrpc-incubating-m1.jar<br>  	tuscany-common-incubating-m1.jar<br>  	tuscany-container-java-incubating-m1.jar<br>  	tuscany-container-rhino-incubating-m1.jar<br>  	tuscany-core-incubating-m1.jar<br>  	tuscany-databinding-sdo-incubating-m1.jar<br>  	tuscany-model-incubating-m1.jar<br>  	tuscany-tomcat-incubating-m1.jar<br>  	wsdl4j-1.5.2.jar<br>  	xmlschema-1.0.2.jar</pre></td>
</tr></tbody>
</table></li>
<li>or
the samples copy their war files to Tomcat's webapps
directory.</li>
</ul>
</body></html>