]> source.dussan.org Git - pf4j.git/commitdiff
it seems to me that properties-maven-plugin doesn't work with maven 3
authorDecebal Suiu <decebal.suiu@gmail.com>
Mon, 5 Nov 2012 11:58:18 +0000 (13:58 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Mon, 5 Nov 2012 11:58:18 +0000 (13:58 +0200)
demo/plugin1/pom.xml
demo/plugin2/pom.xml
demo/pom.xml
pom.xml

index 074aecaf133483636fd0370159fdd0cbf5c244cd..c36948eaa0e85b6e63244d7e78f8c4e9b6a83fae 100644 (file)
         </license>
     </licenses>
 
+
+    <properties>
+        <plugin.id>welcome-plugin</plugin.id>
+        <plugin.class>ro.fortsoft.pf4j.demo.welcome.WelcomePlugin</plugin.class>
+        <plugin.version>0.0.1</plugin.version>
+        <plugin.provider>Decebal Suiu</plugin.provider>
+        <plugin.dependencies></plugin.dependencies>
+    </properties>   
+
     <build>
         <plugins>
+            <!-- DOESN'T WORK WITH MAVEN 3 (I defined the plugin metadata in properties section)
             <plugin>
-                       <groupId>org.codehaus.mojo</groupId>
-                       <artifactId>properties-maven-plugin</artifactId>
-                       <version>1.0-alpha-2</version>
-                       <executions>
-                         <execution>
-                           <phase>initialize</phase>
-                           <goals>
-                             <goal>read-project-properties</goal>
-                           </goals>
-                           <configuration>
-                             <files>
-                               <file>plugin.properties</file>
-                             </files>
-                           </configuration>
-                         </execution>
-                       </executions>
-                   </plugin>
-                   
-                   <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-antrun-plugin</artifactId>
-                               <version>1.6</version>
-                               <executions>
-                                       <execution>
-                                               <id>unzip jar file</id>
-                                               <phase>package</phase>
-                                               <configuration>
-                                                       <target>
-                                                               <unzip src="target/${artifactId}-${version}.${packaging}" dest="target/plugin-classes" />
-                                                       </target>
-                                               </configuration>
-                                               <goals>
-                                                       <goal>run</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+                <version>1.0-alpha-2</version>
+                <executions>
+                  <execution>
+                    <phase>initialize</phase>
+                    <goals>
+                      <goal>read-project-properties</goal>
+                    </goals>
+                    <configuration>
+                      <files>
+                        <file>plugin.properties</file>
+                      </files>
+                    </configuration>
+                  </execution>
+                </executions>
+            </plugin>
+            -->
+            
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.6</version>
+                <executions>
+                    <execution>
+                        <id>unzip jar file</id>
+                        <phase>package</phase>
+                        <configuration>
+                            <target>
+                                <unzip src="target/${artifactId}-${version}.${packaging}" dest="target/plugin-classes" />
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            
             <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <version>2.3</version>
                 </executions>
             </plugin>
 
-                       <plugin>
-                           <groupId>org.apache.maven.plugins</groupId>
-                           <artifactId>maven-jar-plugin</artifactId>
-                           <configuration>
-                               <archive>
-                                   <manifestEntries>
-                                       <Plugin-Id>${plugin.id}</Plugin-Id>
-                                       <Plugin-Class>${plugin.class}</Plugin-Class>
-                                       <Plugin-Version>${plugin.version}</Plugin-Version>
-                                       <Plugin-Provider>${plugin.provider}</Plugin-Provider>
-                                       <Plugin-Dependencies>${plugin.dependencies}</Plugin-Dependencies>
-                                   </manifestEntries>
-                               </archive>
-                           </configuration>
-                       </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <archive>
+                        <manifestEntries>
+                            <Plugin-Id>${plugin.id}</Plugin-Id>
+                            <Plugin-Class>${plugin.class}</Plugin-Class>
+                            <Plugin-Version>${plugin.version}</Plugin-Version>
+                            <Plugin-Provider>${plugin.provider}</Plugin-Provider>
+                            <Plugin-Dependencies>${plugin.dependencies}</Plugin-Dependencies>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
 
             <plugin>
                 <artifactId>maven-deploy-plugin</artifactId>
index 1b393a6c002a6751f6795c0483cde69d71e68fa1..3b65ea6ec3711d55d27d330989f5df0449a27e47 100644 (file)
             <distribution>repo</distribution>
         </license>
     </licenses>
+    
+    <properties>
+        <plugin.id>hello-plugin</plugin.id>
+        <plugin.class>ro.fortsoft.pf4j.demo.hello.HelloPlugin</plugin.class>
+        <plugin.version>0.0.1</plugin.version>
+        <plugin.provider>Decebal Suiu</plugin.provider>
+        <plugin.dependencies></plugin.dependencies>
+    </properties>   
 
     <build>
         <plugins>
+            <!-- DOESN'T WORK WITH MAVEN 3 (I defined the plugin metadata in properties section)
             <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>properties-maven-plugin</artifactId>
-                               <version>1.0-alpha-2</version>
-                               <executions>
-                                       <execution>
-                                               <phase>initialize</phase>
-                                               <goals>
-                                                       <goal>read-project-properties</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <files>
-                                                               <file>plugin.properties</file>
-                                                       </files>
-                                               </configuration>
-                                       </execution>
-                               </executions>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+                <version>1.0-alpha-2</version>
+                <executions>
+                    <execution>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>read-project-properties</goal>
+                        </goals>
+                        <configuration>
+                            <files>
+                                <file>plugin.properties</file>
+                            </files>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
+            -->
         
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <version>2.3</version>
                 <configuration>
-                    <appendAssemblyId>false</appendAssemblyId>
                     <descriptors>
                         <descriptor>
                             src/main/assembly/assembly.xml
                         </descriptor>
                     </descriptors>
-                    <archive>
-                        <manifestEntries>
-                            <Plugin-Id>${plugin.id}</Plugin-Id>
-                            <Plugin-Class>${plugin.class}</Plugin-Class>
-                            <Plugin-Version>${plugin.version}</Plugin-Version>
-                            <Plugin-Provider>${plugin.provider}</Plugin-Provider>
-                            <Plugin-Dependencies>${plugin.dependencies}</Plugin-Dependencies>
-                        </manifestEntries>
-                    </archive>                    
+                    <appendAssemblyId>false</appendAssemblyId>
                 </configuration>
                 <executions>
                     <execution>
                         <id>make-assembly</id>
                         <phase>package</phase>
                         <goals>
-                            <goal>single</goal>
+                            <goal>attached</goal>
                         </goals>
                     </execution>
                 </executions>
@@ -96,6 +97,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
                 <configuration>
                     <archive>
                         <manifestEntries>
index 6171fad9985dc5369ba24602d4c0e48dec60516a..fa8bb3a3eb288d4dae9200423487509ac828c057 100644 (file)
                 <directory>src/main/resources</directory>
             </resource>
         </resources>
-
-        <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>
-                    <optimize>true</optimize>
-                </configuration>
-            </plugin>
-        </plugins>
     </build>
 
     <modules>
diff --git a/pom.xml b/pom.xml
index dec1ef3a2c20ca498249007bcefc566599be23cd..1656b31891712c5e8802aad94951bce0bc015e76 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -2,10 +2,10 @@
 <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">
     
     <parent>
-               <groupId>org.sonatype.oss</groupId>
-               <artifactId>oss-parent</artifactId>
-               <version>7</version>
-       </parent>
+        <groupId>org.sonatype.oss</groupId>
+        <artifactId>oss-parent</artifactId>
+        <version>7</version>
+    </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>ro.fortsoft.pf4j</groupId>
             </plugin>
             
             <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>jar</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.8</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
 
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-source-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>jar</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>2.2</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
             
             <plugin>
                 <artifactId>maven-jar-plugin</artifactId>
-                <version>2.3.1</version>
-            </plugin>           
+                <version>2.4</version>
+            </plugin>
         </plugins>
     </build>
 
     <modules>
-               <module>pf4j</module>
-               <module>demo</module>
-       </modules>
+        <module>pf4j</module>
+        <module>demo</module>
+    </modules>
 
     <profiles>
         <profile>