added very early spike of a pure kotlin based maven plugin (though we need value annotations before it can work :)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
## NOTE - this is just an initial spike so far as Kotlin doesn't support value annotations yet
|
||||
|
||||
Until this plugin is working, please use this maven plugin:
|
||||
http://evgeny-goldin.com/wiki/Kotlin-maven-plugin
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.jfrog.maven.annomojo:maven-plugin-anno:1.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.maven:maven-plugin-api:3.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.maven:maven-model:3.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-utils:2.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.maven:maven-artifact:3.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.sonatype.sisu:sisu-inject-plexus:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-component-annotations:1.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-classworlds:2.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.sonatype.sisu:sisu-inject-bean:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.sonatype.sisu:sisu-guice:no_aop:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.sonatype.sisu:sisu-guava:0.9.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-compiler:0.2.3.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.9" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<properties>
|
||||
<maven-plugin-anno.version>1.4.1</maven-plugin-anno.version>
|
||||
<maven.version>3.0.4</maven.version>
|
||||
</properties>
|
||||
|
||||
<parent>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jfrog.maven.annomojo</groupId>
|
||||
<artifactId>maven-plugin-anno</artifactId>
|
||||
<version>${maven-plugin-anno.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.goldin.plugins</groupId>
|
||||
<artifactId>ivy-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.goldin.plugins</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jfrog.maven.annomojo</groupId>
|
||||
<artifactId>maven-plugin-tools-anno</artifactId>
|
||||
<version>${maven-plugin-anno.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>download</id>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>jfrog-plugins</id>
|
||||
<name>jfrog-plugins-dist</name>
|
||||
<url>http://repo.jfrog.org/artifactory/plugins-releases</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package org.jetbrains.kotlin.maven
|
||||
|
||||
import org.jfrog.maven.annomojo.annotations.*
|
||||
import org.apache.maven.plugin.AbstractMojo
|
||||
|
||||
/**
|
||||
* Kotlin compiler mojo
|
||||
*/
|
||||
[MojoGoal("compile")]
|
||||
[MojoPhase( "compile" )]
|
||||
[MojoRequiresDependencyResolution( "compile" )]
|
||||
class KotlinCompileMojo() : KotlinMojoSupport() {
|
||||
|
||||
override fun execute() {
|
||||
println("===== Kotlin maven compiler!!! src = $src")
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.jetbrains.kotlin.maven
|
||||
|
||||
import org.jfrog.maven.annomojo.annotations.*
|
||||
|
||||
/**
|
||||
* Base class for Kotlin compiler plugins
|
||||
*/
|
||||
import org.apache.maven.plugin.AbstractMojo
|
||||
import java.lang.String
|
||||
|
||||
abstract class KotlinMojoSupport : AbstractMojo() {
|
||||
|
||||
[MojoParameter(required = false)]
|
||||
public var src: String? = null
|
||||
}
|
||||
Reference in New Issue
Block a user