Hi,

"expression" has always caused a lot of confusion for plugin-users.
Should this be a moment to rename it to something like "argument"?

-Robert

Op Sat, 28 Apr 2012 23:23:11 +0200 schreef <[email protected]>:

Author: olamy
Date: Sat Apr 28 21:23:10 2012
New Revision: 1331837

URL: http://svn.apache.org/viewvc?rev=1331837&view=rev
Log:
[MPLUGIN-189] add java 5 annotations support to mark Mojo sources

Added:
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml (with props)
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java (with props) maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java (with props) maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java (with props) maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java (with props) maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java (with props) maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java (with props)
Modified:
    maven/plugin-tools/branches/MPLUGIN-189/pom.xml

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml?rev=1331837&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml (added) +++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml Sat Apr 28 21:23:10 2012
@@ -0,0 +1,14 @@
+<?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.apache.maven.plugin-tools</groupId>
+    <artifactId>maven-plugin-tools</artifactId>
+    <version>3.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-plugin-tools-annotations</artifactId>
+
+  <name>Maven Plugin Tools Annotations</name>
+
+</project>

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java?rev=1331837&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java (added) +++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java Sat Apr 28 21:23:10 2012
@@ -0,0 +1,40 @@
+package org.apache.maven.tools.plugin.annotations;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Olivier Lamy
+ */
+@Documented
+@Retention( RetentionPolicy.RUNTIME )
+@Target( { ElementType.FIELD, ElementType.METHOD } )
+@Inherited
+public @interface Component
+{
+    String role() default "";
+
+    String roleHint() default "";
+}

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java?rev=1331837&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java (added) +++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java Sat Apr 28 21:23:10 2012
@@ -0,0 +1,31 @@
+package org.apache.maven.tools.plugin.annotations;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ * @author Olivier Lamy
+ */
+public @interface Execute
+{
+    LifecyclePhase phase() default LifecyclePhase.NONE;
+
+    String goal() default "";
+
+    String lifecycle() default "";
+}

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java?rev=1331837&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java (added) +++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java Sat Apr 28 21:23:10 2012
@@ -0,0 +1,63 @@
+package org.apache.maven.tools.plugin.annotations;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Olivier Lamy
+ */
+@Documented
+@Retention( RetentionPolicy.RUNTIME )
+@Target( ElementType.TYPE )
+@Inherited
+public @interface Goal
+{
+    String name();
+
+    LifecyclePhase defaultPhase() default LifecyclePhase.NONE;
+
+    String requiresDependencyResolution() default "runtime";
+
+    String requiresDependencyCollection() default "runtime";
+
+    String instantiationStrategy() default "per-lookup";
+
+    String executionStrategy() default "once-per-session";
+
+    boolean requiresProject() default true;
+
+    boolean requiresReports() default false;
+
+    boolean aggregator() default false;
+
+    boolean requiresDirectInvocation() default false;
+
+    boolean requiresOnline() default false;
+
+    boolean inheritByDefault() default true;
+
+    String configurator() default "";
+}

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java?rev=1331837&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java (added) +++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java Sat Apr 28 21:23:10 2012
@@ -0,0 +1,74 @@
+package org.apache.maven.tools.plugin.annotations;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ * @author Olivier Lamy
+ */
+public enum LifecyclePhase
+{
+
+    VALIDATE( "validate" ),
+    INITIALIZE( "initialize" ),
+    GENERATE_SOURCES( "generate-sources" ),
+    PROCESS_SOURCES( "process-sources" ),
+    GENERATE_RESOURCES( "generate-resources" ),
+    PROCESS_RESOURCES( "process-resources" ),
+    COMPILE( "compile" ),
+    PROCESS_CLASSES( "process-classes" ),
+    GENERATE_TEST_SOURCES( "generate-test-sources" ),
+    PROCESS_TEST_SOURCES( "process-test-sources" ),
+    GENERATE_TEST_RESOURCES( "generate-test-resources" ),
+    PROCESS_TEST_RESOURCES( "process-test-resources" ),
+    TEST_COMPILE( "test-compile" ),
+    PROCESS_TEST_CLASSES( "process-test-classes" ),
+    TEST( "test" ),
+    PREPARE_PACKAGE( "prepare-package" ),
+    PACKAGE( "package" ),
+    PRE_INTEGRATION_TEST( "pre-integration-test" ),
+    INTEGRATION_TEST( "integration-test" ),
+    POST_INTEGRATION_TEST( "post-integration-test" ),
+    VERIFY( "verify" ),
+    INSTALL( "install" ),
+    DEPLOY( "deploy" ),
+
+    PRE_CLEAN( "pre-clean" ),
+    CLEAN( "clean" ),
+    POST_CLEAN( "post-clean" ),
+
+    PRE_SITE( "pre-site" ),
+    SITE( "site" ),
+    POST_SITE( "post-site" ),
+    SITE_DEPLOY( "site-deploy" ),
+
+    NONE( "" );
+
+    private final String id;
+
+    LifecyclePhase( String id )
+    {
+        this.id = id;
+    }
+
+    public String id()
+    {
+        return this.id;
+    }
+
+}

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java?rev=1331837&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java (added) +++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java Sat Apr 28 21:23:10 2012
@@ -0,0 +1,35 @@
+package org.apache.maven.tools.plugin.annotations;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ * @author Olivier Lamy
+ */
+public @interface Parameter
+{
+    String alias() default "";
+
+    String expression() default "";
+
+    String defaultValue() default "";
+
+    boolean required() default false;
+
+    boolean readonly() default false;
+}

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java?rev=1331837&view=auto
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java (added) +++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java Sat Apr 28 21:23:10 2012
@@ -0,0 +1,18 @@
+package org.apache.maven.tools.plugin.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Documented
+@Inherited
+@Retention( RUNTIME )
+@Target( { TYPE } )
+public @interface ThreadSafe
+{
+    boolean value() default true;
+}

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugin-tools/branches/MPLUGIN-189/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/pom.xml?rev=1331837&r1=1331836&r2=1331837&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/pom.xml (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/pom.xml Sat Apr 28 21:23:10 2012
@@ -1,5 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements.  See the NOTICE file
@@ -18,7 +17,6 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-
<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>
@@ -132,6 +130,7 @@
     <module>maven-plugin-plugin</module>
     <module>maven-plugin-tools-model</module>
     <module>maven-plugin-tools-javadoc</module>
+    <module>maven-plugin-tools-annotations</module>
   </modules>
  <scm>
@@ -178,6 +177,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.maven.plugin-tools</groupId>
+        <artifactId>maven-plugin-tools-annotations</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.plugin-tools</groupId>
         <artifactId>maven-plugin-tools-beanshell</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -309,4 +313,4 @@
       </reporting>
     </profile>
   </profiles>
-</project>
+</project>
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to