summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/travelsample-1.0-RC3/distribution/src/main/release/BUILDING
blob: e5eabe3b882c92cbf9e1227f4abf28c20f72b04d (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Building the Apache Tuscany SCA Travel Sample 1.0 June 2010 release distribution
================================================================================

Initial Setup
-------------

1) Install Java SE JDK 5 or JDK 6, which can be downloaded from 
   http://java.sun.com/javase/downloads/index.jsp. For JDK 5 use update 22
   and for JDK 6 use update 7 (or later).

2) Make sure that your JAVA_HOME environment variable is set to the newly installed 
   JDK location, and that your PATH includes %JAVA_HOME%\bin (windows) or 
   $JAVA_HOME/bin (unix).

3) Install Apache Maven 2.0.7 or later, which can be downloaded from 
   http://maven.apache.org/download.html. Make sure that your M2_HOME
   environment variable is set to the installation base directory, and that
   your PATH includes %M2_HOME%\bin (windows) or $M2_HOME/bin (unix). 

4) Install Apache Ant 1.7.1 or later, which can be downloaded from 
   http://ant.apache.org/bindownload.cgi. Make sure that your ANT_HOME
   environment variable is set to the installation base directory, and that
   your PATH includes %ANT_HOME%\bin (windows) or $ANT_HOME/bin (unix). 

5) Download the Apache Tuscany SCA Java 1.6 (or later) binary distribution
   from http://tuscany.apache.org/sca-java-1x-releases.html and unpack it
   into a local directory. Set your TUSCANY_HOME environment variable to
   the base directory containing the unpacked binary distribution.

6) Download the Apache Tuscany SCA Java Travel Sample 1.0 (or later) distribution
   from http://tuscany.apache.org/sca-java-travel-sample-1x-releases.html and
   unpack it into a local directory.


Building using Ant
------------------

1) Change to the "travelsample" directory of the Apache Tuscany SCA Travel Sample
   distribution which you unpacked in step 6) above.

2) Run the command "ant". This will compile the complete travel sample and
   run all of the travel sample unit tests.


Building using Maven
--------------------

1) Change to the "travelsample" directory of the Apache Tuscany SCA Travel Sample
   distribution which you unpacked in step 6) above.

2) Run the command "mvn". You will need a live internet connection so that
   Maven can download any required files to your local repository. This will
   compile the complete travel sample and run all of the travel sample unit tests.

   Depending on the load of remote Maven 2.0 repositories, you may have 
   to run "mvn" several times until the required dependencies are 
   all located in your local maven repository. It usually takes some time for 
   maven to download required dependencies in the first build. Once all the 
   dependencies have been downloaded you may use the -o option to run maven
   in offline mode, for example, 'mvn clean install -o'.

   When building with Maven, an executable binary package for the travel
   sample is created in the travelsample/binaries/target directory. By default
   this binary package is an add-on delta to the Tuscany SCA Java 1.6 binary
   distribution. If you want to produce a fully self-contained binary package
   in the travelsample/binaries/target directory (with no external dependencies),
   you can use the command "mvn -Pselfcontained" instead of "mvn" when
   building from the "travelsample" directory.


Building the Distribution
-------------------------

1) Change to the travelsample/distribution directory.

2) Run the command "mvn". This will build the distribution package
   with .zip and .tar.gz formats in the distribution/target directory.


Running the Travel Sample
-------------------------

Full details of how to run the travel sample can be found in the README
file in the "travelsample" directory of the unpacked distribution.


Changing the Tuscany SCA Java version used for the build
--------------------------------------------------------

If you are using Maven to build the travel sample, the maven build files
are set up to use the 1.6 version of Tuscany SCA Java. You can build
the travel sample using some other version of Tuscany SCA Java (for example,
a development snapshot) by changing the <tuscany.version> property in the
travelsample/pom.xml file.

If you are using Ant to build the travel sample, you can change the
version of Tuscany SCA Java used by the build by changing the setting of
the TUSCANY_HOME environment variable before running the build.


Building a development snaphost of the travel sample code
---------------------------------------------------------
   
You can build the latest development snapshot of the travel sample by
following these steps:

1) Install Apache Subversion 1.4.0 or later, which can be downloaded from 
http://subversion.apache.org/packages.html. Make sure that your PATH
includes the "bin" subdirectory of the installation base directory. 

2) Check out the travel sample code from svn using the following command:
svn co http://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk/tutorials/travelsample   

3) Change to the travelsample directory of your local travel sample checkout
and run the command "mvn". This will use Maven to compile the complete
travel sample and run all of the travel sample unit tests.

4) If you want to build the travel sample using Ant instead of Maven,
you need to peform the following additional steps:

  4a) Download the JUnit 4.5 (or later) binary distribution from
  http://github.com/KentBeck/junit/downloads and unpack it into a local
  directory. Set your the JUNIT_JAR environment variable to the full path
  to the junit-x.y.z.jar in the unpacked binary distribution taking care
  to replace x.y.z with the JUnit version number.

  4b) Download the Apache OpenEJB 3.1.2 (or later) binary distribution
  from http://openejb.apache.org/download.html and unpack it into a local
  directory. Set your OPENEJB_HOME environment variable to the base directory
  containing the unpacked binary distribution.

  4c) If you are using JDK 5, download the JAX-WS reference implementation
  version 2.1.7 from https://jax-ws.dev.java.net/2.1.7/ and unpack it into
  a local directory. Set your JAXWS_HOME environment variable to the base
  directory containing the unpacked download.

  4d) Change to the travelsample directory of your local travel sample
  checkout and run the command "ant". This will use Ant to compile the
  complete travel sample and run all of the travel sample unit tests.