From 3abf3909dfa306d20358a3538da212b7cb64f52a Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 16 Aug 2008 17:42:25 +0000 Subject: Update: Renamed Subversion plugin folder The folder name "svn" was annoying Subversion because svn is a special name to it. Fixes #36 --- update/plugin/subversion/trunk/build.xml | 69 +++ update/plugin/subversion/trunk/manifest.mf | 2 + .../subversion/trunk/nbproject/build-impl.xml | 627 +++++++++++++++++++++ .../subversion/trunk/nbproject/genfiles.properties | 8 + .../plugin/subversion/trunk/nbproject/project.dtd | 54 ++ .../subversion/trunk/nbproject/project.properties | 70 +++ .../plugin/subversion/trunk/nbproject/project.xml | 16 + .../com/fourisland/instadisc/update/svn/MD5.java | 68 +++ .../com/fourisland/instadisc/update/svn/Main.java | 83 +++ update/plugin/svn/trunk/build.xml | 69 --- update/plugin/svn/trunk/manifest.mf | 2 - update/plugin/svn/trunk/nbproject/build-impl.xml | 627 --------------------- .../plugin/svn/trunk/nbproject/genfiles.properties | 8 - update/plugin/svn/trunk/nbproject/project.dtd | 54 -- .../plugin/svn/trunk/nbproject/project.properties | 70 --- update/plugin/svn/trunk/nbproject/project.xml | 16 - .../com/fourisland/instadisc/update/svn/MD5.java | 68 --- .../com/fourisland/instadisc/update/svn/Main.java | 83 --- 18 files changed, 997 insertions(+), 997 deletions(-) create mode 100644 update/plugin/subversion/trunk/build.xml create mode 100644 update/plugin/subversion/trunk/manifest.mf create mode 100644 update/plugin/subversion/trunk/nbproject/build-impl.xml create mode 100644 update/plugin/subversion/trunk/nbproject/genfiles.properties create mode 100644 update/plugin/subversion/trunk/nbproject/project.dtd create mode 100644 update/plugin/subversion/trunk/nbproject/project.properties create mode 100644 update/plugin/subversion/trunk/nbproject/project.xml create mode 100644 update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/MD5.java create mode 100644 update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/Main.java delete mode 100644 update/plugin/svn/trunk/build.xml delete mode 100644 update/plugin/svn/trunk/manifest.mf delete mode 100644 update/plugin/svn/trunk/nbproject/build-impl.xml delete mode 100644 update/plugin/svn/trunk/nbproject/genfiles.properties delete mode 100644 update/plugin/svn/trunk/nbproject/project.dtd delete mode 100644 update/plugin/svn/trunk/nbproject/project.properties delete mode 100644 update/plugin/svn/trunk/nbproject/project.xml delete mode 100644 update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/MD5.java delete mode 100644 update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/Main.java diff --git a/update/plugin/subversion/trunk/build.xml b/update/plugin/subversion/trunk/build.xml new file mode 100644 index 0000000..b2772f4 --- /dev/null +++ b/update/plugin/subversion/trunk/build.xml @@ -0,0 +1,69 @@ + + + + + + Builds, tests, and runs the project InstaDiscUpdateSVN. + + + diff --git a/update/plugin/subversion/trunk/manifest.mf b/update/plugin/subversion/trunk/manifest.mf new file mode 100644 index 0000000..0f8d5d3 --- /dev/null +++ b/update/plugin/subversion/trunk/manifest.mf @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build \ No newline at end of file diff --git a/update/plugin/subversion/trunk/nbproject/build-impl.xml b/update/plugin/subversion/trunk/nbproject/build-impl.xml new file mode 100644 index 0000000..ac0e506 --- /dev/null +++ b/update/plugin/subversion/trunk/nbproject/build-impl.xml @@ -0,0 +1,627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + diff --git a/update/plugin/subversion/trunk/nbproject/genfiles.properties b/update/plugin/subversion/trunk/nbproject/genfiles.properties new file mode 100644 index 0000000..1012552 --- /dev/null +++ b/update/plugin/subversion/trunk/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=a07c171d +build.xml.script.CRC32=10186d9c +build.xml.stylesheet.CRC32=be360661 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=a07c171d +nbproject/build-impl.xml.script.CRC32=b31666c6 +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 diff --git a/update/plugin/subversion/trunk/nbproject/project.dtd b/update/plugin/subversion/trunk/nbproject/project.dtd new file mode 100644 index 0000000..7b77177 --- /dev/null +++ b/update/plugin/subversion/trunk/nbproject/project.dtd @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/update/plugin/subversion/trunk/nbproject/project.properties b/update/plugin/subversion/trunk/nbproject/project.properties new file mode 100644 index 0000000..97cccc2 --- /dev/null +++ b/update/plugin/subversion/trunk/nbproject/project.properties @@ -0,0 +1,70 @@ +application.title=InstaDiscUpdateSVN +application.vendor=hatkirby +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/InstaDiscUpdateSVN.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath=\ + ${libs.XML-RPC2.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.source=1.5 +javac.target=1.5 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit.classpath}:\ + ${libs.junit_4.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jnlp.codebase.type=local +jnlp.codebase.url=file:/home/hatkirby/NetBeansProjects/InstaDiscUpdateSVN/dist/ +jnlp.enabled=false +jnlp.offline-allowed=false +jnlp.signed=false +# Property libs.XML-RPC2.classpath is set here just to make sharing of project simpler. +# The library definition has always preference over this property. +libs.XML-RPC2.classpath=lib/commons-logging-1.1.jar:lib/ws-commons-util-1.0.2.jar:lib/xmlrpc-client-3.1.jar:lib/xmlrpc-common-3.1.jar:lib/xmlrpc-server-3.1.jar +main.class=com.fourisland.instadisc.update.svn.Main +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/update/plugin/subversion/trunk/nbproject/project.xml b/update/plugin/subversion/trunk/nbproject/project.xml new file mode 100644 index 0000000..1a38c15 --- /dev/null +++ b/update/plugin/subversion/trunk/nbproject/project.xml @@ -0,0 +1,16 @@ + + + org.netbeans.modules.java.j2seproject + + + InstaDiscUpdateSVN + 1.6.5 + + + + + + + + + diff --git a/update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/MD5.java b/update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/MD5.java new file mode 100644 index 0000000..0929022 --- /dev/null +++ b/update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/MD5.java @@ -0,0 +1,68 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.fourisland.instadisc.update.svn; + +import java.security.MessageDigest; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author hatkirby + */ +public class MD5 { + + String ver; + + public MD5(String ver) { + this.ver = ver; + } + + public MD5(char[] password) { + int i=0; + ver=""; + for (i=0;i y ? x : y); + } + + private String pad(String in, String pad, int len) + { + while (in.length() < len) + { + in = pad + in; + } + return in; + } +} diff --git a/update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/Main.java b/update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/Main.java new file mode 100644 index 0000000..1bc9a07 --- /dev/null +++ b/update/plugin/subversion/trunk/src/com/fourisland/instadisc/update/svn/Main.java @@ -0,0 +1,83 @@ +package com.fourisland.instadisc.update.svn; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Random; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.apache.xmlrpc.XmlRpcException; +import org.apache.xmlrpc.client.XmlRpcClient; +import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; + +public class Main { + + public static void main(String[] args) { + try + { + String username = getArg(0, args); + String password = getArg(1, args); + String centralServer = getArg(2, args); + String pathScheme = getArg(3, args); + String author = getArg(4, args); + String subscription = getArg(5, args); + String revision = getArg(6, args); + + StringBuilder messBuilder = new StringBuilder(); + byte rs = 0; + + while (rs != -1) + { + try + { + rs = (byte) System.in.read(); + if (rs != -1) + { + messBuilder.append(new String(new byte[]{rs})); + } + } catch (IOException ex) + { + Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); + } + } + + String message = messBuilder.toString(); + message = message.substring(0, message.indexOf("\n")); + + Random r = new Random(); + int verID = r.nextInt(Integer.MAX_VALUE); + + String path = pathScheme.replace("__REV__", revision); + + XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); + config.setServerURL(new URL(centralServer)); + XmlRpcClient client = new XmlRpcClient(); + client.setConfig(config); + client.execute("InstaDisc.sendFromUpdate", new Object[]{username, + (new MD5(username + ":" + (new MD5(password)).hash() + ":" + verID)).hash(), + verID, + subscription, + message, + author, + path, + "a:0:{}" + }); + } catch (XmlRpcException ex) + { + Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); + } catch (MalformedURLException ex) + { + Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public static String getArg(int arg, String[] args) { + if (args.length < (arg+1)) + { + System.out.println("Program requires 7 arguments and you only provided " + arg); + System.exit(1); + } + + return args[arg]; + } +} diff --git a/update/plugin/svn/trunk/build.xml b/update/plugin/svn/trunk/build.xml deleted file mode 100644 index b2772f4..0000000 --- a/update/plugin/svn/trunk/build.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - Builds, tests, and runs the project InstaDiscUpdateSVN. - - - diff --git a/update/plugin/svn/trunk/manifest.mf b/update/plugin/svn/trunk/manifest.mf deleted file mode 100644 index 0f8d5d3..0000000 --- a/update/plugin/svn/trunk/manifest.mf +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build \ No newline at end of file diff --git a/update/plugin/svn/trunk/nbproject/build-impl.xml b/update/plugin/svn/trunk/nbproject/build-impl.xml deleted file mode 100644 index ac0e506..0000000 --- a/update/plugin/svn/trunk/nbproject/build-impl.xml +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - diff --git a/update/plugin/svn/trunk/nbproject/genfiles.properties b/update/plugin/svn/trunk/nbproject/genfiles.properties deleted file mode 100644 index 1012552..0000000 --- a/update/plugin/svn/trunk/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=a07c171d -build.xml.script.CRC32=10186d9c -build.xml.stylesheet.CRC32=be360661 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=a07c171d -nbproject/build-impl.xml.script.CRC32=b31666c6 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 diff --git a/update/plugin/svn/trunk/nbproject/project.dtd b/update/plugin/svn/trunk/nbproject/project.dtd deleted file mode 100644 index 7b77177..0000000 --- a/update/plugin/svn/trunk/nbproject/project.dtd +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/update/plugin/svn/trunk/nbproject/project.properties b/update/plugin/svn/trunk/nbproject/project.properties deleted file mode 100644 index 97cccc2..0000000 --- a/update/plugin/svn/trunk/nbproject/project.properties +++ /dev/null @@ -1,70 +0,0 @@ -application.title=InstaDiscUpdateSVN -application.vendor=hatkirby -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/InstaDiscUpdateSVN.jar -dist.javadoc.dir=${dist.dir}/javadoc -excludes= -includes=** -jar.compress=false -javac.classpath=\ - ${libs.XML-RPC2.classpath} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.source=1.5 -javac.target=1.5 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${libs.junit.classpath}:\ - ${libs.junit_4.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=local -jnlp.codebase.url=file:/home/hatkirby/NetBeansProjects/InstaDiscUpdateSVN/dist/ -jnlp.enabled=false -jnlp.offline-allowed=false -jnlp.signed=false -# Property libs.XML-RPC2.classpath is set here just to make sharing of project simpler. -# The library definition has always preference over this property. -libs.XML-RPC2.classpath=lib/commons-logging-1.1.jar:lib/ws-commons-util-1.0.2.jar:lib/xmlrpc-client-3.1.jar:lib/xmlrpc-common-3.1.jar:lib/xmlrpc-server-3.1.jar -main.class=com.fourisland.instadisc.update.svn.Main -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value -# or test-sys-prop.name=value to set system properties for unit tests): -run.jvmargs= -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/update/plugin/svn/trunk/nbproject/project.xml b/update/plugin/svn/trunk/nbproject/project.xml deleted file mode 100644 index 1a38c15..0000000 --- a/update/plugin/svn/trunk/nbproject/project.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - InstaDiscUpdateSVN - 1.6.5 - - - - - - - - - diff --git a/update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/MD5.java b/update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/MD5.java deleted file mode 100644 index 0929022..0000000 --- a/update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/MD5.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package com.fourisland.instadisc.update.svn; - -import java.security.MessageDigest; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * - * @author hatkirby - */ -public class MD5 { - - String ver; - - public MD5(String ver) { - this.ver = ver; - } - - public MD5(char[] password) { - int i=0; - ver=""; - for (i=0;i y ? x : y); - } - - private String pad(String in, String pad, int len) - { - while (in.length() < len) - { - in = pad + in; - } - return in; - } -} diff --git a/update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/Main.java b/update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/Main.java deleted file mode 100644 index 1bc9a07..0000000 --- a/update/plugin/svn/trunk/src/com/fourisland/instadisc/update/svn/Main.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.fourisland.instadisc.update.svn; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Random; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.apache.xmlrpc.XmlRpcException; -import org.apache.xmlrpc.client.XmlRpcClient; -import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; - -public class Main { - - public static void main(String[] args) { - try - { - String username = getArg(0, args); - String password = getArg(1, args); - String centralServer = getArg(2, args); - String pathScheme = getArg(3, args); - String author = getArg(4, args); - String subscription = getArg(5, args); - String revision = getArg(6, args); - - StringBuilder messBuilder = new StringBuilder(); - byte rs = 0; - - while (rs != -1) - { - try - { - rs = (byte) System.in.read(); - if (rs != -1) - { - messBuilder.append(new String(new byte[]{rs})); - } - } catch (IOException ex) - { - Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); - } - } - - String message = messBuilder.toString(); - message = message.substring(0, message.indexOf("\n")); - - Random r = new Random(); - int verID = r.nextInt(Integer.MAX_VALUE); - - String path = pathScheme.replace("__REV__", revision); - - XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); - config.setServerURL(new URL(centralServer)); - XmlRpcClient client = new XmlRpcClient(); - client.setConfig(config); - client.execute("InstaDisc.sendFromUpdate", new Object[]{username, - (new MD5(username + ":" + (new MD5(password)).hash() + ":" + verID)).hash(), - verID, - subscription, - message, - author, - path, - "a:0:{}" - }); - } catch (XmlRpcException ex) - { - Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); - } catch (MalformedURLException ex) - { - Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); - } - } - - public static String getArg(int arg, String[] args) { - if (args.length < (arg+1)) - { - System.out.println("Program requires 7 arguments and you only provided " + arg); - System.exit(1); - } - - return args[arg]; - } -} -- cgit 1.4.1