![rfeng](/assets/img/avatar_default.png)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@926675 13f79535-47bb-0310-9956-ffa450edef68
91 lines
3.7 KiB
HTML
91 lines
3.7 KiB
HTML
<html>
|
|
<head>
|
|
<title>tuscany-eclipse-workspace-updatesite</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<style>@import url("web/site.css");</style>
|
|
<script type="text/javascript">
|
|
var returnval = 0;
|
|
var stylesheet, xmlFile, cache, doc;
|
|
function init(){
|
|
// NSCP 7.1+ / Mozilla 1.4.1+ / Safari
|
|
// Use the standard DOM Level 2 technique, if it is supported
|
|
if (document.implementation && document.implementation.createDocument) {
|
|
xmlFile = document.implementation.createDocument("", "", null);
|
|
stylesheet = document.implementation.createDocument("", "", null);
|
|
if (xmlFile.load){
|
|
xmlFile.load("site.xml");
|
|
stylesheet.load("web/site.xsl");
|
|
} else {
|
|
alert("Document could not be loaded by browser.");
|
|
}
|
|
xmlFile.addEventListener("load", transform, false);
|
|
stylesheet.addEventListener("load", transform, false);
|
|
}
|
|
//IE 6.0+ solution
|
|
else if (window.ActiveXObject) {
|
|
xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
|
|
xmlFile.async = false;
|
|
xmlFile.load("site.xml");
|
|
stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
|
|
stylesheet.async = false;
|
|
stylesheet.load("web/site.xsl");
|
|
cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
|
|
cache.stylesheet = stylesheet;
|
|
transformData();
|
|
}
|
|
}
|
|
// separate transformation function for IE 6.0+
|
|
function transformData(){
|
|
var processor = cache.createProcessor();
|
|
processor.input = xmlFile;
|
|
processor.transform();
|
|
data.innerHTML = processor.output;
|
|
}
|
|
// separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+
|
|
function transform(){
|
|
returnval+=1;
|
|
if (returnval==2){
|
|
var processor = new XSLTProcessor();
|
|
processor.importStylesheet(stylesheet);
|
|
doc = processor.transformToDocument(xmlFile);
|
|
document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="init();">
|
|
<!--[insert static HTML here]-->
|
|
<h1>Headless Eclipse Workspace Configurator</h1>
|
|
To develop Tuscany SCA using Eclipse, you are required to configure the workspace as follows:
|
|
<ul>
|
|
<li>Create a classpath variable M2_REPO that points to the maven local repository
|
|
<li>Set the target platform from the target definition file generated by Tuscany distribution
|
|
<li>Import the projects from the directory where Tuscany source code is checked out and built
|
|
<li>Refresh and build the Eclipse workspace
|
|
</ul>
|
|
All these steps only work manually with Eclipse UI. It's time consuming and error-prone.
|
|
<br>
|
|
With this tiny Eclipse application, we can now confiure an Eclipse workspace on a command line.
|
|
For example, you can run the following command:
|
|
<p>
|
|
On Windows:<br>
|
|
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
|
|
|
|
<p>
|
|
On Linux:<br>
|
|
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
|
|
<p>
|
|
Arguments:
|
|
<ul>
|
|
<li>-data <i>workspace location</i>
|
|
<li>-application <b>org.apache.tuscany.eclipse.workspace.WorkspaceConfigurator</b>
|
|
<li>-source.root <i>the source directory where Tuscany is checked out and built</i> (if not present, no projects will be imported)
|
|
<li>-target.definition <i>the target definition file</i> (if not present, the target platform won't be set)
|
|
<li>-maven.repo <i>The local maven repo</i> (if not present, default to <i>user.home</i>/.m2/repository)
|
|
</ul>
|
|
<p>
|
|
<!--
|
|
<div id="data"></div>
|
|
-->
|
|
</body>
|
|
</html>
|