Headless Eclipse Workspace Configurator
To develop Tuscany SCA using Eclipse, you are required to configure the workspace as follows:
- Create a classpath variable M2_REPO that points to the maven local repository
- Set the target platform from the target definition file generated by Tuscany distribution
- Import the projects from the directory where Tuscany source code is checked out and built
- Refresh and build the Eclipse workspace
All these steps only work manually with Eclipse UI. It's time consuming and error-prone.
With this tiny Eclipse application, we can now confiure an Eclipse workspace on a command line.
For example, you can run the following command:
On Windows:
eclipsec -nosplash -data c:\workspace\tuscany -application org.apache.tuscany.eclipse.workspace.WorkspaceConfigurator -source.root C:\tuscany\sca-java-2.x\trunk -target.definition C:\tuscany\sca-java-2.x\trunk\distribution\all\target\features\tuscany-distribution-all\tuscany-pde35.target
On Linux:
eclipse -nosplash -data /workspace/tuscany -application org.apache.tuscany.eclipse.workspace.WorkspaceConfigurator -source.root /tuscany/sca-java-2.x/trunk -target.definition /tuscany/sca-java-2.x/trunk/distribution/all/target/features/tuscany-distribution-all/tuscany-pde35.target
Arguments:
- -data workspace location
- -application org.apache.tuscany.eclipse.workspace.WorkspaceConfigurator
- -source.root the source directory where Tuscany is checked out and built (if not present, no projects will be imported)
- -target.definition the target definition file (if not present, the target platform won't be set)
- -maven.repo The local maven repo (if not present, default to user.home/.m2/repository)