SDK:
- update image downloader for sdk manual git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10673 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
652c3e9cca
commit
583c46d36d
@ -392,6 +392,11 @@ is divided into following sections:
|
|||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
|
<target name="-init-test-properties">
|
||||||
|
<property name="test.binaryincludes" value="<nothing>"/>
|
||||||
|
<property name="test.binarytestincludes" value=""/>
|
||||||
|
<property name="test.binaryexcludes" value=""/>
|
||||||
|
</target>
|
||||||
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
@ -415,7 +420,7 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
<target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
|
||||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
@ -425,7 +430,11 @@ is divided into following sections:
|
|||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
<batchtest todir="${build.test.results.dir}"/>
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
|
||||||
|
<filename name="${test.binarytestincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
@ -548,7 +557,7 @@ is divided into following sections:
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
</target>
|
</target>
|
||||||
<target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
<target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
|
||||||
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<attribute default="${includes}" name="includes"/>
|
<attribute default="${includes}" name="includes"/>
|
||||||
<attribute default="${excludes}" name="excludes"/>
|
<attribute default="${excludes}" name="excludes"/>
|
||||||
@ -558,7 +567,11 @@ is divided into following sections:
|
|||||||
<sequential>
|
<sequential>
|
||||||
<property name="junit.forkmode" value="perTest"/>
|
<property name="junit.forkmode" value="perTest"/>
|
||||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
||||||
<batchtest todir="${build.test.results.dir}"/>
|
<batchtest todir="${build.test.results.dir}">
|
||||||
|
<fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
|
||||||
|
<filename name="${test.binarytestincludes}"/>
|
||||||
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
<syspropertyset>
|
<syspropertyset>
|
||||||
<propertyref prefix="test-sys-prop."/>
|
<propertyref prefix="test-sys-prop."/>
|
||||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||||
@ -930,7 +943,7 @@ is divided into following sections:
|
|||||||
<target if="has.persistence.xml" name="-copy-persistence-xml">
|
<target if="has.persistence.xml" name="-copy-persistence-xml">
|
||||||
<mkdir dir="${build.classes.dir}/META-INF"/>
|
<mkdir dir="${build.classes.dir}/META-INF"/>
|
||||||
<copy todir="${build.classes.dir}/META-INF">
|
<copy todir="${build.classes.dir}/META-INF">
|
||||||
<fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
|
<fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
<target name="-post-compile">
|
<target name="-post-compile">
|
||||||
|
@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
|||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# 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.
|
# 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=dd1578ef
|
nbproject/build-impl.xml.data.CRC32=dd1578ef
|
||||||
nbproject/build-impl.xml.script.CRC32=a6e22d49
|
nbproject/build-impl.xml.script.CRC32=53d14a5f
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46
|
||||||
|
@ -48,20 +48,32 @@ public class LoadWikiImages extends Task {
|
|||||||
}
|
}
|
||||||
name = name.replaceAll(":", "/");
|
name = name.replaceAll(":", "/");
|
||||||
URL url = new URL(host + link);
|
URL url = new URL(host + link);
|
||||||
InputStream in = url.openStream();
|
InputStream in = null;
|
||||||
|
FileOutputStream out = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
in = url.openStream();
|
||||||
File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator));
|
File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator));
|
||||||
log("Getting image: " + host + link);
|
log("Getting image: " + host + link);
|
||||||
log("To: " + file);
|
log("To: " + file);
|
||||||
File parent = file.getParentFile();
|
File parent = file.getParentFile();
|
||||||
parent.mkdirs();
|
parent.mkdirs();
|
||||||
FileOutputStream out = new FileOutputStream(file);
|
out = new FileOutputStream(file);
|
||||||
int byte_ = in.read();
|
int byte_ = in.read();
|
||||||
while (byte_ != -1) {
|
while (byte_ != -1) {
|
||||||
out.write(byte_);
|
out.write(byte_);
|
||||||
byte_ = in.read();
|
byte_ = in.read();
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (in != null) {
|
||||||
in.close();
|
in.close();
|
||||||
|
}
|
||||||
|
if (out != null) {
|
||||||
out.close();
|
out.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (extidx >= 0) {
|
} else if (extidx >= 0) {
|
||||||
String name = link.replaceAll("/wiki/lib/exe/fetch\\.php\\?([^>]*);media=([^>]*)\"", "");
|
String name = link.replaceAll("/wiki/lib/exe/fetch\\.php\\?([^>]*);media=([^>]*)\"", "");
|
||||||
int markIdx = name.indexOf("?");
|
int markIdx = name.indexOf("?");
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user