diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-03-22 17:19:19 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-03-27 22:15:02 +0300 |
commit | 7833b3540228251ef0eef23a85403e85bbcb571b (patch) | |
tree | bd932f7a5098f44475b40d48d9a213a0e1f36c19 /client-compiled | |
parent | 7b1a91f9ece0d38c74886383df3ee29d354592f8 (diff) | |
download | vaadin-framework-7833b3540228251ef0eef23a85403e85bbcb571b.tar.gz vaadin-framework-7833b3540228251ef0eef23a85403e85bbcb571b.zip |
Build vaadin-client-compiled with maven
Change-Id: I91ef39fec1244fdeff1ee269be39ae7800a495b3
Diffstat (limited to 'client-compiled')
-rw-r--r-- | client-compiled/build.xml | 150 | ||||
-rw-r--r-- | client-compiled/pom.xml | 180 |
2 files changed, 180 insertions, 150 deletions
diff --git a/client-compiled/build.xml b/client-compiled/build.xml deleted file mode 100644 index bbcfc7bf4a..0000000000 --- a/client-compiled/build.xml +++ /dev/null @@ -1,150 +0,0 @@ -<?xml version="1.0"?> - -<project name="vaadin-client-compiled" basedir="." default="publish-local" - xmlns:ivy="antlib:org.apache.ivy.ant"> - <description> - Compiled (JS+HTML) version of client side - </description> - - <include file="../common.xml" as="common" /> - <include file="../build.xml" as="vaadin" /> - <include file="../gwt-files.xml" as="gwtfiles" /> - - <!-- global properties --> - <property name="module.name" value="vaadin-client-compiled" /> - <property name="module.symbolic" value="com.vaadin.client-compiled" /> - <property name="result.dir" value="result" /> - <property name="gwtar.dir" location="${result.dir}/gwtar" /> - <property name="work.dir" location="${result.dir}/work" /> - <property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" /> - <property name="compiled.jar" - location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" /> - <property name="compiled-cache.jar" - location="${result.dir}/lib/${module.name}-cache-${vaadin.version}.jar" /> - - <union id="jar.includes"> - <fileset dir="${result.dir}"> - <include name="VAADIN/widgetsets/com.vaadin*/**" /> - </fileset> - </union> - - <target name="default-widgetset-cache"> - <antcall target="compile-module-cache"> - <param name="module" value="com.vaadin.DefaultWidgetSet" /> - </antcall> - </target> - - <target name="default-widgetset"> - <antcall target="compile-module"> - <param name="module" value="com.vaadin.DefaultWidgetSet" /> - </antcall> - </target> - - - <target name="compile-module-cache"> - <fail unless="module" - message="You must give the module to compile in the 'module' parameter" /> - <ivy:resolve log="download-only" resolveid="common" - conf="compile-module" /> - <ivy:cachepath pathid="classpath.compile.widgetset" - conf="compile-module" /> - <echo>Creating gwtar files for ${module} in ${gwtar.dir}</echo> - - <!-- Produce gwtar files for the separate JAR --> - <java classname="com.google.gwt.dev.CompileModule" - classpathref="classpath.compile.widgetset" failonerror="yes" - fork="yes" maxmemory="512m"> - <arg value="-out" /> - <arg value="${gwtar.dir}" /> - <arg value="-strict" /> - <arg value="${module}" /> - - <jvmarg value="-Xss8M" /> - <jvmarg value="-XX:MaxPermSize=256M" /> - <jvmarg value="-Djava.awt.headless=true" /> - </java> - </target> - - <target name="compile-module"> - <fail unless="module" - message="You must give the module to compile in the 'module' parameter" /> - <property name="style" value="OBF" /> - <property name="localWorkers" value="6" /> - <property name="extraParams" value="" /> - - <ivy:resolve log="download-only" resolveid="common" - conf="compile-module" /> - <ivy:cachepath pathid="classpath.compile.widgetset" - conf="compile-module" /> - - <mkdir dir="${module.output.dir}" /> - - <echo>Compiling ${module} to ${module.output.dir}</echo> - - <!-- compile the module --> - <java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.widgetset" - failonerror="yes" fork="yes" maxmemory="512m"> - <classpath location="${compiled-cache.jar}" /> - <arg value="-workDir" /> - <arg value="${work.dir}" /> - <arg value="-logLevel" /> - <arg value="TRACE" /> - <arg value="-war" /> - <arg value="${module.output.dir}" /> - <arg value="-style" /> - <arg value="${style}" /> - - <arg value="-localWorkers" /> - <arg value="${localWorkers}" /> - <arg value="-strict" /> - <!-- Disabled for now as it breaks code, e.g. ButtonWithShortcutNotRendered --> - <!-- <arg value="-XenableClosureCompiler" /> --> - <arg line="${extraParams}" /> - <arg value="${module}" /> - - <sysproperty key="vFailIfNotSerializable" value="true" /> - - <jvmarg value="-Xss8M" /> - <jvmarg value="-XX:MaxPermSize=256M" /> - <jvmarg value="-Djava.awt.headless=true" /> - </java> - - </target> - - <target name="client-compiled-cache.jar" depends="default-widgetset-cache"> - <jar file="${compiled-cache.jar}" compress="true"> - <fileset dir="${gwtar.dir}"> - <include name="**/*.gwtar" /> - </fileset> - <union refid="client-compiled-cache.gwt.includes" /> - <!-- <fileset dir="${common.jarfiles.dir}" /> --> - </jar> - </target> - - <target name="jar" depends="default-widgetset"> - <antcall target="common.jar"> - <param name="osgi.extra.package.prefixes" value="VAADIN/widgetsets/" /> - <param name="osgi.includeNumberPackages" value="1" /> - <reference torefid="extra.jar.includes" refid="jar.includes" /> - </antcall> - </target> - - <target name="publish-local" depends="jar"> - <antcall target="common.publish-local"> - <param name="conf" value="build" /> - </antcall> - </target> - - <target name="clean"> - <antcall target="common.clean" /> - </target> - - <target name="checkstyle"> - <echo>No java files in module</echo> - </target> - <target name="test" depends="checkstyle"> - <!--<antcall target="common.test.run" /> --> - <echo>WHAT? No tests for ${module.name}!</echo> - </target> - -</project> diff --git a/client-compiled/pom.xml b/client-compiled/pom.xml new file mode 100644 index 0000000000..da664fb938 --- /dev/null +++ b/client-compiled/pom.xml @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-root</artifactId> + <version>7.7.0-SNAPSHOT</version> + </parent> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-client-compiled</artifactId> + <name>vaadin-client-compiled</name> + <packaging>jar</packaging> + + <properties> + <widgetset.name>com.vaadin.DefaultWidgetSet</widgetset.name> + <widgetset.style>OBF</widgetset.style> + <widgetset.local.workers>6</widgetset.local.workers> + </properties> + + <organization> + <name>Vaadin Ltd</name> + </organization> + <url>https://vaadin.com/</url> + <description>Vaadin client compiled</description> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vaadin-server</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vaadin-client</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vaadin-client-compiler</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vaadin-buildhelpers</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.4.0</version> + <executions> + <execution> + <phase>generate-resources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <classpathScope>compile</classpathScope> + <executable>${java.home}/bin/java</executable> + <arguments> + <!-- TODO: Do we need these? --> + <!-- <jvmarg value="-Xss8M" /> --> + <!-- <jvmarg value="-XX:MaxPermSize=256M" /> --> + <!-- <jvmarg value="-Djava.awt.headless=true" /> --> + <argument>-Dgwt.persistentunitcachedir=${project.build.directory}/compile</argument> + <argument>-DvFailIfNotSerializable=true</argument> + + <argument>-classpath</argument> + <classpath /> + + <argument>com.google.gwt.dev.Compiler</argument> + + <argument>-workDir</argument> + <argument>${project.build.directory}/compile</argument> + <argument>-logLevel</argument> + <argument>TRACE</argument> + <argument>-war</argument> + <!-- This will write the result directly to target/classes for packaging --> + <argument>${project.build.outputDirectory}/VAADIN/widgetsets/</argument> + <argument>-style</argument> + <argument>${widgetset.style}</argument> + <argument>-localWorkers</argument> + <argument>${widgetset.local.workers}</argument> + + <argument>-strict</argument> + + <!-- Move unnecessary stuff to compile folder --> + <argument>-deploy</argument> + <argument>${project.build.directory}/compile</argument> + <argument>-extra</argument> + <argument>${project.build.directory}/compile</argument> + + <argument>${widgetset.name}</argument> + </arguments> + </configuration> + </execution> + + <execution> + <id>generate-export-package</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <classpathScope>compile</classpathScope> + <executable>${java.home}/bin/java</executable> + <arguments> + <argument>-Dvaadin.version=${project.version}</argument> + <argument>-DincludeNumberPackages=1</argument> + + <argument>-classpath</argument> + <classpath /> + + <argument>com.vaadin.buildhelpers.GeneratePackageExports</argument> + + <argument>${project.build.directory}/${project.build.finalName}.${project.packaging}</argument> + <argument>VAADIN/widgetsets</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + + + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment> + <!-- Export package is handled in exec plugin --> + <Export-Package></Export-Package> + <Import-Package></Import-Package> + </instructions> + </configuration> + <executions> + <execution> + <id>bundle-manifest</id> + <phase>prepare-package</phase> + <goals> + <goal>manifest</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.6</version> + <configuration> + <archive> + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> + <index>false</index> + <manifest> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + </manifest> + </archive> + <excludes> + <exclude>VAADIN/widgetsets/WEB-INF</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> + +</project> |