]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - dist/slc/pom.xml
slc: improve maven, new RPM structure
[gpl/argeo-slc.git] / dist / slc / pom.xml
index 5fbb2caa9775c10c06e5d86936b380d0db6f41ea..afd9dadfa46f89b1ea4edc868f049d59d0700f0c 100644 (file)
@@ -9,26 +9,9 @@
        <groupId>org.argeo.slc.dist</groupId>
        <artifactId>slc</artifactId>
        <packaging>pom</packaging>
-       <name>SLC Node (zip, rpm)</name>
+       <name>SLC Node (RPM)</name>
        <build>
                <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-dependency-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <id>copy-dependencies</id>
-                                               <phase>process-resources</phase>
-                                               <goals>
-                                                       <goal>copy-dependencies</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <includeTypes>jar</includeTypes>
-                                                       <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
                        <plugin>
                                <artifactId>maven-resources-plugin</artifactId>
                                <executions>
                                        <groupId>org.argeo.commons.osgi</groupId>
                                        <artifactId>org.argeo.osgi.boot</artifactId>
                                </exclusion>
+                               <!-- Node -->
+                               <exclusion>
+                                       <groupId>org.argeo.commons.security</groupId>
+                                       <artifactId>org.argeo.security.dep.node.rap</artifactId>
+                               </exclusion>
                        </exclusions>
                </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.server</groupId>
-                       <artifactId>org.argeo.server.tomcat</artifactId>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.dep.ads</artifactId>
-                       <type>pom</type>
-                       <version>${version.argeo-commons}</version>
-               </dependency>
        </dependencies>
        <profiles>
                <profile>
                                        <plugin>
                                                <groupId>org.codehaus.mojo</groupId>
                                                <artifactId>rpm-maven-plugin</artifactId>
-                                               <version>2.1-alpha-1</version>
-                                               <extensions>true</extensions>
-                                               <configuration>
-                                                       <version>${project.version}</version>
-                                                       <release>r${buildNumber}.argeo</release>
-                                                       <copyright>2011 Argeo</copyright>
-                                                       <distribution>argeo</distribution>
-                                                       <packager>mbaudier@argeo.org</packager>
-                                                       <group>Applications/System</group>
-                                                       <prefix>/usr</prefix>
-                                               </configuration>
                                                <executions>
                                                        <execution>
-                                                               <id>rpm-sdk</id>
+                                                               <id>rpm-slc</id>
                                                                <phase>package</phase>
                                                                <goals>
                                                                        <goal>rpm</goal>
                                                                </goals>
                                                                <configuration>
+                                                                       <name>slc</name>
+                                                                       <copyright>2011 Argeo</copyright>
                                                                        <mappings>
                                                                                <mapping>
                                                                                        <directory>/usr/bin</directory>
                                                                                        <sources>
                                                                                                <source>
                                                                                                        <location>src/main/rpm/usr/bin</location>
-                                                                                                       <includes>
-                                                                                                               <include>*</include>
-                                                                                                       </includes>
                                                                                                </source>
                                                                                        </sources>
                                                                                </mapping>
                                                                                        <sources>
                                                                                                <source>
                                                                                                        <location>src/main/rpm/etc/init.d</location>
-                                                                                                       <includes>
-                                                                                                               <include>*</include>
-                                                                                                       </includes>
                                                                                                </source>
                                                                                        </sources>
                                                                                </mapping>
                                                                                <mapping>
-                                                                                       <directory>/etc/${project.artifactId}</directory>
+                                                                                       <directory>/etc/slc</directory>
                                                                                        <username>root</username>
-                                                                                       <groupname>${project.artifactId}</groupname>
+                                                                                       <groupname>slc</groupname>
                                                                                        <filemode>640</filemode>
                                                                                        <configuration>noreplace</configuration>
                                                                                        <directoryIncluded>false</directoryIncluded>
                                                                                        <sources>
                                                                                                <source>
-                                                                                                       <location>src/main/rpm/etc/${project.artifactId}</location>
-                                                                                                       <includes>
-                                                                                                               <include>*</include>
-                                                                                                       </includes>
-                                                                                               </source>
-                                                                                       </sources>
-                                                                               </mapping>
-                                                                               <mapping>
-                                                                                       <directory>/usr/share/${project.artifactId}/lib</directory>
-                                                                                       <username>root</username>
-                                                                                       <groupname>root</groupname>
-                                                                                       <filemode>644</filemode>
-                                                                                       <directoryIncluded>false</directoryIncluded>
-                                                                                       <sources>
-                                                                                               <source>
-                                                                                                       <location>target/lib</location>
-                                                                                                       <includes>
-                                                                                                               <include>*.jar</include>
-                                                                                                       </includes>
+                                                                                                       <location>src/main/rpm/etc/slc</location>
                                                                                                </source>
                                                                                        </sources>
                                                                                </mapping>
                                                                                <scriptFile>src/main/scripts/preremove</scriptFile>
                                                                        </preremoveScriptlet>
                                                                        <requires>
+                                                                               <require>slc-libs</require>
                                                                                <require>osgi-boot</require>
+                                                                               <require>java-1.6.0-openjdk</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>