JBoss Tools SVN: r26286 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-05 08:48:11 -0400 (Fri, 05 Nov 2010)
New Revision: 26286
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
Log:
[JBIDE-7503] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-11-05 12:31:47 UTC (rev 26285)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-11-05 12:48:11 UTC (rev 26286)
@@ -78,8 +78,8 @@
String imageFilterRules = getImageFilterRules(attrs.getNamedItem("imagefilter")); // $NON-NLS-1$
String key = DeltaCloud.getPreferencesKey(url, username); // $NON-NLS-1$
String instanceFilterRules = getInstanceFilterRules(attrs.getNamedItem("instancefilter")); // $NON-NLS-1$
- String lastKeyName = getLastKeyName(attrs.getNamedItem("lastkeyname"));
- String lastImageId = getLastKeyName(attrs.getNamedItem("lastimage"));
+ String lastKeyName = getLastKeyName(attrs.getNamedItem("lastkeyname")); // $NON-NLS-1$
+ String lastImageId = getLastKeyName(attrs.getNamedItem("lastimage")); // $NON-NLS-1$
ISecurePreferences root = SecurePreferencesFactory.getDefault();
ISecurePreferences node = root.node(key);
try {
@@ -122,24 +122,13 @@
public void saveClouds() {
try {
- IPath stateLocation = Activator.getDefault().getStateLocation();
- File cloudFile = stateLocation.append(CLOUDFILE_NAME).toFile();
- if (!cloudFile.exists()) {
- cloudFile.createNewFile();
- }
+ File cloudFile = getOrCreateCloudFile();
if (cloudFile.exists()) {
PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(cloudFile)));
p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
p.println("<clouds>"); // $NON-NLS-1$
for (DeltaCloud d : clouds) {
- p.println("<cloud name=\"" + d.getName() + "\" url=\"" //$NON-NLS-1$ //$NON-NLS-2$
- + d.getURL() + "\" username=\"" + d.getUsername() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" type=\"" + d.getType() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" imagefilter=\"" + d.getImageFilter() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" instancefilter=\"" + d.getInstanceFilter() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" lastkeyname=\"" + d.getLastKeyname() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" lastimage=\"" + d.getLastImageId() + //$NON-NLS-1$ //$NON-NLS-2$
- "\"/>"); //$NON-NLS-1$
+ p.println(createCloudXML(d)); //$NON-NLS-1$
}
p.println("</clouds>"); //$NON-NLS-1$
p.close();
@@ -149,6 +138,27 @@
}
}
+ private String createCloudXML(DeltaCloud d) {
+ return "<cloud name=\"" + d.getName() + "\" url=\"" //$NON-NLS-1$ //$NON-NLS-2$
+ + d.getURL() + "\" username=\"" + d.getUsername() + //$NON-NLS-1$ //$NON-NLS-2$
+ "\" type=\"" + d.getType() + //$NON-NLS-1$ //$NON-NLS-2$
+ "\" imagefilter=\"" + d.getImageFilter() + //$NON-NLS-1$ //$NON-NLS-2$
+ "\" instancefilter=\"" + d.getInstanceFilter() + //$NON-NLS-1$ //$NON-NLS-2$
+ "\" lastkeyname=\"" + d.getLastKeyname() + //$NON-NLS-1$ //$NON-NLS-2$
+ "\" lastimage=\"" + d.getLastImageId() + //$NON-NLS-1$ //$NON-NLS-2$
+ "\"/>";
+ }
+
+ private File getOrCreateCloudFile() throws IOException {
+ IPath stateLocation = Activator.getDefault().getStateLocation();
+ File cloudFile = stateLocation.append(CLOUDFILE_NAME).toFile();
+ if (!cloudFile.exists()) {
+ // try to create a new cloud storage file
+ cloudFile.createNewFile();
+ }
+ return cloudFile;
+ }
+
public static DeltaCloudManager getDefault() {
if (cloudManager == null)
cloudManager = new DeltaCloudManager();
@@ -179,17 +189,10 @@
String userName = d.getUsername();
// check if we have a duplicate cloud connection using the same
// url/username combo.
- boolean found = false;
- for (DeltaCloud cloud : clouds) {
- if (cloud.getURL().equals(url) && cloud.getUsername().equals(userName)) {
- found = true;
- break;
- }
- }
// if we have removed a cloud and no other cloud shares the
// url/username combo, then we should clear the node out which
// includes the password.
- if (!found) {
+ if (!isHasAnyCloud(url, userName)) {
ISecurePreferences root = SecurePreferencesFactory.getDefault();
String key = DeltaCloud.getPreferencesKey(url, userName);
ISecurePreferences node = root.node(key);
@@ -199,6 +202,22 @@
notifyListeners(ICloudManagerListener.REMOVE_EVENT);
}
+ /**
+ * Checks if any cloud uses the given url and username
+ *
+ * @param url the url
+ * @param userName the user name
+ * @return true, if is checks for any cloud
+ */
+ private boolean isHasAnyCloud(String url, String userName) {
+ for (DeltaCloud cloud : clouds) {
+ if (cloud.getURL().equals(url) && cloud.getUsername().equals(userName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
public void notifyCloudRename() {
saveClouds();
notifyListeners(ICloudManagerListener.RENAME_EVENT);
15 years, 5 months
JBoss Tools SVN: r26285 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-05 08:31:47 -0400 (Fri, 05 Nov 2010)
New Revision: 26285
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
Log:
[JBIDE-7503] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-11-05 11:26:03 UTC (rev 26284)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-11-05 12:31:47 UTC (rev 26285)
@@ -33,17 +33,17 @@
import org.xml.sax.SAXException;
public class DeltaCloudManager {
-
+
public final static String CLOUDFILE_NAME = "clouds.xml"; //$NON-NLS-1$
-
+
private static DeltaCloudManager cloudManager;
private ArrayList<DeltaCloud> clouds = new ArrayList<DeltaCloud>();
private ListenerList cloudManagerListeners;
-
+
private DeltaCloudManager() {
loadClouds();
}
-
+
private void loadClouds() {
IPath stateLocation = Activator.getDefault().getStateLocation();
File cloudFile = stateLocation.append(CLOUDFILE_NAME).toFile();
@@ -57,53 +57,9 @@
NodeList cloudNodes = e.getElementsByTagName("cloud"); // $NON-NLS-1$
for (int x = 0; x < cloudNodes.getLength(); ++x) {
Node n = cloudNodes.item(x);
- NamedNodeMap attrs = n.getAttributes();
- Node nameNode = attrs.getNamedItem("name"); // $NON-NLS-1$
- Node urlNode = attrs.getNamedItem("url"); // $NON-NLS-1$
- Node usernameNode = attrs.getNamedItem("username"); // $NON-NLS-1$
- Node typeNode = attrs.getNamedItem("type"); // $NON-NLS-1$
- Node imageFilterNode = attrs.getNamedItem("imagefilter"); //$NON-NLS-1$
- Node instanceFilterNode = attrs.getNamedItem("instancefilter"); //$NON-NLS-1$
- Node lastKeyNameNode = attrs.getNamedItem("lastkeyname"); //$NON-NLS-1$
- Node lastImageIdNode = attrs.getNamedItem("lastimage"); //$NON-NLS-1$
- String name = nameNode.getNodeValue();
- String url = urlNode.getNodeValue();
- String username = usernameNode.getNodeValue();
- String type = typeNode.getNodeValue();
- String key = DeltaCloud.getPreferencesKey(url, username);
- String imageFilterRules = null;
- if (imageFilterNode != null)
- imageFilterRules = imageFilterNode.getNodeValue();
- else
- imageFilterRules = IImageFilter.ALL_STRING;
- String instanceFilterRules = null;
- if (instanceFilterNode != null)
- instanceFilterRules = instanceFilterNode.getNodeValue();
- else
- instanceFilterRules = IInstanceFilter.ALL_STRING;
- String lastKeyName = "";
- if (lastKeyNameNode != null)
- lastKeyName = lastKeyNameNode.getNodeValue();
- String lastImageId = "";
- if (lastImageIdNode != null)
- lastImageId = lastImageIdNode.getNodeValue();
- ISecurePreferences root = SecurePreferencesFactory.getDefault();
- ISecurePreferences node = root.node(key);
- String password;
- try {
- password = node.get("password", null); //$NON-NLS-1$
- DeltaCloud cloud = new DeltaCloud(name, url, username, password, type,
- false, imageFilterRules, instanceFilterRules);
- cloud.setLastImageId(lastImageId);
- cloud.setLastKeyname(lastKeyName);
- cloud.loadChildren();
- clouds.add(cloud);
- } catch (Exception e1) {
- Activator.log(e1);
- continue; // skip cloud
- }
+ loadCloud(n);
}
- }
+ }
} catch (ParserConfigurationException e) {
Activator.log(e);
} catch (SAXException e) {
@@ -113,20 +69,71 @@
}
}
+ private void loadCloud(Node n) {
+ NamedNodeMap attrs = n.getAttributes();
+ String name = attrs.getNamedItem("name").getNodeValue(); // $NON-NLS-1$
+ String url = attrs.getNamedItem("url").getNodeValue(); // $NON-NLS-1$
+ String username = attrs.getNamedItem("username").getNodeValue(); // $NON-NLS-1$
+ String type = attrs.getNamedItem("type").getNodeValue(); // $NON-NLS-1$
+ String imageFilterRules = getImageFilterRules(attrs.getNamedItem("imagefilter")); // $NON-NLS-1$
+ String key = DeltaCloud.getPreferencesKey(url, username); // $NON-NLS-1$
+ String instanceFilterRules = getInstanceFilterRules(attrs.getNamedItem("instancefilter")); // $NON-NLS-1$
+ String lastKeyName = getLastKeyName(attrs.getNamedItem("lastkeyname"));
+ String lastImageId = getLastKeyName(attrs.getNamedItem("lastimage"));
+ ISecurePreferences root = SecurePreferencesFactory.getDefault();
+ ISecurePreferences node = root.node(key);
+ try {
+ String password = node.get("password", null); //$NON-NLS-1$
+ DeltaCloud cloud = new DeltaCloud(name, url, username, password, type,
+ false, imageFilterRules, instanceFilterRules);
+ cloud.setLastImageId(lastImageId);
+ cloud.setLastKeyname(lastKeyName);
+ cloud.loadChildren();
+ clouds.add(cloud);
+ } catch (Exception e1) {
+ Activator.log(e1);
+ return;
+ }
+ }
+
+ private String getLastKeyName(Node lastKeyNameNode) {
+ String lastKeyName = "";
+ if (lastKeyNameNode != null) {
+ lastKeyName = lastKeyNameNode.getNodeValue();
+ }
+ return lastKeyName;
+ }
+
+ private String getInstanceFilterRules(Node instanceFilterNode) {
+ String instanceFilterRules = IInstanceFilter.ALL_STRING;
+ if (instanceFilterNode != null) {
+ instanceFilterRules = instanceFilterNode.getNodeValue();
+ }
+ return instanceFilterRules;
+ }
+
+ private String getImageFilterRules(Node imageFilterNode) {
+ String imageFilterRules = IImageFilter.ALL_STRING;
+ if (imageFilterNode != null) {
+ imageFilterRules = imageFilterNode.getNodeValue();
+ }
+ return imageFilterRules;
+ }
+
public void saveClouds() {
try {
IPath stateLocation = Activator.getDefault().getStateLocation();
File cloudFile = stateLocation.append(CLOUDFILE_NAME).toFile();
- if (!cloudFile.exists())
+ if (!cloudFile.exists()) {
cloudFile.createNewFile();
+ }
if (cloudFile.exists()) {
PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(cloudFile)));
p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
p.println("<clouds>"); // $NON-NLS-1$
for (DeltaCloud d : clouds) {
p.println("<cloud name=\"" + d.getName() + "\" url=\"" //$NON-NLS-1$ //$NON-NLS-2$
- + d.getURL() +
- "\" username=\"" + d.getUsername() + //$NON-NLS-1$ //$NON-NLS-2$
+ + d.getURL() + "\" username=\"" + d.getUsername() + //$NON-NLS-1$ //$NON-NLS-2$
"\" type=\"" + d.getType() + //$NON-NLS-1$ //$NON-NLS-2$
"\" imagefilter=\"" + d.getImageFilter() + //$NON-NLS-1$ //$NON-NLS-2$
"\" instancefilter=\"" + d.getInstanceFilter() + //$NON-NLS-1$ //$NON-NLS-2$
@@ -141,13 +148,13 @@
Activator.log(e);
}
}
-
+
public static DeltaCloudManager getDefault() {
if (cloudManager == null)
cloudManager = new DeltaCloudManager();
return cloudManager;
}
-
+
public DeltaCloud[] getClouds() {
return clouds.toArray(new DeltaCloud[clouds.size()]);
}
@@ -159,13 +166,13 @@
}
return null;
}
-
+
public void addCloud(DeltaCloud d) {
clouds.add(d);
saveClouds();
notifyListeners(ICloudManagerListener.ADD_EVENT);
}
-
+
public void removeCloud(DeltaCloud d) {
clouds.remove(d);
String url = d.getURL();
@@ -191,12 +198,12 @@
saveClouds();
notifyListeners(ICloudManagerListener.REMOVE_EVENT);
}
-
+
public void notifyCloudRename() {
saveClouds();
notifyListeners(ICloudManagerListener.RENAME_EVENT);
}
-
+
public void addCloudManagerListener(ICloudManagerListener listener) {
if (cloudManagerListeners == null)
cloudManagerListeners = new ListenerList(ListenerList.IDENTITY);
@@ -212,9 +219,9 @@
if (cloudManagerListeners != null) {
Object[] listeners = cloudManagerListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
- ((ICloudManagerListener)listeners[i]).changeEvent(type);
+ ((ICloudManagerListener) listeners[i]).changeEvent(type);
}
}
}
-
+
}
15 years, 5 months
JBoss Tools SVN: r26284 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 07:26:03 -0400 (Fri, 05 Nov 2010)
New Revision: 26284
Modified:
trunk/build/target-platform/pom.xml
Log:
make local.target optional when using -Plocal (must first generate a local.target file)
Modified: trunk/build/target-platform/pom.xml
===================================================================
--- trunk/build/target-platform/pom.xml 2010-11-05 11:17:57 UTC (rev 26283)
+++ trunk/build/target-platform/pom.xml 2010-11-05 11:26:03 UTC (rev 26284)
@@ -42,11 +42,6 @@
<type>target</type>
<classifier>${target.platform.classifier.unified.name}</classifier>
</artifact>
- <artifact>
- <file>${target.platform.classifier.local.name}.target</file>
- <type>target</type>
- <classifier>${target.platform.classifier.local.name}</classifier>
- </artifact>
</artifacts>
</configuration>
</execution>
@@ -55,5 +50,47 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>local</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <!-- add more artifacts if want more target platforms -->
+ <artifact>
+ <file>${target.platform.classifier.multiple.name}.target</file>
+ <type>target</type>
+ <classifier>${target.platform.classifier.multiple.name}</classifier>
+ </artifact>
+ <artifact>
+ <file>${target.platform.classifier.unified.name}.target</file>
+ <type>target</type>
+ <classifier>${target.platform.classifier.unified.name}</classifier>
+ </artifact>
+ <artifact>
+ <file>${target.platform.classifier.local.name}.target</file>
+ <type>target</type>
+ <classifier>${target.platform.classifier.local.name}</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
-
15 years, 5 months
JBoss Tools SVN: r26283 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 07:17:57 -0400 (Fri, 05 Nov 2010)
New Revision: 26283
Modified:
trunk/build/parent/pom.xml
Log:
switch to antrun 1.4; reformat
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2010-11-05 10:35:54 UTC (rev 26282)
+++ trunk/build/parent/pom.xml 2010-11-05 11:17:57 UTC (rev 26283)
@@ -18,12 +18,17 @@
<memoryOptions1>-Xms512m -Xmx1024m -XX:PermSize=256m</memoryOptions1>
<memoryOptions2>-XX:MaxPermSize=256m</memoryOptions2>
<systemProperties></systemProperties>
-
- <!-- target files available for building: multiple sites, 1 unified site, 1 local mirrored site -->
- <target.platform.classifier.multiple>mutiple</target.platform.classifier.multiple>
- <target.platform.classifier.unified>unified</target.platform.classifier.unified>
- <target.platform.classifier.local>local</target.platform.classifier.local>
-
+ <maven.antrun.plugin.version>1.4</maven.antrun.plugin.version>
+
+ <!-- target files available for building: multiple sites, 1 unified site,
+ 1 local mirrored site -->
+ <target.platform.classifier.multiple>mutiple
+ </target.platform.classifier.multiple>
+ <target.platform.classifier.unified>unified
+ </target.platform.classifier.unified>
+ <target.platform.classifier.local>local
+ </target.platform.classifier.local>
+
<!-- Set this to a path on your own machine, or use remote URL like http://download.jboss.org/jbosstools/updates/target-platform/latest/ -->
<target.platform.site>file://home/hudson/static_build_env/jbds/target-platform/e361-wtp322.target/
</target.platform.site>
@@ -33,7 +38,7 @@
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.6</version>
+ <version>${maven.antrun.plugin.version}</version>
</plugin>
<plugin>
@@ -135,6 +140,9 @@
<!-- https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho -->
<!-- set useUIThread=true for regular ui tests -->
<!-- set useUIThread=false for swtbot tests (?) -->
+
+ <!-- TODO: add new profile to permit running against JBDS product/application
+ for JBDS tests, against Eclipse SDK for JBT -->
<product>org.eclipse.sdk.ide</product>
<application>org.eclipse.ui.ide.workbench</application>
<dependencies>
@@ -539,7 +547,8 @@
</property>
</activation>
<properties>
- <emma.session.out.file>${project.build.directory}/emma/coverage.es</emma.session.out.file>
+ <emma.session.out.file>${project.build.directory}/emma/coverage.es
+ </emma.session.out.file>
<emma.filter />
<emma.instrument.bundles />
</properties>
@@ -594,7 +603,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.6</version>
+ <version>${maven.antrun.plugin.version}</version>
<dependencies>
<dependency>
<groupId>emma</groupId>
@@ -690,7 +699,7 @@
</dependency>
</dependencies>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.6</version>
+ <version>${maven.antrun.plugin.version}</version>
<executions>
<execution>
<id>download-plugin-requirements</id>
15 years, 5 months
JBoss Tools SVN: r26282 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 06:35:54 -0400 (Fri, 05 Nov 2010)
New Revision: 26282
Modified:
trunk/build/target-platform/
Log:
svn:ignore
Property changes on: trunk/build/target-platform
___________________________________________________________________
Name: svn:ignore
- REPO*
*target.zip
log*.txt
eclipse*
.target
+ REPO*
*target.zip
log*.txt
eclipse*
.target
local.target
15 years, 5 months
JBoss Tools SVN: r26281 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 06:35:23 -0400 (Fri, 05 Nov 2010)
New Revision: 26281
Modified:
trunk/build/target-platform/pom.xml
Log:
add local target and refactor
Modified: trunk/build/target-platform/pom.xml
===================================================================
--- trunk/build/target-platform/pom.xml 2010-11-05 10:32:18 UTC (rev 26280)
+++ trunk/build/target-platform/pom.xml 2010-11-05 10:35:23 UTC (rev 26281)
@@ -9,10 +9,11 @@
<version>0.0.1-SNAPSHOT</version>
<name>JBoss Tools Target Platform Definition</name>
<packaging>pom</packaging>
-
+
<properties>
- <target.platform.file.multiple>multiple.target</target.platform.file.multiple>
- <target.platform.file.unified>unified.target</target.platform.file.unified>
+ <target.platform.classifier.multiple.name>multiple</target.platform.classifier.multiple.name>
+ <target.platform.classifier.unified.name>unified</target.platform.classifier.unified.name>
+ <target.platform.classifier.local.name>local</target.platform.classifier.local.name>
</properties>
<build>
@@ -32,15 +33,20 @@
<artifacts>
<!-- add more artifacts if want more target platforms -->
<artifact>
- <file>${target.platform.file.multiple}</file>
+ <file>${target.platform.classifier.multiple.name}.target</file>
<type>target</type>
- <classifier>${target.platform.file.multiple}</classifier>
+ <classifier>${target.platform.classifier.multiple.name}</classifier>
</artifact>
<artifact>
- <file>${target.platform.file.unified}</file>
+ <file>${target.platform.classifier.unified.name}.target</file>
<type>target</type>
- <classifier>${target.platform.file.unified}</classifier>
+ <classifier>${target.platform.classifier.unified.name}</classifier>
</artifact>
+ <artifact>
+ <file>${target.platform.classifier.local.name}.target</file>
+ <type>target</type>
+ <classifier>${target.platform.classifier.local.name}</classifier>
+ </artifact>
</artifacts>
</configuration>
</execution>
15 years, 5 months
JBoss Tools SVN: r26280 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 06:32:18 -0400 (Fri, 05 Nov 2010)
New Revision: 26280
Modified:
trunk/build/target-platform/target2targetTemplate.xsl
trunk/build/target-platform/targetUpdateFromRepo.xml
Log:
generate a local.target file for use locally
Modified: trunk/build/target-platform/target2targetTemplate.xsl
===================================================================
--- trunk/build/target-platform/target2targetTemplate.xsl 2010-11-05 10:25:28 UTC (rev 26279)
+++ trunk/build/target-platform/target2targetTemplate.xsl 2010-11-05 10:32:18 UTC (rev 26280)
@@ -5,7 +5,7 @@
CAUTION: do not auto-format this file or line breaks will appear where they should not be!
-->
-<xsl:param name="published.URL"/>
+<xsl:param name="replacement.URL"/>
<!-- Copy unit nodes and templatize their version attributes -->
<xsl:template match="unit">
@@ -16,8 +16,8 @@
<xsl:template match="repository">
<xsl:choose>
-<xsl:when test="$published.URL">
-<repository location="{$published.URL}">
+<xsl:when test="$replacement.URL">
+<repository location="{$replacement.URL}">
<xsl:apply-templates/>
</repository>
</xsl:when>
Modified: trunk/build/target-platform/targetUpdateFromRepo.xml
===================================================================
--- trunk/build/target-platform/targetUpdateFromRepo.xml 2010-11-05 10:25:28 UTC (rev 26279)
+++ trunk/build/target-platform/targetUpdateFromRepo.xml 2010-11-05 10:32:18 UTC (rev 26280)
@@ -1,19 +1,22 @@
<project default="custom.build" name="jbosstools target platform updater">
+ <property name="outputDir" value="${basedir}" />
+ <!-- Instead of overwriting, can also create a new .target file in a different outputDir
+ <property name="outputDir" value="${tmpDir}" />
+ -->
+
<!-- must set these commandline if not using defaults -->
<property name="targetFile" value="multiple.target" />
- <property name="repoDir" value="./REPO" />
+ <property name="repoDir" value="${outputDir}/REPO/" />
<!-- create a second .target file which replaces all URLs with a single static PUBLISHED one
(eg., for jbosstools target platform site), set these properties too -->
<property name="published.targetFile" value="unified.target" />
<property name="published.URL" value="http://download.jboss.org/jbosstools/updates/target-platform/latest/" />
-
+ <property name="local.targetFile" value="local.target" />
+ <property name="local.URL" value="file:/${repoDir}" />
+
<property name="tmpDir" value="${java.io.tmpdir}/targetUpdateFromRepo" />
- <property name="outputDir" value="${basedir}" />
- <!-- Instead of overwriting, can also create a new .target file in a different outputDir
- <property name="outputDir" value="${tmpDir}" />
- -->
<target name="help">
<echo>Must set these properties (or use defaults shown):
@@ -21,7 +24,9 @@
ant -f targetUpdateFromRepo.xml -DrepoDir=${repoDir} \
-DtargetFile=${targetFile} \
-Dpublished.targetFile=${published.targetFile} \
- -Dpublished.URL=${published.URL}</echo>
+ -Dpublished.URL=${published.URL} \
+ -Dlocal.targetFile=${local.targetFile} \
+ -Dlocal.URL=${local.URL}</echo>
</target>
<target name="custom.build"
@@ -51,8 +56,12 @@
<xslt style="target2targetTemplate.xsl" in="${targetFile}" out="${tmpDir}/${targetFile}.template" processor="trax" />
<echo level="verbose">Generate ${tmpDir}/${published.targetFile}.template</echo>
<xslt style="target2targetTemplate.xsl" in="${targetFile}" out="${tmpDir}/${published.targetFile}.template" processor="trax">
- <param name="published.URL" expression="${published.URL}" />
+ <param name="replacement.URL" expression="${published.URL}" />
</xslt>
+ <echo level="verbose">Generate ${tmpDir}/${local.targetFile}.template</echo>
+ <xslt style="target2targetTemplate.xsl" in="${targetFile}" out="${tmpDir}/${local.targetFile}.template" processor="trax">
+ <param name="replacement.URL" expression="${local.URL}" />
+ </xslt>
</target>
<target name="updateTargetFile" description="load generated properties and resolve them in the template to create a new .target file">
@@ -71,6 +80,13 @@
<expandproperties />
</filterchain>
</copy>
+ <copy todir="${outputDir}" overwrite="true">
+ <fileset file="${tmpDir}/${local.targetFile}.template" />
+ <mapper type="merge" to="${local.targetFile}" />
+ <filterchain>
+ <expandproperties />
+ </filterchain>
+ </copy>
</target>
<target name="cleanup" description="purge temporary dir">
15 years, 5 months
JBoss Tools SVN: r26279 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 06:25:28 -0400 (Fri, 05 Nov 2010)
New Revision: 26279
Modified:
trunk/build/target-platform/build.xml
Log:
reformat script
Modified: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml 2010-11-05 10:04:41 UTC (rev 26278)
+++ trunk/build/target-platform/build.xml 2010-11-05 10:25:28 UTC (rev 26279)
@@ -60,18 +60,17 @@
<!-- do everything but tests -->
- <target name="all" depends="install"/>
+ <target name="all" depends="install" />
- <!-- test target platform first by building against the target platform repo, then against the p2.dir-installed base -->
- <!-- target name="tests" depends="install, test.local.target.platform.repo, test.local.target.platform.installed.base" -->
- <target name="tests" depends="install, test.local.target.platform.repo"/>
+ <target name="tests" depends="install, test.local.target.platform.repo" />
<!-- to install from the target platform repo, first build the repo, then install using p2.director -->
<target name="install" depends="build.local.target.platform.repo, install.local.target.platform.repo" />
- <target name="build.local.target.platform.repo" depends="init, get.arch, get.eclipse, gen.p2mirror.script, run.p2mirror.script, update.target.file, cleanup" />
+ <target name="build.local.target.platform.repo"
+ depends="init, get.arch, get.eclipse, gen.p2mirror.script, run.p2mirror.script, update.target.file, cleanup" />
- <!-- ********************************************************************************** -->
+ <!-- ********************************************************************************** -->
<target name="init">
<ant antfile="${build.xml}" target="init" />
@@ -181,7 +180,8 @@
</exec>
</target>
- <target name="test.local.target.platform.installed.base" description="test target platform completeness by running a build against its installed eclipse base - Dtycho.targetPlatform to be removed in Tycho 0.11 so this test is deprecated">
+ <target name="test.local.target.platform.installed.base"
+ description="test target platform completeness by running a build against its installed eclipse base - Dtycho.targetPlatform to be removed in Tycho 0.11 so this test is deprecated">
<!--
<exec executable="/opt/maven3/bin/mvn" dir="${WORKINGDIR}">
<arg line=" -f ../parent/pom.xml clean install -B -U -fae -e -P helios-local-target,!helios -Dmaven.test.skip -Dtarget.platorm.URL=file:/${repoDir}" />
15 years, 5 months
JBoss Tools SVN: r26278 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-11-05 06:04:41 -0400 (Fri, 05 Nov 2010)
New Revision: 26278
Modified:
trunk/build/parent/pom.xml
Log:
bump up to antrun 1.6; add new profiles for .target files; purge dgolovin profile; refactoring
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2010-11-05 09:53:45 UTC (rev 26277)
+++ trunk/build/parent/pom.xml 2010-11-05 10:04:41 UTC (rev 26278)
@@ -18,17 +18,22 @@
<memoryOptions1>-Xms512m -Xmx1024m -XX:PermSize=256m</memoryOptions1>
<memoryOptions2>-XX:MaxPermSize=256m</memoryOptions2>
<systemProperties></systemProperties>
- <target.platform>e36-wtp32</target.platform>
- <!-- could also use http://download.jboss.org/jbosstools/updates/target-platform/latest/ -->
- <target.platform.URL>file://home/hudson/static_build_env/jbds/target-platform/e361-wtp322.target/
- </target.platform.URL>
+
+ <!-- target files available for building: multiple sites, 1 unified site, 1 local mirrored site -->
+ <target.platform.classifier.multiple>mutiple</target.platform.classifier.multiple>
+ <target.platform.classifier.unified>unified</target.platform.classifier.unified>
+ <target.platform.classifier.local>local</target.platform.classifier.local>
+
+ <!-- Set this to a path on your own machine, or use remote URL like http://download.jboss.org/jbosstools/updates/target-platform/latest/ -->
+ <target.platform.site>file://home/hudson/static_build_env/jbds/target-platform/e361-wtp322.target/
+ </target.platform.site>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.4</version>
+ <version>1.6</version>
</plugin>
<plugin>
@@ -176,6 +181,8 @@
<url>https://jira.jboss.org/jira/secure/</url>
</issueManagement>
<profiles>
+
+ <!-- TODO: remove this when no one depends on it -->
<profile>
<id>helios</id>
<activation>
@@ -195,7 +202,7 @@
<groupId>org.jboss.tools</groupId>
<artifactId>target-platform</artifactId>
<version>0.0.1-SNAPSHOT</version>
- <classifier>${target.platform}</classifier>
+ <classifier>${target.platform.classifier.multiple}</classifier>
</artifact>
</target>
</configuration>
@@ -203,9 +210,61 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>unified</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <target>
+ <artifact>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>target-platform</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <classifier>${target.platform.classifier.unified}</classifier>
+ </artifact>
+ </target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>local</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <target>
+ <artifact>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>target-platform</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <classifier>${target.platform.classifier.local}</classifier>
+ </artifact>
+ </target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<!-- Time saver: to build everything from scratch from a single local repo
- on Hudson cluster -->
+ on Hudson cluster or on local machine. Use -Dtarget.platform.site=file://path/to/your/own/repo -->
<profile>
<id>helios-local-target</id>
<activation>
@@ -214,7 +273,7 @@
<repositories>
<repository>
<id>jbosstools-target-platform-repo</id>
- <url>${target.platform.URL}</url>
+ <url>${target.platform.site}</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -480,8 +539,7 @@
</property>
</activation>
<properties>
- <emma.session.out.file>${project.build.directory}/emma/coverage.es
- </emma.session.out.file>
+ <emma.session.out.file>${project.build.directory}/emma/coverage.es</emma.session.out.file>
<emma.filter />
<emma.instrument.bundles />
</properties>
@@ -536,7 +594,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
+ <version>1.6</version>
<dependencies>
<dependency>
<groupId>emma</groupId>
@@ -632,7 +690,7 @@
</dependency>
</dependencies>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
+ <version>1.6</version>
<executions>
<execution>
<id>download-plugin-requirements</id>
@@ -681,84 +739,5 @@
</repository>
</repositories>
</profile>
-
- <!-- TODO: remove this -->
- <profile>
- <id>dgolovin</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <repositories>
- <repository>
- <id>helios</id>
- <url>file:///media/Data/updates/helios-sp1</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>birt26</id>
- <url>http://download.eclipse.org/birt/update-site/2.6/
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>jboss-swtbot-helios</id>
- <url>http://download.jboss.org/jbosstools/updates/requirements/swtbot-helios/
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>m2eclipse-extras</id>
- <url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>jboss-xulrunner-1.9.1.2</id>
- <url>http://download.jboss.org/jbosstools/updates/requirements/xulrunner-1.9.1.2/
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>google eclipse plugins</id>
- <url>http://dl.google.com/eclipse/plugin/3.6</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
- </profile>
</profiles>
</project>
15 years, 5 months
JBoss Tools SVN: r26277 - trunk/deltacloud/features.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-11-05 05:53:45 -0400 (Fri, 05 Nov 2010)
New Revision: 26277
Modified:
trunk/deltacloud/features/pom.xml
Log:
fixed deltacloud features pom name
Modified: trunk/deltacloud/features/pom.xml
===================================================================
--- trunk/deltacloud/features/pom.xml 2010-11-05 08:45:14 UTC (rev 26276)
+++ trunk/deltacloud/features/pom.xml 2010-11-05 09:53:45 UTC (rev 26277)
@@ -5,7 +5,7 @@
<artifactId>features</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>seam.features</name>
+ <name>deltacloud.features</name>
<modules>
<module>org.jboss.tools.deltacloud.feature</module>
<!-- <module>org.jboss.tools.deltacloud.test.feature</module> -->
15 years, 5 months