From a642b5c061a836956eea97b0b60461f05c0b8747 Mon Sep 17 00:00:00 2001 From: Michael Zhou Date: Fri, 25 Nov 2011 20:43:18 -0600 Subject: [PATCH] =?UTF-8?q?*=20=E6=94=B9=E8=BF=9Bpom=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E6=97=B6=E4=BD=BF=E7=94=A8=E8=BE=83=E9=AB=98?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E7=9A=84java=EF=BC=8C=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=97=B6=E4=BD=BF=E7=94=A8=E4=BF=9D=E5=AE=88=E7=9A=84Java=201.?= =?UTF-8?q?5=E3=80=82=20*=20=E9=99=A4=E5=8E=BBeclipse=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.txt | 2 + .../citrus/util/templatelite/Template.java | 2 +- .../templatelite/AbstractTemplateTests.java | 4 +- .../TemplateInputSourceTests.java | 10 +- .../templatelite/TemplateParserTests.java | 2 +- pom.xml | 1548 +++++++++-------- 6 files changed, 789 insertions(+), 779 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index cdbe5640d..c4843953f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -228,3 +228,5 @@ * 添加方法:navigator.redirectTo(name).withParameter(..).end(); 通过end()方法可以明确结束语句,并发出重定向请求。 * 所有源码改用UTF-8,符合多数开发环境的默认配置。 +* 改进pom,在开发时使用较高版本的java,发布时使用保守的Java 1.5。 + diff --git a/common/util/src/main/java/com/alibaba/citrus/util/templatelite/Template.java b/common/util/src/main/java/com/alibaba/citrus/util/templatelite/Template.java index 38c8bbacb..32b898da2 100644 --- a/common/util/src/main/java/com/alibaba/citrus/util/templatelite/Template.java +++ b/common/util/src/main/java/com/alibaba/citrus/util/templatelite/Template.java @@ -1766,7 +1766,7 @@ InputSource getRelative(String relativePath) throws Exception { String sourceURI = null; if (source instanceof File) { - sourceURI = ((File) source).toURL().toExternalForm(); + sourceURI = ((File) source).toURI().toString(); } else if (source instanceof URL) { sourceURI = ((URL) source).toExternalForm(); } diff --git a/common/util/src/test/java/com/alibaba/citrus/util/templatelite/AbstractTemplateTests.java b/common/util/src/test/java/com/alibaba/citrus/util/templatelite/AbstractTemplateTests.java index e407f2d0b..816849150 100644 --- a/common/util/src/test/java/com/alibaba/citrus/util/templatelite/AbstractTemplateTests.java +++ b/common/util/src/test/java/com/alibaba/citrus/util/templatelite/AbstractTemplateTests.java @@ -104,7 +104,7 @@ protected URL copyFile(String src, String dest) throws IOException { io(new FileInputStream(new File(srcdir, src)), new FileOutputStream(destfile), true, true); - return destfile.toURL(); + return destfile.toURI().toURL(); } protected URL copyFilesToJar(String destJar, String... srcdest) throws IOException { @@ -124,7 +124,7 @@ protected URL copyFilesToJar(String destJar, String... srcdest) throws IOExcepti jos.close(); - return destJarFile.toURL(); + return destJarFile.toURI().toURL(); } protected void acceptFailure(Object visitor) { diff --git a/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateInputSourceTests.java b/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateInputSourceTests.java index a70a0da87..74ca34084 100644 --- a/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateInputSourceTests.java +++ b/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateInputSourceTests.java @@ -82,7 +82,7 @@ public void charsetDetection() throws IOException { // ----------------- content = repeat("#", 1024 * 4) + "\n"; - content += " #@charset GB18030\n"; // 超过了readlimit + content += " #@charset GB18030\n"; // 超过了readlimit assertEquals("default", detectCharset(content)); } @@ -100,10 +100,10 @@ public void getRelative_File() throws Exception { assertNull(parentSource.getRelative(" ")); inputSource = parentSource.getRelative(" b.txt "); - assertEquals(new File("/aa/bb/b.txt").toURL().toExternalForm(), inputSource.systemId); + assertEquals(new File("/aa/bb/b.txt").toURI().toURL().toExternalForm(), inputSource.systemId); inputSource = parentSource.getRelative(" /b.txt "); - assertEquals(new File("/aa/bb/b.txt").toURL().toExternalForm(), inputSource.systemId); + assertEquals(new File("/aa/bb/b.txt").toURI().toURL().toExternalForm(), inputSource.systemId); inputSource = parentSource.getRelative(" ../b.txt "); assertEquals(new File("/aa/b.txt").toURI().normalize().toURL().toExternalForm(), inputSource.systemId); @@ -171,8 +171,8 @@ public void getReader() throws IOException { assertReader("GBK", f, f.toURI().toString()); // file: url as input source - inputSource = new InputSource(f.toURL()); - assertReader("GBK", f, f.toURL().toExternalForm()); + inputSource = new InputSource(f.toURI().toURL()); + assertReader("GBK", f, f.toURI().toURL().toExternalForm()); // url as input source URL jarurl = copyFilesToJar("test.jar", "test05_param_gbk.txt", "gbk.txt"); diff --git a/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateParserTests.java b/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateParserTests.java index dd2e1c45d..0ee6dc6dd 100644 --- a/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateParserTests.java +++ b/common/util/src/test/java/com/alibaba/citrus/util/templatelite/TemplateParserTests.java @@ -939,7 +939,7 @@ public void test08_import_notfound() { @Test public void test08_import_invalid() throws Exception { - String importedFile = repeat("../", countMatches(srcdir.toURL().toExternalForm(), "/")) + "../def.htm"; + String importedFile = repeat("../", countMatches(srcdir.toURI().toURL().toExternalForm(), "/")) + "../def.htm"; String s = "#@trimming on\n"; s += "${abc: #abc}\n"; s += "#abc(" + importedFile + ") ## xxxx"; diff --git a/pom.xml b/pom.xml index 0c7c3bcfb..02976f9d6 100644 --- a/pom.xml +++ b/pom.xml @@ -1,772 +1,780 @@ - - - org.sonatype.oss - oss-parent - 7 - - 4.0.0 - com.alibaba.citrus - citrus-parent - pom - Citrus Parent Project - 3.0.8 - Another Java-based WEB Framework - http://www.openwebx.org/ - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - scm:git:https://github.com/webx/citrus - scm:git:git@github.com:webx/citrus.git - http://github.com/webx/citrus - - - - baobao - Michael Zhou - yizhi@taobao.com - - architect - developer - - - http://i54.tinypic.com/2jewmjr.jpg - - -6 - - - - 1.5 - UTF-8 - 3.0.8 - 2.5.6.SEC03 - 1.0 - 1.0 - 6.1.22 - ${java.encoding} - true - - - - spring3 - - 3.0.6.RELEASE - - - - - dist/webx - dist/test - common/expr - common/logconfig - common/util - common/springext - common/generictype - common/asm - common/hessian - common/codegen - test/util - test/webx - service/base - service/dataresolver - service/form - service/resource - service/upload - service/requestcontext - service/pipeline - service/configuration - service/mappingrule - service/moduleloader - service/pull - service/template - service/jsp - service/velocity - service/freemarker - service/uribroker - service/mail - webx/framework - webx/turbine - webx/dev - - - - org.slf4j - slf4j-api - - - org.slf4j - jcl-over-slf4j - - - - - - - - - ${project.groupId} - citrus-webx-all - ${webx-version} - - - ${project.groupId} - citrus-test-all - ${webx-version} - test - - - ${project.groupId} - citrus-common-logconfig - ${webx-version} - - - ${project.groupId} - citrus-common-expr - ${webx-version} - - - ${project.groupId} - citrus-common-util - ${webx-version} - - - ${project.groupId} - citrus-common-springext - ${webx-version} - - - ${project.groupId} - citrus-common-generictype - ${webx-version} - - - ${project.groupId} - citrus-common-asm - ${webx-version} - - - ${project.groupId} - citrus-common-hessian - ${webx-version} - - - ${project.groupId} - citrus-common-codegen - ${webx-version} - - - ${project.groupId} - citrus-test-util - ${webx-version} - test - - - ${project.groupId} - citrus-test-webx - ${webx-version} - test - - - ${project.groupId} - citrus-service-base - ${webx-version} - - - ${project.groupId} - citrus-service-dataresolver - ${webx-version} - - - ${project.groupId} - citrus-service-form - ${webx-version} - - - ${project.groupId} - citrus-service-resource - ${webx-version} - - - ${project.groupId} - citrus-service-upload - ${webx-version} - - - ${project.groupId} - citrus-service-requestcontext - ${webx-version} - - - ${project.groupId} - citrus-service-pipeline - ${webx-version} - - - ${project.groupId} - citrus-service-configuration - ${webx-version} - - - ${project.groupId} - citrus-service-mappingrule - ${webx-version} - - - ${project.groupId} - citrus-service-moduleloader - ${webx-version} - - - ${project.groupId} - citrus-service-pull - ${webx-version} - - - ${project.groupId} - citrus-service-template - ${webx-version} - - - ${project.groupId} - citrus-service-jsp - ${webx-version} - - - ${project.groupId} - citrus-service-velocity - ${webx-version} - - - ${project.groupId} - citrus-service-freemarker - ${webx-version} - - - ${project.groupId} - citrus-service-uribroker - ${webx-version} - - - ${project.groupId} - citrus-service-mail - ${webx-version} - - - ${project.groupId} - citrus-webx-framework - ${webx-version} - - - ${project.groupId} - citrus-webx-turbine - ${webx-version} - - - ${project.groupId} - citrus-webx-dev - ${webx-version} - - - - - - org.slf4j - slf4j-api - 1.6.1 - - - - org.slf4j - jcl-over-slf4j - 1.6.1 - - - - commons-logging - commons-logging - 1.1.1 - provided - - - - ch.qos.logback - logback-classic - 0.9.24 - runtime - - - - org.slf4j - slf4j-log4j12 - 1.6.1 - runtime - - - log4j - log4j - 1.2.16 - runtime - - - - - - junit - junit - 4.8.2 - test - - - org.hamcrest - hamcrest-library - 1.1 - test - - - httpunit - httpunit - 1.7 - test - - - jtidy - jtidy - - - - - rhino - js - 1.7R1 - test - - - nekohtml - nekohtml - 1.9.6 - test - - - xerces - xercesImpl - 2.9.1 - test - - - xml-apis - xml-apis - - - - - xalan - xalan - 2.7.1 - test - - - xml-apis - xml-apis - - - - - org.easymock - easymockclassextension - 3.0 - test - - - org.apache.tomcat - jasper - 6.0.33 - test - - - org.jvnet.mock-javamail - mock-javamail - 1.7 - test - - - oro - oro - 2.0.8 - - - - - - ecs - ecs - 1.4.2 - - - org.apache.commons - commons-jexl - 2.0.1 - - - org.apache.velocity - velocity - 1.6.4 - - - org.freemarker - freemarker - 2.3.16 - - - commons-fileupload - commons-fileupload - 1.2.1 - - - commons-io - commons-io - 1.4 - - - commons-codec - commons-codec - 1.3 - - - org.codehaus.groovy - groovy-all - 1.6.3 - runtime - - - org.apache.ant - ant - - - org.apache.ant - ant-launcher - - - jline - jline - - - - - dom4j - dom4j - 1.6.1 - - - xml-apis - xml-apis - - - - - cglib - cglib-nodep - 2.2 - - - javax.servlet - servlet-api - 2.5 - provided - - - javax.mail - mail - 1.4.1 - provided - - - javax.activation - activation - 1.1 - provided - - - janino - janino - 2.5.10 - test - - - xml-apis - xml-apis - 1.3.04 - - - - - - org.springframework - spring-core - ${spring-version} - - - org.springframework - spring-beans - ${spring-version} - - - org.springframework - spring-aop - ${spring-version} - - - org.springframework - spring-context - ${spring-version} - - - org.springframework - spring-context-support - ${spring-version} - - - org.springframework - spring-tx - ${spring-version} - - - org.springframework - spring-jdbc - ${spring-version} - - - org.springframework - spring-orm - ${spring-version} - - - org.springframework - spring-web - ${spring-version} - - - org.springframework - spring-webmvc - ${spring-version} - - - org.springframework - spring-test - ${spring-version} - test - - - - - - - maven-deploy-plugin - false - - false - - - - maven-compiler-plugin - - ${java.version} - ${java.version} - - - - maven-jar-plugin - - - - true - true - - - - - - maven-antrun-plugin - - - compile - - - - - - - - - - - run - - - - - - maven-surefire-plugin - - - **/*Tests.java - - -Xmx256m - - - - maven-eclipse-plugin - - true - - org.eclipse.jdt.launching.JRE_CONTAINER - - - - - maven-source-plugin - - - attach-sources - - jar-no-fork - - - - - - org.mortbay.jetty - maven-jetty-plugin - - citrus - 9999 - - - productionMode - false - - - - - - com.alibaba.citrus.tool - maven-springext-plugin - - - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - - - maven-antrun-plugin - 1.6 - - - maven-compiler-plugin - - 2.3.2 - - - maven-jar-plugin - 2.3.2 - - - maven-deploy-plugin - 2.7 - - true - - - - maven-eclipse-plugin - 2.8 - - - maven-shade-plugin - 1.4 - - - maven-source-plugin - 2.1.2 - - - maven-javadoc-plugin - 2.8 - - - maven-surefire-plugin - 2.10 - - - org.mortbay.jetty - maven-jetty-plugin - ${jetty-version} - - - com.alibaba.citrus.tool - maven-springext-plugin - ${springext-plugin-version} - - - maven-gpg-plugin - 1.4 - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [1.0,) - - run - - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - [1.0,) - - enforce - - - - - - - - - - - - - + + + org.sonatype.oss + oss-parent + 7 + + 4.0.0 + com.alibaba.citrus + citrus-parent + pom + Citrus Parent Project + 3.0.8 + Another Java-based WEB Framework + http://www.openwebx.org/ + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + scm:git:https://github.com/webx/citrus + scm:git:git@github.com:webx/citrus.git + http://github.com/webx/citrus + + + + baobao + Michael Zhou + yizhi@taobao.com + + architect + developer + + + http://i54.tinypic.com/2jewmjr.jpg + + -6 + + + + 1.6 + UTF-8 + 3.0.8 + 2.5.6.SEC03 + 1.0 + 1.0 + 6.1.22 + ${java.encoding} + true + + + + spring3 + + 3.0.6.RELEASE + + + + deployment + + + 1.5 + + false + + + + + dist/webx + dist/test + common/expr + common/logconfig + common/util + common/springext + common/generictype + common/asm + common/hessian + common/codegen + test/util + test/webx + service/base + service/dataresolver + service/form + service/resource + service/upload + service/requestcontext + service/pipeline + service/configuration + service/mappingrule + service/moduleloader + service/pull + service/template + service/jsp + service/velocity + service/freemarker + service/uribroker + service/mail + webx/framework + webx/turbine + webx/dev + + + + org.slf4j + slf4j-api + + + org.slf4j + jcl-over-slf4j + + + + + + + + + ${project.groupId} + citrus-webx-all + ${webx-version} + + + ${project.groupId} + citrus-test-all + ${webx-version} + test + + + ${project.groupId} + citrus-common-logconfig + ${webx-version} + + + ${project.groupId} + citrus-common-expr + ${webx-version} + + + ${project.groupId} + citrus-common-util + ${webx-version} + + + ${project.groupId} + citrus-common-springext + ${webx-version} + + + ${project.groupId} + citrus-common-generictype + ${webx-version} + + + ${project.groupId} + citrus-common-asm + ${webx-version} + + + ${project.groupId} + citrus-common-hessian + ${webx-version} + + + ${project.groupId} + citrus-common-codegen + ${webx-version} + + + ${project.groupId} + citrus-test-util + ${webx-version} + test + + + ${project.groupId} + citrus-test-webx + ${webx-version} + test + + + ${project.groupId} + citrus-service-base + ${webx-version} + + + ${project.groupId} + citrus-service-dataresolver + ${webx-version} + + + ${project.groupId} + citrus-service-form + ${webx-version} + + + ${project.groupId} + citrus-service-resource + ${webx-version} + + + ${project.groupId} + citrus-service-upload + ${webx-version} + + + ${project.groupId} + citrus-service-requestcontext + ${webx-version} + + + ${project.groupId} + citrus-service-pipeline + ${webx-version} + + + ${project.groupId} + citrus-service-configuration + ${webx-version} + + + ${project.groupId} + citrus-service-mappingrule + ${webx-version} + + + ${project.groupId} + citrus-service-moduleloader + ${webx-version} + + + ${project.groupId} + citrus-service-pull + ${webx-version} + + + ${project.groupId} + citrus-service-template + ${webx-version} + + + ${project.groupId} + citrus-service-jsp + ${webx-version} + + + ${project.groupId} + citrus-service-velocity + ${webx-version} + + + ${project.groupId} + citrus-service-freemarker + ${webx-version} + + + ${project.groupId} + citrus-service-uribroker + ${webx-version} + + + ${project.groupId} + citrus-service-mail + ${webx-version} + + + ${project.groupId} + citrus-webx-framework + ${webx-version} + + + ${project.groupId} + citrus-webx-turbine + ${webx-version} + + + ${project.groupId} + citrus-webx-dev + ${webx-version} + + + + + + org.slf4j + slf4j-api + 1.6.1 + + + + org.slf4j + jcl-over-slf4j + 1.6.1 + + + + commons-logging + commons-logging + 1.1.1 + provided + + + + ch.qos.logback + logback-classic + 0.9.24 + runtime + + + + org.slf4j + slf4j-log4j12 + 1.6.1 + runtime + + + log4j + log4j + 1.2.16 + runtime + + + + + + junit + junit + 4.8.2 + test + + + org.hamcrest + hamcrest-library + 1.1 + test + + + httpunit + httpunit + 1.7 + test + + + jtidy + jtidy + + + + + rhino + js + 1.7R1 + test + + + nekohtml + nekohtml + 1.9.6 + test + + + xerces + xercesImpl + 2.9.1 + test + + + xml-apis + xml-apis + + + + + xalan + xalan + 2.7.1 + test + + + xml-apis + xml-apis + + + + + org.easymock + easymockclassextension + 3.0 + test + + + org.apache.tomcat + jasper + 6.0.33 + test + + + org.jvnet.mock-javamail + mock-javamail + 1.7 + test + + + oro + oro + 2.0.8 + + + + + + ecs + ecs + 1.4.2 + + + org.apache.commons + commons-jexl + 2.0.1 + + + org.apache.velocity + velocity + 1.6.4 + + + org.freemarker + freemarker + 2.3.16 + + + commons-fileupload + commons-fileupload + 1.2.1 + + + commons-io + commons-io + 1.4 + + + commons-codec + commons-codec + 1.3 + + + org.codehaus.groovy + groovy-all + 1.6.3 + runtime + + + org.apache.ant + ant + + + org.apache.ant + ant-launcher + + + jline + jline + + + + + dom4j + dom4j + 1.6.1 + + + xml-apis + xml-apis + + + + + cglib + cglib-nodep + 2.2 + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.mail + mail + 1.4.1 + provided + + + javax.activation + activation + 1.1 + provided + + + janino + janino + 2.5.10 + test + + + xml-apis + xml-apis + 1.3.04 + + + + + + org.springframework + spring-core + ${spring-version} + + + org.springframework + spring-beans + ${spring-version} + + + org.springframework + spring-aop + ${spring-version} + + + org.springframework + spring-context + ${spring-version} + + + org.springframework + spring-context-support + ${spring-version} + + + org.springframework + spring-tx + ${spring-version} + + + org.springframework + spring-jdbc + ${spring-version} + + + org.springframework + spring-orm + ${spring-version} + + + org.springframework + spring-web + ${spring-version} + + + org.springframework + spring-webmvc + ${spring-version} + + + org.springframework + spring-test + ${spring-version} + test + + + + + + + maven-deploy-plugin + false + + false + + + + maven-compiler-plugin + + 1.6 + ${java.version} + + + + maven-jar-plugin + + + + true + true + + + + + + maven-antrun-plugin + + + compile + + + + + + + + + + + run + + + + + + maven-surefire-plugin + + + **/*Tests.java + + -Xmx256m + + + + maven-eclipse-plugin + + true + + org.eclipse.jdt.launching.JRE_CONTAINER + + + + + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.mortbay.jetty + maven-jetty-plugin + + citrus + 9999 + + + productionMode + false + + + + + + com.alibaba.citrus.tool + maven-springext-plugin + + + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + + + + maven-antrun-plugin + 1.6 + + + maven-compiler-plugin + + 2.3.2 + + + maven-jar-plugin + 2.3.2 + + + maven-deploy-plugin + 2.7 + + true + + + + maven-eclipse-plugin + 2.8 + + + maven-shade-plugin + 1.4 + + + maven-source-plugin + 2.1.2 + + + maven-javadoc-plugin + 2.8 + + + maven-surefire-plugin + 2.10 + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty-version} + + + com.alibaba.citrus.tool + maven-springext-plugin + ${springext-plugin-version} + + + maven-gpg-plugin + 1.4 + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-antrun-plugin + [1.0,) + + run + + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + [1.0,) + + enforce + + + + + + + + + + + + +