From 521ec24c62a1ba476795369a42114fede7043f44 Mon Sep 17 00:00:00 2001 From: elmot Date: Fri, 18 Mar 2016 17:29:27 +0200 Subject: [PATCH] Build client-compiler with maven Change-Id: Ic86a95ce44cc37c8d34d607b39f2aec4cc922ce2 --- .classpath | 4 +- .gitignore | 4 + client-compiled/ivy.xml | 2 +- client-compiler/pom.xml | 327 ++++++++++++++++++ .../com/vaadin/sass/linker/SassLinker.java | 0 .../AcceptCriteriaFactoryGenerator.java | 0 .../ConnectorBundleLoaderFactory.java | 0 .../metadata/ArraySerializer.java | 0 .../metadata/ClientRpcVisitor.java | 0 .../metadata/ConnectorBundle.java | 0 .../metadata/ConnectorInitVisitor.java | 0 .../metadata/CustomSerializer.java | 0 .../metadata/EnumSerializer.java | 0 .../metadata/FieldProperty.java | 0 .../metadata/GeneratedSerializer.java | 0 .../metadata/JsonSerializer.java | 0 .../metadata/MethodProperty.java | 0 .../metadata/OnStateChangeVisitor.java | 0 .../widgetsetutils/metadata/Property.java | 0 .../metadata/RendererVisitor.java | 0 .../metadata/ServerRpcVisitor.java | 0 .../metadata/StateInitVisitor.java | 0 .../widgetsetutils/metadata/TypeVisitor.java | 0 .../metadata/WidgetInitVisitor.java | 0 .../com/vaadin/tools/CvalAddonsChecker.java | 0 .../java}/com/vaadin/tools/CvalChecker.java | 0 .../com/vaadin/tools/WidgetsetCompiler.java | 0 .../com/google/gwt/dev/About.properties | 2 + .../com/vaadin/tools/CvalChecker.properties | 0 .../vaadin/tools/CvalAddonsCheckerTest.java | 10 +- .../tools/CvalAddonstCheckerUseCasesTest.java | 62 +++- .../com/vaadin/tools/CvalCheckerTest.java | 4 +- ivysettings.xml | 2 +- pom.xml | 2 + uitest/ivy.xml | 2 +- widgets/ivy.xml | 2 +- 36 files changed, 410 insertions(+), 13 deletions(-) create mode 100644 client-compiler/pom.xml rename client-compiler/src/{ => main/java}/com/vaadin/sass/linker/SassLinker.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/Property.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/tools/CvalAddonsChecker.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/tools/CvalChecker.java (100%) rename client-compiler/src/{ => main/java}/com/vaadin/tools/WidgetsetCompiler.java (100%) create mode 100644 client-compiler/src/main/resources/com/google/gwt/dev/About.properties rename client-compiler/src/{ => main/resources}/com/vaadin/tools/CvalChecker.properties (100%) rename client-compiler/{tests/src => src/test/java}/com/vaadin/tools/CvalAddonsCheckerTest.java (95%) rename client-compiler/{tests/src => src/test/java}/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java (83%) rename client-compiler/{tests/src => src/test/java}/com/vaadin/tools/CvalCheckerTest.java (99%) diff --git a/.classpath b/.classpath index 2cd430abfe..f68a533702 100644 --- a/.classpath +++ b/.classpath @@ -5,8 +5,8 @@ - - + + diff --git a/.gitignore b/.gitignore index 2b15b7e5b0..7c5b461de9 100644 --- a/.gitignore +++ b/.gitignore @@ -88,6 +88,10 @@ push/target/ shared/target/ server/target/ client/target/ +client-compiler/target/ .sass-cache phantomjsdriver.log + +*.iml +.idea \ No newline at end of file diff --git a/client-compiled/ivy.xml b/client-compiled/ivy.xml index dc7a396a4e..2fed37467a 100644 --- a/client-compiled/ivy.xml +++ b/client-compiled/ivy.xml @@ -26,7 +26,7 @@ + rev="${vaadin.version}" conf="compile-module-> default" /> diff --git a/client-compiler/pom.xml b/client-compiler/pom.xml new file mode 100644 index 0000000000..a37155a738 --- /dev/null +++ b/client-compiler/pom.xml @@ -0,0 +1,327 @@ + + + 4.0.0 + + com.vaadin + vaadin-root + 7.7.0-SNAPSHOT + + vaadin-client-compiler + vaadin-client-compiler + jar + + + Vaadin Ltd + + https://vaadin.com/ + Vaadin client compiler + + + + com.vaadin + vaadin-shared + ${project.version} + + + com.vaadin + vaadin-server + ${project.version} + + + com.vaadin + vaadin-client + ${project.version} + + + com.vaadin + vaadin-sass-compiler + ${vaadin.sass.version} + + + + net.sourceforge.cssparser + cssparser + + + + + + commons-collections + commons-collections + 3.1 + + + commons-logging + commons-logging + 1.1.3 + + + net.sourceforge.cssparser + cssparser + 0.9.11 + + + ant + ant + 1.6.5 + + + ant + ant-launcher + 1.6.5 + + + org.ow2.asm + asm + 5.0.3 + + + org.ow2.asm + asm-util + 5.0.3 + + + org.ow2.asm + asm-commons + 5.0.3 + + + org.eclipse.jetty + jetty-annotations + 8.1.12.v20130726 + + + org.eclipse.jetty + orbit + + + + + org.eclipse.jetty + jetty-servlets + 8.1.12.v20130726 + + + org.eclipse.jetty + orbit + + + + + + org.eclipse.jetty + jetty-util + 8.1.12.v20130726 + + + org.jdesktop + swing-worker + 1.1 + + + commons-codec + commons-codec + 1.8 + + + commons-io + commons-io + ${commons-io.version} + + + org.apache.commons + commons-lang3 + 3.1 + + + org.apache.james + apache-mime4j + 0.6 + + + org.apache.httpcomponents + httpclient + 4.3.1 + + + org.apache.httpcomponents + httpcore + 4.3 + + + org.apache.httpcomponents + httpmime + 4.3.1 + + + net.sourceforge.nekohtml + nekohtml + 1.9.19 + + + xalan + serializer + 2.7.1 + + + xerces + xercesImpl + 2.11.0 + + + xml-apis + xml-apis + 1.4.01 + + + com.ibm.icu + icu4j + 50.1.1 + + + com.vaadin + vaadin-client-compiler-deps + 1.2.0 + + + com.vaadin.external.gwt + gwt-dev + ${vaadin.gwt.version} + provided + + + + junit + junit + ${junit.version} + test + + + + + + + src/main/resources + true + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + + + unpack-dependencies + process-classes + + unpack + + + + + com.vaadin.external.gwt + gwt-dev + + about_files/**, + com/google/gwt/core/**, + com/google/gwt/dev/**, + com/google/gwt/lang/**, + com/google/gwt/soyc/**, + com/google/gwt/thirdparty/json/**, + com/google/gwt/util/**, + license/LICENSE.sax.txt, + netscape/**, + org/apache/COPYING, + org/apache/jasper/**, + org/apache/commons/el/**, + org/apache/commons/lang3/**, + templates/*, + about.html, + jetty-dir.css, + plugin.properties + + + com/google/gwt/dev/protobuf/**, + com/google/gwt/dev/About.properties + + + + ${project.build.directory}/classes + false + true + + + + + + maven-resources-plugin + + + + copy-sources + + prepare-package + + copy-resources + + + ${project.build.directory}/classes + + + src/main/java + false + + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + JavaSE-1.6 + com.vaadin.*;version="${project.version}",com.google.gwt.*;version="${project.version}" + + + + + + + bundle-manifest + prepare-package + + manifest + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + + + + + diff --git a/client-compiler/src/com/vaadin/sass/linker/SassLinker.java b/client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java similarity index 100% rename from client-compiler/src/com/vaadin/sass/linker/SassLinker.java rename to client-compiler/src/main/java/com/vaadin/sass/linker/SassLinker.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/Property.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/Property.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/Property.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java similarity index 100% rename from client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java rename to client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java diff --git a/client-compiler/src/com/vaadin/tools/CvalAddonsChecker.java b/client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java similarity index 100% rename from client-compiler/src/com/vaadin/tools/CvalAddonsChecker.java rename to client-compiler/src/main/java/com/vaadin/tools/CvalAddonsChecker.java diff --git a/client-compiler/src/com/vaadin/tools/CvalChecker.java b/client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java similarity index 100% rename from client-compiler/src/com/vaadin/tools/CvalChecker.java rename to client-compiler/src/main/java/com/vaadin/tools/CvalChecker.java diff --git a/client-compiler/src/com/vaadin/tools/WidgetsetCompiler.java b/client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java similarity index 100% rename from client-compiler/src/com/vaadin/tools/WidgetsetCompiler.java rename to client-compiler/src/main/java/com/vaadin/tools/WidgetsetCompiler.java diff --git a/client-compiler/src/main/resources/com/google/gwt/dev/About.properties b/client-compiler/src/main/resources/com/google/gwt/dev/About.properties new file mode 100644 index 0000000000..364c323136 --- /dev/null +++ b/client-compiler/src/main/resources/com/google/gwt/dev/About.properties @@ -0,0 +1,2 @@ +gwt.version=${project.version} +gwt.svnrev= diff --git a/client-compiler/src/com/vaadin/tools/CvalChecker.properties b/client-compiler/src/main/resources/com/vaadin/tools/CvalChecker.properties similarity index 100% rename from client-compiler/src/com/vaadin/tools/CvalChecker.properties rename to client-compiler/src/main/resources/com/vaadin/tools/CvalChecker.properties diff --git a/client-compiler/tests/src/com/vaadin/tools/CvalAddonsCheckerTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java similarity index 95% rename from client-compiler/tests/src/com/vaadin/tools/CvalAddonsCheckerTest.java rename to client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java index 1fb9413ee4..c6200bc7e0 100644 --- a/client-compiler/tests/src/com/vaadin/tools/CvalAddonsCheckerTest.java +++ b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonsCheckerTest.java @@ -33,6 +33,8 @@ import static com.vaadin.tools.CvalCheckerTest.saveCache; import static com.vaadin.tools.CvalCheckerTest.unreachableLicenseProvider; import static com.vaadin.tools.CvalCheckerTest.validLicenseProvider; +import java.net.URL; +import java.net.URLClassLoader; import java.util.List; import org.junit.Assert; @@ -58,6 +60,10 @@ public class CvalAddonsCheckerTest { deleteCache(productNameCval); System.getProperties().remove(licenseName); + + // Set up a new URLClassLoader for the thread + Thread thread = Thread.currentThread(); + thread.setContextClassLoader(new URLClassLoader(new URL[0], null)); } @Test @@ -83,7 +89,7 @@ public class CvalAddonsCheckerTest { // We have a license that has never been validated from the server and // we are offline // -> Show a message on compile time (“Your license for TouchKit 4 has - // not been validated.”) + // not been validated.") System.setProperty(licenseName, VALID_KEY); addonChecker.setLicenseProvider(unreachableLicenseProvider); captureSystemOut(); @@ -153,7 +159,7 @@ public class CvalAddonsCheckerTest { // -> Work as expected // -> Show info message “Using TouchKit 4 license // 312-312321-321312-3-12-312-312 - // licensed to (1 developer license)” + // licensed to (1 developer license)" System.setProperty(licenseName, VALID_KEY); addonChecker.setLicenseProvider(validLicenseProvider); captureSystemOut(); diff --git a/client-compiler/tests/src/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java similarity index 83% rename from client-compiler/tests/src/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java rename to client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java index 89c8fc1f81..01cfe2087e 100644 --- a/client-compiler/tests/src/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java +++ b/client-compiler/src/test/java/com/vaadin/tools/CvalAddonstCheckerUseCasesTest.java @@ -35,7 +35,11 @@ import static com.vaadin.tools.CvalCheckerTest.unreachableLicenseProvider; import static com.vaadin.tools.CvalCheckerTest.validEvaluationLicenseProvider; import static com.vaadin.tools.CvalCheckerTest.validLicenseProvider; +import java.net.URL; +import java.net.URLClassLoader; + import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import com.vaadin.tools.CvalChecker.CvalServer; @@ -81,59 +85,111 @@ public class CvalAddonstCheckerUseCasesTest { } } + @Before + public void setUp() { + // Set up a new URLClassLoader for the thread + Thread thread = Thread.currentThread(); + thread.setContextClassLoader(new URLClassLoader(new URL[0], null)); + } + + /* TODO: Use more descriptive test names */ + @Test - public void testUseCases() throws Exception { + public void testUseCase1() throws Exception { useCase(1, License.NONE, Version.AGPL, Validated.NO, Network.OFF, Compile.YES, Cached.NO, Message.AGPL); + } + @Test + public void testUseCase2() throws Exception { useCase(2, License.NONE, Version.CVAL, Validated.NO, Network.ON, Compile.NO, Cached.NO, Message.NO_LICENSE); + } + @Test + public void testUseCase3() throws Exception { useCase(3, License.NONE, Version.CVAL, Validated.NO, Network.OFF, Compile.NO, Cached.NO, Message.NO_LICENSE); + } + @Test + public void testUseCase4() throws Exception { useCase(4, License.EVAL, Version.CVAL, Validated.NO, Network.ON, Compile.YES, Cached.YES, Message.EVALUATION); + } + @Test + public void testUseCase5() throws Exception { useCase(5, License.INVALID, Version.CVAL, Validated.NO, Network.OFF, Compile.YES, Cached.NO, Message.NO_VALIDATED); + } + @Test + public void testUseCase6() throws Exception { useCase(6, License.INVALID, Version.CVAL, Validated.NO, Network.ON, Compile.NO, Cached.NO, Message.INVALID); + } + @Test + public void testUseCase7() throws Exception { useCase(7, License.REAL, Version.CVAL, Validated.NO, Network.ON, Compile.YES, Cached.YES, Message.VALID); + } + @Test + public void testUseCase8() throws Exception { useCase(8, License.REAL, Version.CVAL, Validated.NO, Network.OFF, Compile.YES, Cached.NO, Message.NO_VALIDATED); + } + @Test + public void testUseCase9() throws Exception { useCase(9, License.REAL, Version.CVAL, Validated.YES, Network.OFF, Compile.YES, Cached.YES, Message.VALID); + } + @Test + public void testUseCase10() throws Exception { useCase(10, License.EVAL_EXPIRED, Version.CVAL, Validated.NO, Network.ON, Compile.NO, Cached.YES, Message.EXPIRED); + } + @Test + public void testUseCase11() throws Exception { useCase(11, License.EVAL_EXPIRED, Version.CVAL, Validated.YES, Network.OFF, Compile.NO, Cached.YES, Message.EXPIRED); + } + @Test + public void testUseCase12() throws Exception { useCase(12, License.REAL_EXPIRED, Version.CVAL, Validated.YES, Network.OFF, Compile.NO, Cached.YES, Message.EXPIRED); + } + @Test + public void testUseCase13() throws Exception { useCase(13, License.REAL_EXPIRED, Version.CVAL, Validated.NO, Network.ON, Compile.NO, Cached.YES, Message.EXPIRED); + } + @Test + public void testUseCase14() throws Exception { useCase(14, License.INVALID, Version.CVAL, Validated.OLD_KEY, Network.OFF, Compile.YES, Cached.NO, Message.NO_VALIDATED); } @Test - public void testMultipleLicenseUseCases() throws Exception { + public void testMultipleLicenseUseCase15() throws Exception { addLicensedJarToClasspath("test.foo", VAADIN_CVAL); System.setProperty(computeLicenseName("test.foo"), VALID_KEY); - useCase(15, License.REAL, Version.CVAL, Validated.YES, Network.OFF, Compile.YES, Cached.YES, Message.NO_VALIDATED); + } + @Test + public void testMultipleLicenseUseCase16() throws Exception { + addLicensedJarToClasspath("test.foo", VAADIN_CVAL); + System.setProperty(computeLicenseName("test.foo"), VALID_KEY); useCase(16, License.REAL, Version.CVAL, Validated.YES, Network.ON, Compile.NO, Cached.YES, Message.INVALID); } diff --git a/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java b/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java similarity index 99% rename from client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java rename to client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java index 6da455b2f6..6e1a8e57ed 100644 --- a/client-compiler/tests/src/com/vaadin/tools/CvalCheckerTest.java +++ b/client-compiler/src/test/java/com/vaadin/tools/CvalCheckerTest.java @@ -304,14 +304,14 @@ public class CvalCheckerTest { testManifest.getMainAttributes().putValue(VAADIN_ADDON_VERSION, "2"); // Create a temporary Jar - File testJarFile = File.createTempFile("vaadin." + productName, "jar"); + File testJarFile = File.createTempFile("vaadin." + productName, ".jar"); testJarFile.deleteOnExit(); JarOutputStream target = new JarOutputStream(new FileOutputStream( testJarFile), testManifest); target.close(); // Add the new jar to our classpath (use reflection) - URL url = new URL("file://" + testJarFile.getAbsolutePath()); + URL url = testJarFile.toURI().toURL(); final Method addURL = URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { URL.class }); addURL.setAccessible(true); diff --git a/ivysettings.xml b/ivysettings.xml index 8afc679af9..368d4d7fd8 100644 --- a/ivysettings.xml +++ b/ivysettings.xml @@ -46,7 +46,7 @@ + resolver="local-maven" /> 1.6 1.6 + UTF-8 2.4 @@ -50,6 +51,7 @@ push server client + client-compiler diff --git a/uitest/ivy.xml b/uitest/ivy.xml index 9c4d5025bd..a3dfc0e428 100644 --- a/uitest/ivy.xml +++ b/uitest/ivy.xml @@ -61,7 +61,7 @@ + rev="${vaadin.version}" conf="build-provided-> default"> diff --git a/widgets/ivy.xml b/widgets/ivy.xml index 3ee0cfe4af..da9422449b 100644 --- a/widgets/ivy.xml +++ b/widgets/ivy.xml @@ -33,7 +33,7 @@ + rev="${vaadin.version}" conf="build-provided,test->default">