Maven plugin: support additional arguments, drop inline/optimize

This commit is contained in:
Alexander Udalov
2014-08-01 20:45:06 -05:00
parent fbc8361211
commit 6da95e2cea
10 changed files with 17 additions and 166 deletions
@@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>test-inlineDisabled</artifactId>
<artifactId>test-extraArguments</artifactId>
<dependencies>
<dependency>
@@ -69,7 +69,12 @@
</execution>
</executions>
<configuration>
<inline>false</inline>
<args>
<arg>-Xno-inline</arg>
<arg>-Xno-optimize</arg>
<arg>-Xno-call-assertions</arg>
<arg>-Xno-param-assertions</arg>
</args>
</configuration>
</plugin>
</plugins>
@@ -1,6 +1,6 @@
import java.io.*;
File file = new File(basedir, "target/test-inlineDisabled-0.1-SNAPSHOT.jar");
File file = new File(basedir, "target/test-extraArguments-0.1-SNAPSHOT.jar");
if (!file.exists() || !file.isFile()) {
throw new FileNotFoundException("Could not find generated JAR: " + file);
}
@@ -1,9 +0,0 @@
package org.jetbrains
fun main(args : Array<String>) {
System.out?.println(getGreeting())
}
fun getGreeting() : String {
return "Hello, World!"
}
@@ -1,78 +0,0 @@
<?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>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-project</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>test-optimizationDisabled</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-runtime</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
</plugin>
</plugins>
</pluginManagement>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${project.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>process-test-sources</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<optimize>false</optimize>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -1,13 +0,0 @@
package org.jetbrains;
import org.junit.Test;
import static junit.framework.Assert.assertEquals;
public class HelloWorldJavaTest {
@Test
public void greeting() {
assertEquals("Hello, World!", org.jetbrains.JetbrainsPackage.getGreeting());
}
}
@@ -1,6 +0,0 @@
import java.io.*;
File file = new File(basedir, "target/test-optimizationDisabled-0.1-SNAPSHOT.jar");
if (!file.exists() || !file.isFile()) {
throw new FileNotFoundException("Could not find generated JAR: " + file);
}