change default plugin url to new plugin backend

This commit is contained in:
Sebastian Sdorra
2011-03-12 15:19:41 +01:00
parent dff44b7b2d
commit d16cd2da64
4 changed files with 83 additions and 17 deletions

View File

@@ -63,6 +63,10 @@ public class ScmConfiguration
/** Field description */
public static final String DEFAULT_PLUGINURL =
"http://plugins.scm-manager.org/scm-plugin-backend/api/{version}/plugins?os={os}&arch={arch}&snapshot=false";
/** Field description */
public static final String OLD_PLUGINURL =
"http://plugins.scm-manager.org/plugins.xml.gz";
/** Field description */

View File

@@ -29,6 +29,8 @@
*
*/
package sonia.scm.util;
/**
@@ -38,11 +40,49 @@ package sonia.scm.util;
public class SystemUtil
{
/** Field description */
public static final String PROPERTY_ARCH = "sun.arch.data.model";
/** Field description */
public static final String PROPERTY_OSNAME = "os.name";
//~--- methods --------------------------------------------------------------
/**
* Method description
*
*
* @return
*/
public static boolean is32bit()
{
return "32".equals(System.getProperty(PROPERTY_ARCH));
}
//~--- get methods ----------------------------------------------------------
/**
* Method description
*
*
* @return
*/
public static String getArch()
{
return System.getProperty(PROPERTY_ARCH, "32");
}
/**
* Method description
*
*
* @return
*/
public static String getOS()
{
return System.getProperty(PROPERTY_OSNAME);
}
/**
* Method description
*
@@ -84,9 +124,4 @@ public class SystemUtil
// windows
return (os.indexOf("win") >= 0);
}
public static boolean is32bit()
{
return "32".equals(System.getProperty("sun.arch.data.model"));
}
}