Difference between revisions of "Stardust/Source Code"

(New page: = Stardust Source Code Access = Currently the publishing of the source code is still in progress. A couple of steps need to be completed before it can be published in the eclipse code rep...)

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

−

Currently the publishing of the source code is still in progress. A couple of steps need to be completed before it can be published in the eclipse code repository and the team is very committed to completing those asap. Some example are:

+

== Installing Git ==

−

*The products libraries have to be reviewed for license conflicts (completed)

+

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

−

*Dependencies that do not comply with the [http://www.eclipse.org/legal/epl-v10.html Eclipe Public License] (EPL) have to be replaced in the source code (completed)

+

−

*The source has to be submitted to the Eclipse foundation where it is reviewed with regards to intellectual property rights and licensing (in progress)

+

−

*The source needs to be refactored. All package names have to be change to the new eclipse package names before to code is allowed to go into the repository (in progress)

+

−

Please check the [http://www.eclipse.org/stardust/ project website] regularly if you want to stay updated on the progress.

+

*[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://code.google.com/p/msysgit/ msysgit] installs a build environment for Git on Windows. It includes git scm.

−

You may also want to subscribe to the [https://dev.eclipse.org/mailman/listinfo/stardust-dev Stardust Developer mailing list] to be notified when the source is completely submitted to the eclipse repository.

+

After installtion you can open a git shell to run git commands (git bash or git-cmd.bat).<br>

+

+

== Downloading the Source Code ==

+

+

*Create a new folder where you like to download the sources (e.g. C:\stardust\git)

+

*Create a new file, e.g. cloneStardust.cmd, and copy the following commands

*Change to your just created download folder and execute cloneStardust.cmd

+

<blockquote>The above mentioned commands will checkout the master branch per default. Please note that the currently '''active branche''' is '''I_4_3 for Kepler''' driven builds. You can checkout by adding the '''"-b &lt;branch-name&gt;"''' parameter to the git command. </blockquote>

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

+

+

==== 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>

+

for instance:

+

<br>java16.home=C:/Program Files/Java/jdk1.6.0_32<br>

+

m2.home=C:/tools/apache-maven-3.0.4<br><br>

+

If you don't want to use the preconfigured Maven settings file [your stardust git dir]/build.tools/conf/m2/settings.xml then you have to specify the path of the actual settings file in your [your stardust git dir]/build.tools/etc/private.properties file, e.g

+

<pre>mvn.settings=C:/Program Files/Maven/conf/settings.xml

+

</pre>

+

Make sure that you use forward slashes in property files!

+

+

+

+

==== Running the Builds ====

+

+

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:

Depending on your connection speed and other factors the completion of the second command can take up to several hours.<br>

+

After build of components finished successfully, you should find the resulting artifacts in your local maven repository at [build_tools_home]/build/m2-repo.<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:

The above mentioned commands assumes that you're using the Maven settings file which is located in [build_tools_home]/conf/m2/. If you like to use the one of your user home folder or the one of your Maven installation folder (in this case please add the mvn.settings property in [build_tools_home]/etc/private.properties which is described above) then you can remove the "-s [build_tools_home]/conf/m2/settings.xml" parameter from the build commands.<br>

+

+

After the build has finished successful, you will find the repository in the sub folder&nbsp;: <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>

+

+

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>

+

+

== Troubleshooting<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>

+

+

==== Error retrieving BIRT Runtime<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 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.

+

+

== Importing projects into Eclipse ==

+

+

After you have executed the build you can import the projects into Eclipse. Although we're using Maven as the main dependency management system we have currently some projects which are using Ivy for the dependency management (this will be slowly but surely changed sooner or later). Because of the fact that the IvyDE plugin can handle Ivy and Maven projects we have adjusted all projects to work with this plugin.

+

+

==== Installing IvyDE plugin ====

+

At first you have to install the IvyDE plugin. To do that just click on "Install new Software..." in the Help menu item of Eclipse. In the upcoming dialog press the "Add..." button and provide the following URL http://www.apache.org/dist/ant/ivyde/updatesite. Please install "Apache IvyDE" and optionaly "Apache IvyDE Resolve Visualizer". These can be found in the section "Apache IvyDE Eclipse plugins".

+

+

==== Import build.tools project ====

+

Now import the ''build.tools'' project with help of the "Existing Projects into Workspace" wizard of the import dialog of Eclipse.

+

+

==== Configure IvyDE plugin ====

+

After the installation of IvyDE and the ''build.tools'' project import, open the preferences dialog of Eclipse which can be found in the ''Window'' menu item and click on ''Ivy'' in the left panel. Now configure the plugin as follows:

** this assumes that you have already imported the ''build.tools'' project in Eclipse

+

+

==== Importing all projects ====

+

In the last step you can import all remaining projects into Eclipse with the "Existing Projects into Workspace" wizard of the import dialog of Eclipse. As the root directory you can choose the GIT checkout folder. As a result of this all projects are listed in the ''Projects'' view. Please remove the marker left of the project ''stardust-hazelcast-ra'' because it is currently not used. After this click on the "Resolve All" button which can you find in the IvyDE toolbar:<br><br>

+

[[Image:ResolveAll-Button.png]]

+

+

This step can take some time. Therefore we're suggesting to open the ''Ivy Console'' in the Console view to see/validate the resolve progress.

+

+

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

Change to your just created download folder and execute cloneStardust.cmd

The above mentioned commands will checkout the master branch per default. Please note that the currently active branche is I_4_3 for Kepler driven builds. You can checkout by adding the "-b <branch-name>" parameter to the git command.

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

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

Building Stardust

Build Tools

After check out as described above you can build Stardust source code. You need Apache Ant and 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).

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:

If you don't want to use the preconfigured Maven settings file [your stardust git dir]/build.tools/conf/m2/settings.xml then you have to specify the path of the actual settings file in your [your stardust git dir]/build.tools/etc/private.properties file, e.g

mvn.settings=C:/Program Files/Maven/conf/settings.xml

Make sure that you use forward slashes in property files!

Running the Builds

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:

Depending on your connection speed and other factors the completion of the second command can take up to several hours.
After build of components finished successfully, you should find the resulting artifacts in your local maven repository at [build_tools_home]/build/m2-repo.

Now the eclipse p2 repository with the Stardust eclipse plug-ins can be built. Run the following command replacing [build_tools_home] with the absolute path to your build.tools sub folder:

The above mentioned commands assumes that you're using the Maven settings file which is located in [build_tools_home]/conf/m2/. If you like to use the one of your user home folder or the one of your Maven installation folder (in this case please add the mvn.settings property in [build_tools_home]/etc/private.properties which is described above) then you can remove the "-s [build_tools_home]/conf/m2/settings.xml" parameter from the build commands.

After the build has finished successful, you will find the repository in the sub folder :

Troubleshooting

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

Error retrieving BIRT Runtime

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.

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.

Importing projects into Eclipse

After you have executed the build you can import the projects into Eclipse. Although we're using Maven as the main dependency management system we have currently some projects which are using Ivy for the dependency management (this will be slowly but surely changed sooner or later). Because of the fact that the IvyDE plugin can handle Ivy and Maven projects we have adjusted all projects to work with this plugin.

Installing IvyDE plugin

At first you have to install the IvyDE plugin. To do that just click on "Install new Software..." in the Help menu item of Eclipse. In the upcoming dialog press the "Add..." button and provide the following URL http://www.apache.org/dist/ant/ivyde/updatesite. Please install "Apache IvyDE" and optionaly "Apache IvyDE Resolve Visualizer". These can be found in the section "Apache IvyDE Eclipse plugins".

Import build.tools project

Now import the build.tools project with help of the "Existing Projects into Workspace" wizard of the import dialog of Eclipse.

Configure IvyDE plugin

After the installation of IvyDE and the build.tools project import, open the preferences dialog of Eclipse which can be found in the Window menu item and click on Ivy in the left panel. Now configure the plugin as follows:

this assumes that you have already imported the build.tools project in Eclipse

Importing all projects

In the last step you can import all remaining projects into Eclipse with the "Existing Projects into Workspace" wizard of the import dialog of Eclipse. As the root directory you can choose the GIT checkout folder. As a result of this all projects are listed in the Projects view. Please remove the marker left of the project stardust-hazelcast-ra because it is currently not used. After this click on the "Resolve All" button which can you find in the IvyDE toolbar:

This step can take some time. Therefore we're suggesting to open the Ivy Console in the Console view to see/validate the resolve progress.

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.