Fix ${project.version} in maven archetype. Add default value for optimizationLevel

This commit is contained in:
Alexey Andreev 2017-02-15 22:48:51 +03:00
parent 89f835540b
commit d5dd608961
2 changed files with 39 additions and 11 deletions

View File

@ -29,7 +29,32 @@
<artifactId>maven-archetype-plugin</artifactId> <artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version> <version>2.2</version>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<escapeString>\</escapeString>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>archetype-resources/pom.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>archetype-resources/pom.xml</exclude>
</excludes>
</resource>
</resources>
</build> </build>
</project> </project>

View File

@ -2,9 +2,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 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> <modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId> <groupId>\${groupId}</groupId>
<artifactId>${artifactId}</artifactId> <artifactId>\${artifactId}</artifactId>
<version>${version}</version> <version>\${version}</version>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>
@ -18,7 +18,7 @@
<dependency> <dependency>
<groupId>org.teavm</groupId> <groupId>org.teavm</groupId>
<artifactId>teavm-classlib</artifactId> <artifactId>teavm-classlib</artifactId>
<version>${teavm.version}</version> <version>\${teavm.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
@ -26,7 +26,7 @@
<dependency> <dependency>
<groupId>org.teavm</groupId> <groupId>org.teavm</groupId>
<artifactId>teavm-jso-apis</artifactId> <artifactId>teavm-jso-apis</artifactId>
<version>${teavm.version}</version> <version>\${teavm.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
@ -46,8 +46,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version> <version>3.1</version>
<configuration> <configuration>
<source>${java.version}</source> <source>\${java.version}</source>
<target>${java.version}</target> <target>\${java.version}</target>
</configuration> </configuration>
</plugin> </plugin>
@ -58,7 +58,7 @@
<configuration> <configuration>
<webResources> <webResources>
<resource> <resource>
<directory>${project.build.directory}/generated/js</directory> <directory>\${project.build.directory}/generated/js</directory>
</resource> </resource>
</webResources> </webResources>
</configuration> </configuration>
@ -68,7 +68,7 @@
<plugin> <plugin>
<groupId>org.teavm</groupId> <groupId>org.teavm</groupId>
<artifactId>teavm-maven-plugin</artifactId> <artifactId>teavm-maven-plugin</artifactId>
<version>${teavm.version}</version> <version>\${teavm.version}</version>
<executions> <executions>
<execution> <execution>
<id>web-client</id> <id>web-client</id>
@ -78,10 +78,10 @@
<configuration> <configuration>
<!-- Directory where TeaVM should put generated files. This configuration conforms to the settings <!-- Directory where TeaVM should put generated files. This configuration conforms to the settings
of the WAR plugin --> of the WAR plugin -->
<targetDirectory>${project.build.directory}/generated/js/teavm</targetDirectory> <targetDirectory>\${project.build.directory}/generated/js/teavm</targetDirectory>
<!-- Main class, containing static void main(String[]) --> <!-- Main class, containing static void main(String[]) -->
<mainClass>${package}.Client</mainClass> <mainClass>\${package}.Client</mainClass>
<!-- Whether TeaVM should produce minified JavaScript. Can reduce JavaScript file size more than <!-- Whether TeaVM should produce minified JavaScript. Can reduce JavaScript file size more than
two times --> two times -->
@ -96,6 +96,9 @@
<!-- Whether TeaVM should also put source files into output directory, <!-- Whether TeaVM should also put source files into output directory,
for compatibility with source maps --> for compatibility with source maps -->
<sourceFilesCopied>true</sourceFilesCopied> <sourceFilesCopied>true</sourceFilesCopied>
<!-- Optimization level. Valid values are: SIMPLE, ADVANCED, FULL -->
<optimizationLevel>ADVANCED</optimizationLevel>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>