Main repository of MikuMikuStudio
修訂 | 94f7af16ddc6e22750c4a0986413ce6c0b5826a6 (tree) |
---|---|
時間 | 2013-06-30 02:01:35 |
作者 | normen667 <normen667@75d0...> |
Commiter | normen667 |
SDK:
- update image downloader for sdk manual
git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10673 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
@@ -392,6 +392,11 @@ is divided into following sections: | ||
392 | 392 | </and> |
393 | 393 | </condition> |
394 | 394 | </target> |
395 | + <target name="-init-test-properties"> | |
396 | + <property name="test.binaryincludes" value="<nothing>"/> | |
397 | + <property name="test.binarytestincludes" value=""/> | |
398 | + <property name="test.binaryexcludes" value=""/> | |
399 | + </target> | |
395 | 400 | <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> |
396 | 401 | <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> |
397 | 402 | <attribute default="${includes}" name="includes"/> |
@@ -415,7 +420,7 @@ is divided into following sections: | ||
415 | 420 | </sequential> |
416 | 421 | </macrodef> |
417 | 422 | </target> |
418 | - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> | |
423 | + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> | |
419 | 424 | <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> |
420 | 425 | <attribute default="${includes}" name="includes"/> |
421 | 426 | <attribute default="${excludes}" name="excludes"/> |
@@ -425,7 +430,11 @@ is divided into following sections: | ||
425 | 430 | <sequential> |
426 | 431 | <property name="junit.forkmode" value="perTest"/> |
427 | 432 | <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> |
428 | - <batchtest todir="${build.test.results.dir}"/> | |
433 | + <batchtest todir="${build.test.results.dir}"> | |
434 | + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> | |
435 | + <filename name="${test.binarytestincludes}"/> | |
436 | + </fileset> | |
437 | + </batchtest> | |
429 | 438 | <syspropertyset> |
430 | 439 | <propertyref prefix="test-sys-prop."/> |
431 | 440 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
@@ -548,7 +557,7 @@ is divided into following sections: | ||
548 | 557 | </sequential> |
549 | 558 | </macrodef> |
550 | 559 | </target> |
551 | - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> | |
560 | + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> | |
552 | 561 | <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> |
553 | 562 | <attribute default="${includes}" name="includes"/> |
554 | 563 | <attribute default="${excludes}" name="excludes"/> |
@@ -558,7 +567,11 @@ is divided into following sections: | ||
558 | 567 | <sequential> |
559 | 568 | <property name="junit.forkmode" value="perTest"/> |
560 | 569 | <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> |
561 | - <batchtest todir="${build.test.results.dir}"/> | |
570 | + <batchtest todir="${build.test.results.dir}"> | |
571 | + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> | |
572 | + <filename name="${test.binarytestincludes}"/> | |
573 | + </fileset> | |
574 | + </batchtest> | |
562 | 575 | <syspropertyset> |
563 | 576 | <propertyref prefix="test-sys-prop."/> |
564 | 577 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
@@ -930,7 +943,7 @@ is divided into following sections: | ||
930 | 943 | <target if="has.persistence.xml" name="-copy-persistence-xml"> |
931 | 944 | <mkdir dir="${build.classes.dir}/META-INF"/> |
932 | 945 | <copy todir="${build.classes.dir}/META-INF"> |
933 | - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> | |
946 | + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> | |
934 | 947 | </copy> |
935 | 948 | </target> |
936 | 949 | <target name="-post-compile"> |
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=28e38971@1.38.2.45 | ||
4 | 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. |
5 | 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. |
6 | 6 | nbproject/build-impl.xml.data.CRC32=dd1578ef |
7 | -nbproject/build-impl.xml.script.CRC32=a6e22d49 | |
8 | -nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 | |
7 | +nbproject/build-impl.xml.script.CRC32=53d14a5f | |
8 | +nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46 |
@@ -48,21 +48,33 @@ public class LoadWikiImages extends Task { | ||
48 | 48 | } |
49 | 49 | name = name.replaceAll(":", "/"); |
50 | 50 | URL url = new URL(host + link); |
51 | - InputStream in = url.openStream(); | |
52 | - File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator)); | |
53 | - log("Getting image: " + host + link); | |
54 | - log("To: " + file); | |
55 | - File parent = file.getParentFile(); | |
56 | - parent.mkdirs(); | |
57 | - FileOutputStream out = new FileOutputStream(file); | |
58 | - int byte_ = in.read(); | |
59 | - while (byte_ != -1) { | |
60 | - out.write(byte_); | |
61 | - byte_ = in.read(); | |
51 | + InputStream in = null; | |
52 | + FileOutputStream out = null; | |
53 | + try { | |
54 | + | |
55 | + in = url.openStream(); | |
56 | + File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator)); | |
57 | + log("Getting image: " + host + link); | |
58 | + log("To: " + file); | |
59 | + File parent = file.getParentFile(); | |
60 | + parent.mkdirs(); | |
61 | + out = new FileOutputStream(file); | |
62 | + int byte_ = in.read(); | |
63 | + while (byte_ != -1) { | |
64 | + out.write(byte_); | |
65 | + byte_ = in.read(); | |
66 | + } | |
67 | + } catch (Exception e) { | |
68 | + e.printStackTrace(); | |
69 | + } finally { | |
70 | + if (in != null) { | |
71 | + in.close(); | |
72 | + } | |
73 | + if (out != null) { | |
74 | + out.close(); | |
75 | + } | |
62 | 76 | } |
63 | - in.close(); | |
64 | - out.close(); | |
65 | - }else if(extidx >= 0){ | |
77 | + } else if (extidx >= 0) { | |
66 | 78 | String name = link.replaceAll("/wiki/lib/exe/fetch\\.php\\?([^>]*);media=([^>]*)\"", ""); |
67 | 79 | int markIdx = name.indexOf("?"); |
68 | 80 | if (markIdx >= 0) { |