diff --git a/examples/plugins/org.jboss.tools.project.examples/pom.xml b/examples/plugins/org.jboss.tools.project.examples/pom.xml index 70c5992..e7e1a37 100644 --- a/examples/plugins/org.jboss.tools.project.examples/pom.xml +++ b/examples/plugins/org.jboss.tools.project.examples/pom.xml @@ -13,6 +13,7 @@ http://download.jboss.org/jbosstools/updates/development/indigo/jbosstools-directory.xml + https://devstudio.jboss.com/updates/5.0/central/soa-tooling/ diff --git a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java index bbb1ebb..408aa0b 100644 --- a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java +++ b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java @@ -203,6 +203,7 @@ public class ProjectExamplesActivator extends AbstractUIPlugin { private IJBossCentralConfigurator configurator; public static final String JBOSS_DISCOVERY_DIRECTORY = "jboss.discovery.directory.url"; //$NON-NLS-1$ + public static final String JBOSS_SOA_UPDATE_URL = "jboss.soa.update.url"; //$NON-NLS-1$ private static final Object CONFIGURATOR = "configurator"; //$NON-NLS-1$ diff --git a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/DefaultJBossCentralConfigurator.java b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/DefaultJBossCentralConfigurator.java index b665835..9ee9ea8 100644 --- a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/DefaultJBossCentralConfigurator.java +++ b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/DefaultJBossCentralConfigurator.java @@ -44,8 +44,11 @@ public class DefaultJBossCentralConfigurator implements // 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_SOA_UPDATE_URL_DEFAULT = "https://devstudio.jboss.com/updates/5.0/central/soa-tooling/"; //$NON-NLS-1$ + + // see pom.xml for actual values -- these are passed at build-time via Maven private static final String JBOSS_DIRECTORY_URL; + private static final String JBOSS_SOA_UPDATE_URL; static { ResourceBundle rb = ResourceBundle.getBundle("org.jboss.tools.project.examples.configurators.discovery"); //$NON-NLS-1$ @@ -56,6 +59,15 @@ public class DefaultJBossCentralConfigurator implements } else { JBOSS_DIRECTORY_URL = url; } + + String url2 = rb.getString("soa.update.url").trim(); //$NON-NLS-1$ + if ("".equals(url2) || "${jboss.soa.update.url}".equals(url2)){ //$NON-NLS-1$//$NON-NLS-2$ + //was not filtered, fallback to default value + JBOSS_SOA_UPDATE_URL = JBOSS_SOA_UPDATE_URL_DEFAULT; + } else { + JBOSS_SOA_UPDATE_URL = url2; + } + } private static final String TWITTER_LINK ="http://twitter.com/#!/jbosstools"; //$NON-NLS-1$ @@ -86,6 +98,17 @@ public class DefaultJBossCentralConfigurator implements } @Override + public String getJBossSOAUpdateURL() { + // use commandline override -Djboss.soa.update.url + String directory = System.getProperty(ProjectExamplesActivator.JBOSS_SOA_UPDATE_URL, null); + if (directory == null) { + // else use Maven-generated value (or fall back to default) + return JBOSS_SOA_UPDATE_URL; + } + return directory; + } + + @Override public String getTwitterLink() { return TWITTER_LINK; } diff --git a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/IJBossCentralConfigurator.java b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/IJBossCentralConfigurator.java index 277e812..141e879 100644 --- a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/IJBossCentralConfigurator.java +++ b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/IJBossCentralConfigurator.java @@ -23,6 +23,7 @@ public interface IJBossCentralConfigurator { String[] getMainToolbarCommandIds(); String getJBossDiscoveryDirectory(); + String getJBossSOAUpdateURL(); String getTwitterLink(); String getBlogsUrl(); String getNewsUrl(); diff --git a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/discovery.properties b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/discovery.properties index 376f51b..f0f991c 100644 --- a/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/discovery.properties +++ b/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/configurators/discovery.properties @@ -1 +1,2 @@ discovery.url=${jboss.discovery.directory.url} \ No newline at end of file +soa.update.url=${jboss.soa.update.url} \ No newline at end of file