summaryrefslogtreecommitdiffstats
path: root/sandbox/rfeng/eclipse-workspace-updatesite/index.html
blob: b1e1ef05e8aca4b604d5a8a235ce960f5f0bb674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<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>