From: <jpi...@us...> - 2011-12-15 19:01:05
|
Revision: 3712 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3712&view=rev Author: jpilgrim Date: 2011-12-15 19:00:59 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Fixed problems in update site build. Update site is now build including Eclipse p2 metadata (content.jar and artifact.jar). These files are required by some tools, such as Tycho (a maven plugin making p2 update sites available as maven repositories, see http://eclipse.org/tycho). Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME 2011-12-15 17:40:06 UTC (rev 3711) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME 2011-12-15 19:00:59 UTC (rev 3712) @@ -1,5 +1,6 @@ How to build the Eclipse update site ------------------------------------ +Author: Jens von Pilgrim <dev...@je...> Building the Eclipse update site is fully integrated into the main LWJGL build script. Here is how to build the update site: @@ -92,4 +93,6 @@ a plugin does not remove the plugins from the Eclipse installation. When the very same version is re-installed, instead of loading new files from the update site these pre-installed versions are reused! Since the date and time - is added to the plugin version number, this should cause no problems. \ No newline at end of file + is added to the plugin version number, this should cause no problems. +- default values for keystore, alias and passphrase are the same as in + lwjgl-applet Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar =================================================================== (Binary files differ) Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-15 17:40:06 UTC (rev 3711) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-15 19:00:59 UTC (rev 3712) @@ -14,9 +14,9 @@ <dirname property="eclipse.antscript.basedir" file="${ant.file.eclipse.antscript}" /> - <property name="keystore" value="teststore" /> - <property name="alias" value="tester" /> - <property name="password" value="tester" /> + <property name="keystore" value="applet/lwjglkeystore" /> + <property name="alias" value="lwjgl" /> + <property name="password" value="123456" /> <property name="eclipse.updatesite" value="http://www.lwjgl.org/update/" /> <property name="eclipse.bundle.vendor" value="lwjgl.org" /> @@ -505,6 +505,7 @@ <echo>This plugin is to be called from main LWJGL build.xml file.</echo> <echo>It creates the update site, the result will be found in</echo> <echo>${eclipse.build.plugins}/org.lwjgl.updatesite</echo> + <echo>For more information, read READ.ME</echo> </target> </project> \ No newline at end of file Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-15 17:40:06 UTC (rev 3711) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-15 19:00:59 UTC (rev 3712) @@ -19,6 +19,7 @@ import java.io.IOException; import java.io.StringWriter; import java.math.BigInteger; +import java.nio.ByteBuffer; import java.security.MessageDigest; import java.util.ArrayList; import java.util.Arrays; @@ -308,7 +309,6 @@ Document doc = readXMLinJar(docBuilder, jis, jarEntry); info.doc = doc; - jis.closeEntry(); break; } } @@ -346,7 +346,6 @@ Document doc = readXMLinJar(docBuilder, jis, jarEntry); info.doc = doc; - jis.closeEntry(); break; } @@ -378,17 +377,13 @@ protected Document readXMLinJar(DocumentBuilder docBuilder, JarInputStream jis, JarEntry jarEntry) throws IOException, SAXException { - byte[] buffer = new byte[(int) jarEntry.getSize()]; - int count; - int pos = 0; - byte data[] = new byte[BUFFERSIZE]; - while ((count = jis.read(data, 0, BUFFERSIZE)) != -1) { - System.arraycopy(data, 0, buffer, pos, count); - pos += count; + try { + Document doc = docBuilder.parse(jis); + return doc; + } catch (IOException ex) { + System.err.println("Error reading jar entry " + jarEntry + ": ex"); + throw ex; } - ByteArrayInputStream bis = new ByteArrayInputStream(buffer); - Document doc = docBuilder.parse(bis); - return doc; } protected static void dump(Node doc) { @@ -1105,8 +1100,6 @@ } return element; } - - /** * @return the updateSiteFolder @@ -1176,20 +1169,20 @@ publisher.repositoryURI = "http://lwjgl.org/update"; publisher.execute(); } - + /** * {@inheritDoc} * @see org.apache.tools.ant.Task#execute() */ @Override public void execute() throws BuildException { - if (updateSiteFolder==null) { + if (updateSiteFolder == null) { throw new BuildException("attribute updateSiteFolder missing"); } - if (repositoryName==null) { + if (repositoryName == null) { throw new BuildException("attribute repositoryName missing"); } - if (repositoryURI==null) { + if (repositoryURI == null) { throw new BuildException("attribute repositoryURI missing"); } try { @@ -1197,9 +1190,7 @@ } catch (Exception ex) { throw new BuildException(ex); } - + } - - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |