Author: snjeza
Date: 2012-02-19 11:34:29 -0500 (Sun, 19 Feb 2012)
New Revision: 38908
Added:
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/README.txt
Modified:
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/pom.xml
Log:
Fixing the build
Modified:
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/pom.xml
===================================================================
---
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/pom.xml 2012-02-19
16:20:33 UTC (rev 38907)
+++
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/pom.xml 2012-02-19
16:34:29 UTC (rev 38908)
@@ -10,5 +10,89 @@
<groupId>org.jboss.tools.examples.plugins</groupId>
<artifactId>org.jboss.tools.project.examples</artifactId>
+ <properties>
+ <!-- TODO: for GA, change this from /development/indigo/ to /stable/indigo/ -->
+ <
jboss.discovery.directory.url>http://download.jboss.org/jbosstools/upd...
+ </properties>
+
+ <profiles>
+ <!-- _stable_branch jobs could use this profile but the above default (last stable
milestone) is probably better -->
+ <profile>
+ <id>3.3.indigo</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <
jboss.discovery.directory.url>http://download.jboss.org/jbosstools/upd...
+ </properties>
+ </profile>
+
+ <!-- _trunk jobs should use this profile -->
+ <profile>
+ <id>trunk</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <
jboss.discovery.directory.url>http://download.jboss.org/jbosstools/upd...
+ </properties>
+ </profile>
+ </profiles>
<packaging>eclipse-plugin</packaging>
+ <build>
+ <plugins>
+ <!-- This will copy from the source folder to the template folder. Use only if no
filtering/replacement has already been done in source folder
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/template/</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/org/jboss/tools/project/examples/configurators/</directory>
+ <includes>
+ <include>**/DefaultJBossCentralConfigurator.java</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin> -->
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/src/org/jboss/tools/project/examples/configurators/</outputDirectory>
+ <resources>
+ <resource>
+ <directory>template/</directory>
+ <includes>
+ <include>**/DefaultJBossCentralConfigurator.java</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
\ No newline at end of file
Added:
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java
===================================================================
---
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java
(rev 0)
+++
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java 2012-02-19
16:34:29 UTC (rev 38908)
@@ -0,0 +1,89 @@
+/*************************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.configurators;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+
+/**
+ *
+ * @author snjeza, nboldt
+ *
+ */
+public class DefaultJBossCentralConfigurator implements
+ IJBossCentralConfigurator {
+
+ // TODO: for GA, change this from /development/indigo/ to /stable/indigo/
+ private static final String JBOSS_DIRECTORY_URL_DEFAULT =
"http://download.jboss.org/jbosstools/updates/development/indigo/jbosstools-directory.xml";
//$NON-NLS-1$
+
+ // see pom.xml for actual value -- this is passed it at build-time via Maven
+ private static final String JBOSS_DIRECTORY_URL =
"${jboss.discovery.directory.url}"; //$NON-NLS-1$
+
+ private static final String TWITTER_LINK ="http://twitter.com/#!/jbosstools";
//$NON-NLS-1$
+
+ private static final String BLOGS_URL = "http://planet.jboss.org/feeds/blogs";
//$NON-NLS-1$
+
+ private static final String NEWS_URL = "http://planet.jboss.org/feeds/news";
//$NON-NLS-1$
+
+ private Image headerImage;
+
+ @Override
+ public String[] getMainToolbarCommandIds() {
+ return new String[] {"org.jboss.tools.central.openJBossToolsHome",
//$NON-NLS-1$
+ "org.jboss.tools.central.favoriteAtEclipseMarketplace", //$NON-NLS-1$
+ "org.jboss.tools.central.preferences"}; //$NON-NLS-1$
+ }
+
+ @Override
+ public String getJBossDiscoveryDirectory() {
+ // use commandline override -Djboss.discovery.directory.url
+ String directory =
System.getProperty(ProjectExamplesActivator.JBOSS_DISCOVERY_DIRECTORY, null);
+ if (directory == null) {
+ // else use Maven-generated value; fall back to default
+ return JBOSS_DIRECTORY_URL.equals("${" +
"jboss.discovery.directory.url" + "}") ? JBOSS_DIRECTORY_URL_DEFAULT :
JBOSS_DIRECTORY_URL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ return directory;
+ }
+
+ @Override
+ public String getTwitterLink() {
+ return TWITTER_LINK;
+ }
+
+ @Override
+ public String getBlogsUrl() {
+ return BLOGS_URL;
+ }
+
+ @Override
+ public String getNewsUrl() {
+ return NEWS_URL;
+ }
+
+ @Override
+ public List<String> getWizardIds() {
+ List<String> wizardIds = new ArrayList<String>();
+
wizardIds.add("org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard");
//$NON-NLS-1$
+
wizardIds.add("org.jboss.ide.eclipse.as.openshift.express.ui.wizard.createNewApplicationWizard");
//$NON-NLS-1$
+ return wizardIds;
+ }
+
+ @Override
+ public Image getHeaderImage() {
+ if (headerImage == null) {
+ headerImage =
ProjectExamplesActivator.getDefault().getImage("/icons/jboss.png");
//$NON-NLS-1$
+ }
+ return headerImage;
+ }
+}
Added:
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/README.txt
===================================================================
---
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/README.txt
(rev 0)
+++
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/README.txt 2012-02-19
16:34:29 UTC (rev 38908)
@@ -0,0 +1,4 @@
+This folder is used to dynamically replace ${jboss.discovery.directory.url} in
DefaultJBossCentralConfigurator
+with a valid URL as defined in this plugin's pom.xml.
+
+If you change
src/org/jboss/tools/project/examples/configurators/DefaultJBossCentralConfigurator.java,
copy your changes into here too.