commons: improve maven, new RPM structure
[lgpl/argeo-commons.git] / security / dep / org.argeo.security.dep.node / pom.xml
index 9a24af670644f2693eb4e74d66e9702ab722d7c8..0c44338c6c5cf544369eef915d49cf1078e9d579 100644 (file)
                        <artifactId>com.springsource.javax.xml.bind</artifactId>
                </dependency>
 
+               <!-- Commons -->
+               <dependency>
+                       <groupId>org.apache.commons</groupId>
+                       <artifactId>com.springsource.org.apache.commons.vfs</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.dep.osgi</groupId>
+                       <artifactId>org.argeo.dep.osgi.commons.exec</artifactId>
+               </dependency>
+
                <!-- Security (LDAP) -->
                <dependency>
                        <groupId>org.argeo.commons.security</groupId>
                        <version>0.3.4-SNAPSHOT</version>
                </dependency>
        </dependencies>
+       <profiles>
+               <profile>
+                       <id>rpmbuild</id>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-dependency-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>copy-node</id>
+                                                               <phase>package</phase>
+                                                               <goals>
+                                                                       <goal>copy-dependencies</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <includeTypes>jar</includeTypes>
+                                                                       <includeGroupIds>org.argeo.commons.basic,org.argeo.commons.osgi,org.argeo.commons.server,org.argeo.commons.security</includeGroupIds>
+                                                                       <excludeArtifactIds>org.argeo.osgi.boot</excludeArtifactIds>
+                                                                       <outputDirectory>${project.build.directory}/node</outputDirectory>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                                       <plugin>
+                                               <groupId>org.codehaus.mojo</groupId>
+                                               <artifactId>rpm-maven-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>rpm-node</id>
+                                                               <phase>package</phase>
+                                                               <goals>
+                                                                       <goal>rpm</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <name>argeo-node</name>
+                                                                       <copyright>2011 Argeo</copyright>
+                                                                       <mappings>
+                                                                               <mapping>
+                                                                                       <directory>/usr/share/osgi</directory>
+                                                                                       <username>root</username>
+                                                                                       <groupname>root</groupname>
+                                                                                       <filemode>644</filemode>
+                                                                                       <directoryIncluded>false</directoryIncluded>
+                                                                                       <sources>
+                                                                                               <source>
+                                                                                                       <location>${project.build.directory}/node</location>
+                                                                                               </source>
+                                                                                       </sources>
+                                                                               </mapping>
+                                                                       </mappings>
+                                                                       <requires>
+                                                                               <require>argeo-node-tp</require>
+                                                                       </requires>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                                       <plugin>
+                                               <artifactId>maven-antrun-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <phase>install</phase>
+                                                               <goals>
+                                                                       <goal>run</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <target>
+                                                                               <copy todir="${rpm.stagingRepository}" verbose="true">
+                                                                                       <fileset dir="${project.build.directory}/rpm"
+                                                                                               includes="*/RPMS/**/*.rpm" />
+                                                                                       <flattenmapper />
+                                                                               </copy>
+                                                                       </target>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+               <profile>
+                       <id>rpmbuild-tp</id>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-dependency-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>copy-tp</id>
+                                                               <phase>package</phase>
+                                                               <goals>
+                                                                       <goal>copy-dependencies</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <includeTypes>jar</includeTypes>
+                                                                       <excludeGroupIds>org.argeo.commons.basic,org.argeo.commons.osgi,org.argeo.commons.server,org.argeo.commons.security</excludeGroupIds>
+                                                                       <excludeArtifactIds>org.eclipse.osgi</excludeArtifactIds>
+                                                                       <outputDirectory>${project.build.directory}/node-tp</outputDirectory>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                                       <plugin>
+                                               <groupId>org.codehaus.mojo</groupId>
+                                               <artifactId>rpm-maven-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>rpm-node-tp</id>
+                                                               <phase>package</phase>
+                                                               <goals>
+                                                                       <goal>rpm</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <name>argeo-node-tp</name>
+                                                                       <classifier>rpm-tp</classifier>
+                                                                       <projversion>${version.argeo-distribution}</projversion>
+                                                                       <mappings>
+                                                                               <mapping>
+                                                                                       <directory>/usr/share/osgi</directory>
+                                                                                       <username>root</username>
+                                                                                       <groupname>root</groupname>
+                                                                                       <filemode>644</filemode>
+                                                                                       <directoryIncluded>false</directoryIncluded>
+                                                                                       <sources>
+                                                                                               <source>
+                                                                                                       <location>${project.build.directory}/node-tp</location>
+                                                                                               </source>
+                                                                                       </sources>
+                                                                               </mapping>
+                                                                       </mappings>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
 </project>