From 2ae32b04b9d771118a7cafc1d7edec86fbe9c3c0 Mon Sep 17 00:00:00 2001 From: lresende Date: Sat, 21 Nov 2009 07:50:17 +0000 Subject: Moving site tags git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882847 13f79535-47bb-0310-9956-ffa450edef68 --- .../site-author/java-projects.xml | 343 +++++++++++++++++++++ 1 file changed, 343 insertions(+) create mode 100644 site/tags/site-090106-pre667/site-author/java-projects.xml (limited to 'site/tags/site-090106-pre667/site-author/java-projects.xml') diff --git a/site/tags/site-090106-pre667/site-author/java-projects.xml b/site/tags/site-090106-pre667/site-author/java-projects.xml new file mode 100644 index 0000000000..5cfc73d02e --- /dev/null +++ b/site/tags/site-090106-pre667/site-author/java-projects.xml @@ -0,0 +1,343 @@ + + + + Tuscany Java projects + Tuscany Java projects + + +
+

+

    + +
  1. System requirements
  2. +
  3. Environment Scripts- template scripts to setup your environment.
  4. +
  5. Checkout and build Tuscany Java project
  6. +
  7. Running samples
  8. +
  9. Create and submit a patch
  10. +
  11. Java Coding Guidelines
  12. +
  13. Using Eclipse for IDE
  14. +
  15. Using IDEA style templates
  16. +
  17. Logging
  18. +
+

+
+ + +
+

+ Next, please download the following in order to get your machine ready for Java development. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SoftwareDownload LinkDownload Instructions
JDK 5.0 Update 6 or later + jdk 5.0 + Steps for Java setup is here.
Apache Maven 2.0.4 or laterMaven 2.04 +
    +
  • + We are using Maven 2 to build Tuscany, plus a few Ant scripts. Steps for Maven setup is here. +
  • +
  • + A quick reference on Maven is available here +
  • +
+
Apache Ant 1.6.5 or laterAnt Steps for Ant setup is here.
Subversion 1.3.0 or later Subversion +
    +
  • Tuscany source code is stored in a Subversion (SVN) repository, you need Subversion to download it. Steps for svn setup is here.
  • +
  • A quick reference for subversion commands is here
  • +
  • Note: Some linux distributions may already have a subversion client installed. try executing "svn --version"
  • +
+
Apache Tomcat 5.5.17 + apache tomcat 5.5 + + This is the Web container that we integrate with, to allow you to use the SCA programming + model in Web applications. + Steps for Tomcat setup is here. +
+

+ +

+
+ + +
+Open a Command Prompt window, then from the command prompt create a directory named "tuscany": +This is the directory where we're going to check out the Tuscany code from subversion. +
+
+

There is a windows setenv.bat and a linux setenv.sh script that you can +download by right clicking and "selecting save as..." You can edit these scripts + with the below described environment variables to set up your environment any time by running them. On linux you invoke the shell script with +

+ . ./setenv.sh
+ 
+

+
+ +
+
    +
  • + Download and extract the appropriate JDK for your operating system from http://java.sun.com/j2se/1.5.0/download.jsp. +
  • +
  • + set the JAVA_HOME environment variable to point to the root directory of where you extracted java download. +
  • +
  • + Add to your PATH environment variable to include the full path to the bin subdirectory of the JDK download package. +
  • +
+
+ + + +
+
    +
  • + Download and extract Maven 2.0.4 or later from http://maven.apache.org/download.html. +
  • +
  • + Add to your PATH environment variable to include the the full path to the bin subdirectory of the Maven download package. +
  • +
+
+ +
+
    +
  • + Download and extract Ant 1.6.5 or later from http://ant.apache.org/bindownload.cgi. +
  • +
  • + Add to your PATH environment variable to include the the full path to the bin subdirectory of the Ant download. +
  • +
+
+ +
+
    +
  • + Download and extract Subversion 1.3.1 or later from http://subversion.tigris.org/project_packages.html. +
  • +
  • + Modify your path statement to include the full path to the subversion bin directory. +
  • +

    Note: For linux you may need to install subversion as root

    +
+

A quick reference for subversion commands is here

+
+ + +
+ +
+ + +
+

+ Check out Tuscany Java +

+

+ From the command prompt, in the tuscany directory 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 java sub directory. +

+

+

+

+ Build Tuscany Java +

+

+ When the check out completes change to the java subdirectory. + From the command prompt do the following build tuscany using maven: +

+        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. +

+

+Note: Depending on the load of remote Mavan 2.0 repositories you may have to execute mvn several time until required + dependencies are all located in your local maven repository. After you have completed a full successful build you + can use "mvn -o" which is much faster. +

+
+ +
+

Run the samples by building the distribution.

+
    +
  • + Change the directory to the tuscany\java\distribution +
  • +
  • + Run build-dist.bat (for win32 platforms), or build-dist.sh (for linux) +
  • +
  • + Change the directory tuscany\java\distribution\target\tuscany-dist +
  • +
  • + + Follow the directions in GettingStarted.htm. +
  • +
+ +
+ +
+

+ + Link to Eclipse download : + + + http://www.eclipse.org/downloads/index.php + + + +

+

+ Getting Started documentation: + + http://www.eclipse.org/downloads/index.php + +

+

+ To create the eclipse projects to use for SCA development: +

+

+ 1) When checking code out from subversion, checkout the + subversion trunk to a location outside your eclipse + workspace (it has to be outside because Eclipse will + not allow you to import projects from a location + overlapping with your workspace) +

+

+ 2) Go to Import / Existing projects into workspace. + + Select either the runtime, spec, tools or samples + directory. + + The wizard proposes the list of Eclipse projects + under that directory. Importing the projects does + not copy the files; it just makes the files at that + location visible under an Eclipse project. +

+

+ 3) If you need to use Eclipse to edit files outside of + these projects (for example the etc directory, or + the maven files at the root of the trunk), then + delete the Eclipse projects, with the option to not + delete the files, and import the whole trunk as a + project. +

+
+
+ If you are using Eclipse, Tuscany has a preferred Java coding style. Please use the + tuscany-eclipse-codestyle.xml in Eclipse. +
Download this file. You may need to right click and save. + Then in Eclipse:
+
+                Window->Preferences->Java->Code-Style->Formatter->Import...
+                (Specify path and file to the tuscany-eclipse-codestyle.xml just downloaded. 
+                
+
+
+

+ Install the Subversion Eclipse Plugin as described here: + http://subclipse.tigris.org/ + +

+
    +
  1. + Open the SVN Repository Exploring perspective +
  2. + +
  3. + Right click in the SVN Repository view. + +
  4. +
  5. Select "New" and "Repository Location" + +
  6. +
  7. + Url: + + http://svn.apache.org/repos/asf/incubator/tuscany + +

    + Use URL https://svn.apache.org/repos/asf/incubator/tuscany if you + have committer rights and need to commit changes back to the repository. +

    +
  8. +
  9. + Select the "Finish" button and allow Subeclipse time to access the repository and + display its contents in the SVN Repository explorer. Once the repository is displayed + in the explorer, you will see a number of subfolders displayed. The ones that are + relevant are "java", "cpp" and "site" - which contain the Tuscany Java runtime, the + Tuscany C++ runtime and the Tuscany website material respectively. +
  10. +
  11. + Select the folder you want to check out as a project - one of java, cpp or site for example + Right click, select "Checkout" and "Checkout using new project wizard" - select the appropriate + options for your needs and then click "Finish" +
  12. +
+

+ You can check in changes using the "Commit" item in the team submenu of the Java perspective. +

+
+ +
+ If you are using IDEA IDE, Tuscany has a preferred Java coding style. Please use the + tuscany-idea-codestyle.xml in IDEA +
Download this file. You may need to right click and save. +
+                        copy tuscany-idea-codestyle.xml to ~/.IntelliJIdea50/config/codestyles
+                        File->Settings, Project Code Styles, Import
+                        
+
+ +
+ For more information regarding how to add logging to your code you can review + Tuscany Monitoring +
+ +
-- cgit v1.2.3