diff --git a/libraries/tools/kotlin-maven-serialization/pom.xml b/libraries/tools/kotlin-maven-serialization/pom.xml new file mode 100755 index 00000000000..67698f7b892 --- /dev/null +++ b/libraries/tools/kotlin-maven-serialization/pom.xml @@ -0,0 +1,137 @@ + + + + 4.0.0 + + 3.0.5 + ${basedir}/../../../plugins/kotlin-serialization/kotlin-serialization-compiler/src/ + ${basedir}/src/main/kotlin + ${basedir}/src/main/resources + ${basedir}/target/src/main/kotlin + ${basedir}/target/resource + 1.1-SNAPSHOT + + + org.jetbrains.kotlinx + kotlin-maven-serialization + jar + 0.1 + + Serialization plugin for Maven + + + + jetbrains-utils + http://repository.jetbrains.com/utils + + + + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + provided + + + + + ${serialization.target-src} + + + ${serialization.target-resources} + + + + + + maven-resources-plugin + 3.0.0 + + + copy-sources + validate + + copy-resources + + + ${serialization.target-src} + + ${serialization.src} + ${serialization.maven.plugin.src} + + + + + copy-resources + validate + + copy-resources + + + ${serialization.target-resources}/META-INF + + ${serialization.src}/META-INF + ${serialization.maven.plugin.resources}/META-INF + + + + + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlin.version} + + + + compile + compile + compile + + + ${serialization.target-src} + + + + + + + org.codehaus.plexus + plexus-component-metadata + 1.7.1 + + + process-classes + + generate-metadata + + + + process-test-classes + + generate-test-metadata + + + + + + + + + + + bintray-repo + https://api.bintray.com/maven/kotlin/kotlinx/kotlinx.serialization.plugin/ + + + + + diff --git a/libraries/tools/kotlin-maven-serialization/src/main/kotlin/SerializationMavenPlugin.kt b/libraries/tools/kotlin-maven-serialization/src/main/kotlin/SerializationMavenPlugin.kt new file mode 100644 index 00000000000..49fa3ab4daa --- /dev/null +++ b/libraries/tools/kotlin-maven-serialization/src/main/kotlin/SerializationMavenPlugin.kt @@ -0,0 +1,40 @@ +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.test + +import org.apache.maven.plugin.* +import org.apache.maven.project.* +import org.codehaus.plexus.component.annotations.* +import org.codehaus.plexus.logging.* +import org.jetbrains.kotlin.maven.* + +val SERIALIZATION_COMPILER_PLUGIN_ID = "org.jetbrains.kotlinx.serialization" + +@Component(role = KotlinMavenPluginExtension::class, hint = "kotlin-serialization") +class KotlinSerializationMavenPlugin : KotlinMavenPluginExtension { + @Requirement + lateinit var logger: Logger + + override fun getCompilerPluginId() = SERIALIZATION_COMPILER_PLUGIN_ID + + override fun isApplicable(project: MavenProject, execution: MojoExecution) = true + + override fun getPluginOptions(project: MavenProject, execution: MojoExecution): List { + logger.debug("Loaded Maven plugin " + javaClass.name) + return emptyList() + } +} \ No newline at end of file