Jump to: navigation, search

Difference between revisions of "Stardust/Source Code"

(Running the Build)
 
(53 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Installing Git ==
+
= Browsing the Source Code =
  
To checkout the source code you need to install git first. You have different options:
+
For initial quick browsing of the source code please go to http://git.eclipse.org/c/?q=stardust.
  
*[http://git-scm.com/ git scm] installs a minimal environment to run Git. It comes with a Bash,a Perl interpreter, the Git executable plus dependencies.
+
= Overview  =
*[http://code.google.com/p/msysgit/ msysgit] installs a build environment for Git on Windows. It includes git scm.
+
  
After installtion you can open a git shell to run git commands (git bash or git-cmd.bat).<br>
+
This documentation covers the local build of stardust. You can use the command line or build directly in the Eclipse IDE.  
  
== Downloading the Source Code ==
+
== Command Line Build ==
  
*Create a new folder where you like to download the sources (e.g. C:\stardust\git)
+
=== Installing Git  ===
*Create a new file, e.g. cloneStardust.cmd, and copy the following commands
+
<pre>git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.build.tools.git build.tools
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.ui.common.git common
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.components.git components
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.documentation.git documentation
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.engine.git engine
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.ide.git ide
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.ide.simulation.git ide.simulation
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.ide.wst.git ide.wst
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.git org.eclipse.stardust
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.product.git product
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.reporting.rt.git reporting.rt
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.reporting.app.web.git reporting.app.web
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.reporting.ui.git reporting.ui
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.ui.web.git ui.web
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.repository.git repository
+
git clone http://git.eclipse.org/gitroot//stardust/org.eclipse.stardust.ui.common.git ui.common
+
</pre>
+
*Save the file
+
*Go to your git installation and open git shell (e.g. execute git-cmd.bat on windows)
+
*Change to your just created download folder and execute cloneStardust.cmd
+
  
If you run git clone behind a HTTP proxy specify proxy details first.  
+
To checkout the source code you need to install git first. You have different options:  
<pre>git config --global http.proxy http://&lt;user&gt;:&lt;password&gt;@proxy:port</pre>
+
  
== Building Stardust  ==
+
*[http://git-scm.com/ git scm] installs a minimal environment to run Git. It comes with a Bash,a Perl interpreter, the Git executable plus dependencies.
 +
*[http://msysgit.github.io/ msysgit] installs a build environment for Git on Windows. It includes git scm. After installtion you can open a git shell to run git commands (git bash or git-cmd.bat).<br>
  
==== Build Tools ====
+
=== Clone git Repositories ===
  
After check out as described above you can build Stardust source code. You need [http://ant.apache.org/ Apache Ant] and [http://maven.apache.org/download.html Apache Maven]. If you do not already have those tools installed please download them from their official website and install them accordingly to their installation instructions in a location of your choice, later called ANT_HOME and M2_HOME. We suggest Ant 1.8.4 and Maven 3.0.4, but other similar versions should work as well. After those preparations are done perform the following steps ( also see the readme.txt in the product folder).
+
*Create a new folder, e.g. '''C:\\stardust''', and open a git shell there. (bash on Linux/Win or git-cmd.bat on Win)
 +
*Copy the following commands to a file named '''cloneStardust.cmd''' or '''cloneStardust.sh''' file.
 +
*Save it to the '''stardust''' folder and execute it.
 +
<pre>git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.build.tools.git build.tools
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.components.git components
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.deploy.jee.git deploy.jee
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.documentation.git documentation
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.engine.git engine
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.examples.git examples
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.git org.eclipse.stardust
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ide.git ide
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ide.simulation.git ide.simulation
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ide.wst.git ide.wst
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.product.git product
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.reporting.rt.git reporting.rt
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.repository.git repository
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ui.common.git ui.common
 +
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ui.web.git ui.web
  
==== Environment-specific Changes  ====
 
 
Make sure your environment variables '''ANT_HOME''', '''M2_HOME''' and '''JAVA_HOME''' are set correctly. Also add ant and maven to your %Path% environment variable. Create a file called private.properties in the folder [your stardust git dir]/build.tools/etc. Modify the file with a text editor and add the following content:
 
<pre>java16.home=[your java home path]
 
m2.home=[your maven home path]
 
 
</pre>  
 
</pre>  
for instance:
+
<br> If you run git clone behind a HTTP proxy specify proxy details first.  
<br>java16.home=C:/Program Files/Java/jdk1.6.0_32<br>  
+
<pre>git config --global http.proxy http://&lt;user&gt;:&lt;password&gt;@proxy:port</pre>  
m2.home=C:/tools/apache-maven-3.0.4<br><br>
+
Now you have the default checkout which is the '''master''' branch.
Make sure that you use forward slashes in property files!
+
  
==== Maven Configuration  ====
+
Following branches are available:
  
Open your maven settings.xml file (either in your user home\.m2 folder or in your maven_home\conf folder) and add this entry in the&lt;servers&gt; tag:&nbsp;<source lang="sql">
+
'''Please find in [[Stardust/Source Code/Branch strategy|Branch strategy]] explained which branch to use.'''
<server>
+
  <id>stardust-3rdparty-repo</id>
+
  <username>stardust.contributor</username>
+
  <password>\{DESede\}BKab8uCs+3KRLHy/l2AeHQ==</password>
+
</server>
+
</source> (Copy exactly as is. No need to replace anything here.)
+
  
==== Running the Builds  ====
+
For more details on the differences between stardust versions, please look at the [http://projects.eclipse.org/projects/soa.stardust project website].
  
Make sure your machine is connected to the internet, open a command line in your build folder and then execute these two commands replacing [build_tools_home] with the absolute path to your build.tools sub folder:  
+
If you like to clone a specific branch add '''"-b &lt;branch-name&gt;"''' to the git command. To work on a stable source please use release tags as checkout. We have a help script (linux) to do git commands on all stardust repositories:  
<pre>set MAVEN_OPTS=-Xmx768m -XX:MaxPermSize=128m</pre> <pre>mvn -f product/components-pom.xml -Pipp-build -Dbuild.tools.home=[build_tools_home] install</pre>
+
<pre>cd &lt;root-of-your-stardust-checkout&gt;
For instance:<br>  
+
build.tools\bin\git-all.sh checkout v1.0.0.20130612-0325-R</pre>
  
mvn -f product/components-pom.xml -Pipp-build -Dbuild.tools.home=c:/stardustbuild/build.tools install<br>
+
We tag every milestone and release build. See git for details.
  
Depending on your connection speed and other factors the completion of the second command can take up to several hours.<br>
+
=== Build Stardust ===
After build of components finished successfully, you should find the resulting artefacts in your local maven repository.<br><br> Now the eclipse p2 repository with the Stardust eclipse plug-ins can be built. Run the following command replacing&nbsp;[build_tools_home] with the absolute path to your build.tools sub folder:
+
<pre>mvn clean install -f product/pom.xml -Pfull-build,force-overwrite,ipp-build -Dbuild.tools.home=[build_tools_home]</pre>
+
for instance:
+
  
''mvn clean install -f product/pom.xml -Pforce-overwrite,ipp-build -Dbuild.tools.home=C:/stardustbuild/build.tools''
+
==== Prerequisites  ====
  
This will trigger the build of the p2 repository. After the build has finished successful, you will find the repository in the sub folder&nbsp;: <br>
+
*JDK - we suggest Java 1.7
 +
*[http://ant.apache.org/ Apache ANT] - we suggest Ant 1.8
 +
*[http://maven.apache.org/download.html Apache Maven] - we suggest Maven 3.2.5
  
''stardust/repository/org.eclipse.stardust.modeling.repository/target/repository/ ''
+
==== Running the Build  ====
  
and zipped as an update site:  
+
To maybe cover the different build configurations in branches, we have a '''readme.md''' available in the source tree. Please follow the steps described in [http://git.eclipse.org/c/stardust/org.eclipse.stardust.product.git/tree/README.md?h=release/4.1.0 readme.md] residing in '''product''' folder.
  
''stardust/repository/org.eclipse.stardust.modeling.repository/target/org.eclipse.stardust.modeling.repository.zip ''<br>
+
===== Version Qualifier =====
  
==== Where to go from here?<br> ====
+
The concrete value of the .qualifier version part may be set to a define value by appending "-DforceContextQualifer=<qualifier value>".
 +
Please note, that if you do not provide an explicit Stardust version and qualifier, build artifacts will use the default build version (which is currently 9.9.9-SNAPSHOT). You should check startust/org.eclipse.stardust/org.eclipse.stardust-parent/pom.xml for the ipp.version, which should equal the version you are
 +
using in your overall build.
  
Now you can use the build result, a local eclipse update site,&nbsp;to install Stardust. Follow the instructions in the section [[STP/Stardust/Knowledge_Base/Getting_Started/Installation#Local_Eclipse_Update_Site_.28offline.29|Local Eclipse Update Site (offline)]]<br>
+
==== Where to go from here?<br> ====
  
Next check out the resource in the [[STP/Stardust/Knowledge_Base|Stardust Knowledge Base]], especially the [[STP/Stardust/Knowledge_Base#Getting_Started|Getting Started]] section. You may also want to check out the [http://www.eclipse.org/forums/index.php?t=thread&frm_id=225 Forum] to post questions or just exchange thoughts with the community.<br>
+
Now you can use the build result, '''a local eclipse update site''',&nbsp;to install Stardust. Follow the instructions in the section [[Stardust/Knowledge Base/Getting Started/Installation#Local_Eclipse_Update_Site|Local Eclipse Update Site (offline)]]<br>
  
== Troubleshooting<br>  ==
+
If you like to consume our '''archetypes''', e.g. tomcat7 web archive, via maven please find documentation here: [http://wiki.eclipse.org/Stardust/Knowledge_Base/Build_and_Change_Management/Maven/Basic_Setup Maven - Basic Setup]
  
If you experience any problems downloading the source code or building Stardust then please contact us via the [http://www.eclipse.org/forums/index.php?t=thread&frm_id=225 Forum].<br>  
+
Next check out the resource in the [[Stardust/Knowledge Base|Stardust Knowledge Base]], especially the [[Stardust/Knowledge Base#Getting_Started|Getting Started]] section. You may also want to check out the [http://www.eclipse.org/forums/index.php?t=thread&frm_id=225 Forum] to post questions or just exchange thoughts with the community.<br>
 +
To access the '''online help''' please consult [http://help.eclipse.org/topic/org.eclipse.stardust.docs.dev/html/toc.html help.eclipse.org]
  
==== Error retrieving BIRT Runtime<br>  ====
+
==== Troubleshooting<br>  ====
  
If you get the error below or something similar while running the p2 repository build (step 2) then this is caused by an instabilty of the connection with the Eclipse server. Retrying the same build command at a later point in time should resolve the issue.<br>
+
If you experience any problems downloading the source code or building Stardust then please contact us via the [http://www.eclipse.org/forums/index.php?t=thread&frm_id=225 Forum].<br>  
<pre>[ivy:retrieve]  Server access Error: Read timed out
+
url=http://download.eclipse.org/birt/downloads/drops/R-R1-2_6_2-201102191842/birt-runtime-2_6_2.zip
+
</pre>
+
  
==== Errors fetching Dependencies<br>  ====
+
===== Errors fetching Dependencies<br>  =====
  
 
If you encounter errors during the build that indicate <u>missing dependencies</u> which could not be fetched from the repositories then try cleaning the ivy cache folder .ivy in your <span style="font-style: italic;">user.</span>''home'' (e.g. C:\Users\your.name\.ivy, if it exists) and the maven repository (check settings.xml in ''M2_HOME''/etc and/or ''user.home''/.m2 to determine the location).<br>  
 
If you encounter errors during the build that indicate <u>missing dependencies</u> which could not be fetched from the repositories then try cleaning the ivy cache folder .ivy in your <span style="font-style: italic;">user.</span>''home'' (e.g. C:\Users\your.name\.ivy, if it exists) and the maven repository (check settings.xml in ''M2_HOME''/etc and/or ''user.home''/.m2 to determine the location).<br>  
  
If your are using <u>Maven 3.0.4 behind a proxy</u> please see [[Stardust/Knowledge_Base/Build_and_Change_Management/Maven/Basic_Setup#Troubleshooting|here]] on how to fix the issue.
+
If your are using <u>Maven 3.0.4 behind a proxy</u> please see [[Stardust/Knowledge Base/Build and Change Management/Maven/Basic Setup#Troubleshooting|here]] on how to fix the issue.
 
+
== Binary Distribution  ==
+
 
+
All Stardust source code has been submitted to the Eclipse git repository. A complete binary distribution requires libraries which are still pending approval by Eclipse legal, hence no binary distribution is available yet. One will be available for download form the project website as soon as the libraries have been approved.
+
 
+
== Compliance  ==
+
 
+
*The products libraries have been reviewed for license conflicts.
+
*Dependencies that did not comply with the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License] (EPL) have been replaced
+
*The source has been submitted to the Eclipse foundation where it was reviewed with regards to intellectual property rights and licensing.
+
*The source was refactored. All package names were change to the eclipse package names.
+

Latest revision as of 11:14, 21 December 2016

Browsing the Source Code

For initial quick browsing of the source code please go to http://git.eclipse.org/c/?q=stardust.

Overview

This documentation covers the local build of stardust. You can use the command line or build directly in the Eclipse IDE.

Command Line Build

Installing Git

To checkout the source code you need to install git first. You have different options:

  • git scm installs a minimal environment to run Git. It comes with a Bash,a Perl interpreter, the Git executable plus dependencies.
  • msysgit installs a build environment for Git on Windows. It includes git scm. After installtion you can open a git shell to run git commands (git bash or git-cmd.bat).

Clone git Repositories

  • Create a new folder, e.g. C:\\stardust, and open a git shell there. (bash on Linux/Win or git-cmd.bat on Win)
  • Copy the following commands to a file named cloneStardust.cmd or cloneStardust.sh file.
  • Save it to the stardust folder and execute it.
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.build.tools.git build.tools
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.components.git components
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.deploy.jee.git deploy.jee
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.documentation.git documentation
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.engine.git engine
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.examples.git examples
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.git org.eclipse.stardust
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ide.git ide
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ide.simulation.git ide.simulation
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ide.wst.git ide.wst
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.product.git product
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.reporting.rt.git reporting.rt
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.repository.git repository
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ui.common.git ui.common
git clone http://git.eclipse.org/gitroot/stardust/org.eclipse.stardust.ui.web.git ui.web


If you run git clone behind a HTTP proxy specify proxy details first.

git config --global http.proxy http://<user>:<password>@proxy:port

Now you have the default checkout which is the master branch.

Following branches are available:

Please find in Branch strategy explained which branch to use.

For more details on the differences between stardust versions, please look at the project website.

If you like to clone a specific branch add "-b <branch-name>" to the git command. To work on a stable source please use release tags as checkout. We have a help script (linux) to do git commands on all stardust repositories:

cd <root-of-your-stardust-checkout>
build.tools\bin\git-all.sh checkout v1.0.0.20130612-0325-R

We tag every milestone and release build. See git for details.

Build Stardust

Prerequisites

Running the Build

To maybe cover the different build configurations in branches, we have a readme.md available in the source tree. Please follow the steps described in readme.md residing in product folder.

Version Qualifier

The concrete value of the .qualifier version part may be set to a define value by appending "-DforceContextQualifer=<qualifier value>". Please note, that if you do not provide an explicit Stardust version and qualifier, build artifacts will use the default build version (which is currently 9.9.9-SNAPSHOT). You should check startust/org.eclipse.stardust/org.eclipse.stardust-parent/pom.xml for the ipp.version, which should equal the version you are using in your overall build.

Where to go from here?

Now you can use the build result, a local eclipse update site, to install Stardust. Follow the instructions in the section Local Eclipse Update Site (offline)

If you like to consume our archetypes, e.g. tomcat7 web archive, via maven please find documentation here: Maven - Basic Setup

Next check out the resource in the Stardust Knowledge Base, especially the Getting Started section. You may also want to check out the Forum to post questions or just exchange thoughts with the community.
To access the online help please consult help.eclipse.org

Troubleshooting

If you experience any problems downloading the source code or building Stardust then please contact us via the Forum.

Errors fetching Dependencies

If you encounter errors during the build that indicate missing dependencies which could not be fetched from the repositories then try cleaning the ivy cache folder .ivy in your user.home (e.g. C:\Users\your.name\.ivy, if it exists) and the maven repository (check settings.xml in M2_HOME/etc and/or user.home/.m2 to determine the location).

If your are using Maven 3.0.4 behind a proxy please see here on how to fix the issue.