Other class-level annotations may be considered as identifying
+ * a component as well, typically a special kind of component:
+ * e.g. the {@link Repository @Repository} annotation or AspectJ's
+ * {@link org.aspectj.lang.annotation.Aspect @Aspect} annotation.
+ *
+ * @ author Mark Fisher
+ * @since 2.5
+ * @see Repository
+ * @see Service
+ * @see Controller
+ * @see org.springframework.context.annotation.ClassPathBeanDefinitionScanner
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Indexed
+public @interface Component {
+
+ /**
+ * The value may indicate a suggestion for a logical component name,
+ * to be turned into a Spring bean in case of an autodetected component.
+ * @return the suggested component name, if any
+ */
+ String value() default "";
+
+}
\ No newline at end of file
diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/main/kotlin/Component.kt b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/main/kotlin/Component.kt
new file mode 100644
index 00000000000..25867c33932
--- /dev/null
+++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/main/kotlin/Component.kt
@@ -0,0 +1,5 @@
+package org.springframework.stereotype
+
+@Target(AnnotationTarget.CLASS)
+@Retention(AnnotationRetention.RUNTIME)
+annotation class Component
\ No newline at end of file
diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/main/kotlin/test.kt b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/main/kotlin/test.kt
new file mode 100644
index 00000000000..dd6205ea1e3
--- /dev/null
+++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/main/kotlin/test.kt
@@ -0,0 +1,22 @@
+/*
+ * 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 test
+
+@org.springframework.stereotype.Component
+class OpenClass
+
+class ClosedClass
\ No newline at end of file
diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/test/java/test/AllOpenSimpleTest.java b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/test/java/test/AllOpenSimpleTest.java
new file mode 100644
index 00000000000..8485235d301
--- /dev/null
+++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/test/java/test/AllOpenSimpleTest.java
@@ -0,0 +1,31 @@
+/*
+ * 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 test;
+
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import java.lang.reflect.Modifier;
+
+public class AllOpenSimpleTest {
+
+ @Test
+ public void greeting() {
+ assertEquals(false, Modifier.isFinal(OpenClass.class.getModifiers()));
+ assertEquals(true, Modifier.isFinal(ClosedClass.class.getModifiers()));
+ }
+}
diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/verify.bsh b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/verify.bsh
new file mode 100644
index 00000000000..33f18f14908
--- /dev/null
+++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/verify.bsh
@@ -0,0 +1,6 @@
+import java.io.*;
+
+File file = new File(basedir, "target/test-allopen-spring-1.0-SNAPSHOT.jar");
+if (!file.exists() || !file.isFile()) {
+ throw new FileNotFoundException("Could not find generated JAR: " + file);
+}
diff --git a/libraries/tools/kotlin-maven-plugin/src/it/plugins/expected.log b/libraries/tools/kotlin-maven-plugin/src/it/plugins/expected.log
index b04da699ab2..9f24154b2ca 100644
--- a/libraries/tools/kotlin-maven-plugin/src/it/plugins/expected.log
+++ b/libraries/tools/kotlin-maven-plugin/src/it/plugins/expected.log
@@ -7,8 +7,8 @@
[INFO] Compiling Kotlin sources from [/use-test-extension/src/main/kotlin]
[INFO] Module name is use-test-extension
[INFO] Applicability test for project use-test-extension
-[INFO] Applying plugin test-me
[INFO] Configuring test plugin with arguments
+[INFO] Options for plugin test-me: [plugin:org.jetbrains.kotlin.test.test-plugin:test-option=my-special-value]
[INFO] Plugin applied
[INFO] Option value: my-special-value
[INFO] Kotlin Compiler version @snapshot@
diff --git a/libraries/tools/kotlin-maven-plugin/src/it/plugins/test-extension/src/main/kotlin/org/jetbrains/kotlin/test/MavenPluginComponent.kt b/libraries/tools/kotlin-maven-plugin/src/it/plugins/test-extension/src/main/kotlin/org/jetbrains/kotlin/test/MavenPluginComponent.kt
index fe881b9fd01..522068ffbd1 100644
--- a/libraries/tools/kotlin-maven-plugin/src/it/plugins/test-extension/src/main/kotlin/org/jetbrains/kotlin/test/MavenPluginComponent.kt
+++ b/libraries/tools/kotlin-maven-plugin/src/it/plugins/test-extension/src/main/kotlin/org/jetbrains/kotlin/test/MavenPluginComponent.kt
@@ -17,9 +17,14 @@ class MavenPluginComponent : KotlinMavenPluginExtension {
return true
}
- override fun getPluginArguments(project: MavenProject, execution: MojoExecution): MutableList