Repository: incubator-rya
Updated Branches:
  refs/heads/master 544ffddf4 -> cb947a9f2


Closes #284, #282.  Reverting the RPM build to use the RPM command again. The 
RPM build is now activated using a profile.


Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/cb947a9f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/cb947a9f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/cb947a9f

Branch: refs/heads/master
Commit: cb947a9f27994cfacc8fe7163f8e67862d0a1af8
Parents: 544ffdd
Author: Kevin Chilton <[email protected]>
Authored: Thu Mar 15 17:29:49 2018 -0400
Committer: Valiyil <[email protected]>
Committed: Fri Apr 6 11:55:24 2018 -0400

----------------------------------------------------------------------
 extras/rya.streams/query-manager/pom.xml | 168 ++++++++++----------------
 pom.xml                                  |   9 ++
 2 files changed, 76 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/cb947a9f/extras/rya.streams/query-manager/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.streams/query-manager/pom.xml 
b/extras/rya.streams/query-manager/pom.xml
index fc1a358..a946de2 100644
--- a/extras/rya.streams/query-manager/pom.xml
+++ b/extras/rya.streams/query-manager/pom.xml
@@ -163,6 +163,7 @@ under the License.
                         </goals>
                         <phase>package</phase>
                         <configuration>
+                            
<skipAssembly>${skip.rpm.distribution}</skipAssembly>
                             <!-- This is only staging, so don't attach the 
built folder to the project. -->
                             <attach>false</attach>
                             <descriptors>
@@ -174,120 +175,85 @@ under the License.
             </plugin>
 
             <plugin>
-                <groupId>de.dentrassi.maven</groupId>
-                <artifactId>rpm</artifactId>
-                <version>0.10.0</version>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>rpm-maven-plugin</artifactId>
+                
+                <configuration>
+                    <disabled>${skip.rpm.distribution}</disabled>
+                </configuration>
+                
                 <executions>
                     <execution>
-                        <id>create-rpm-properties</id>
-                        <phase>package</phase>
+                        <id>set-rpm-properties</id>
+                        <goals>
+                            <goal>version</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>create-rpm-distribution</id>
                         <goals>
-                            <goal>rpm</goal>
+                            <goal>attached-rpm</goal>
                         </goals>
+                        <phase>package</phase>
                         <configuration>
-                            <attach>false</attach> <!-- don't attach RPM -->
-                            
<group>${project.groupId}/${project.artifactId}</group> <!-- set RPM group -->
-                            <architecture>noarch</architecture>
-
-                            <signature>
-                                <skip>true</skip>
-                            </signature>
-
+                            <group>${project.groupId}</group>
+                            <name>${project.artifactId}</name>
+                            <classifier>noarch</classifier>
+                            <defaultUsername>root</defaultUsername>
+                            <defaultGroupname>root</defaultGroupname>
+                            <defaultDirmode>755</defaultDirmode>
+                            <defaultFilemode>644</defaultFilemode>
+                            
                             <!-- (Un)Install scripts that enable/disable the 
daemon.-->
-                            <afterInstallation>
-                                
<file>${rpm.staging.path}/bin/rpm/postinstall.sh</file>
-                            </afterInstallation>
-                            <beforeRemoval>
-                                
<file>${rpm.staging.path}/bin/rpm/preremove.sh</file>
-                            </beforeRemoval>
-
-                             <!-- This project requires the Apache Commons 
Daemon applications. -->
+                            <postinstallScriptlet>
+                                
<scriptFile>${rpm.staging.path}/bin/rpm/postinstall.sh</scriptFile>
+                                <fileEncoding>utf-8</fileEncoding>
+                            </postinstallScriptlet>
+                            <preremoveScriptlet>
+                                
<scriptFile>${rpm.staging.path}/bin/rpm/preremove.sh</scriptFile>
+                                <fileEncoding>utf-8</fileEncoding>
+                            </preremoveScriptlet>
+                            
+                            <!-- This project requires the Apache Commons 
Daemon applications. -->
                             <requires>
                                 <require>jsvc</require>
                             </requires>
-
-                            <rulesets>
-                                <ruleset>
-                                    <id>default-ruleset</id>
-                                    <rules>
-                                        <rule>
-                                            <when>
-                                                <type>directory</type>
-                                            </when>
-                                            <mode>0755</mode>
-                                        </rule>
-                                        <rule>
-                                            <when>
-                                                <type>file</type>
-                                            </when>
-                                            <mode>0644</mode>
-                                        </rule>
-                                        <file>
-                                            <when>
-                                                
<suffix>configuration.xml</suffix>
-                                            </when>
-                                            <configuration>true</configuration>
-                                        </file>
-                                        <file>
-                                            <when>
-                                                <suffix>log4j.xml</suffix>
-                                            </when>
-                                            <configuration>true</configuration>
-                                        </file>
-                                        <file>
-                                            <when>
-                                                <suffix>README.txt</suffix>
-                                            </when>
-                                            <readme>true</readme>
-                                        </file>
-                                    </rules>
-                                </ruleset>
-                            </rulesets>
-                            <entries>
+                            
+                            <mappings>
                                 <!-- Copy everything over to the /opt 
directory, except for the scripts. -->
-                                <entry>
-                                    
<name>/opt/rya-streams-query-manager-${project.version}/bin/systemd</name>
-                                    <collect>
-                                        
<from>${rpm.staging.path}/bin/systemd</from>
-                                        <directories>true</directories>
-                                    </collect>
-                                    <ruleset>default-ruleset</ruleset>
-                                </entry>
-                                <entry>
-                                    
<name>/opt/rya-streams-query-manager-${project.version}/config</name>
-                                    <collect>
-                                        <from>${rpm.staging.path}/config</from>
-                                        <directories>true</directories>
-                                    </collect>
-                                    <ruleset>default-ruleset</ruleset>
-                                </entry>
-                                <entry>
-                                    
<name>/opt/rya-streams-query-manager-${project.version}/lib</name>
-                                    <collect>
-                                        <from>${rpm.staging.path}/lib</from>
-                                        <directories>true</directories>
-                                    </collect>
-                                    <ruleset>default-ruleset</ruleset>
-                                </entry>
-                                <entry>
-                                    
<name>/opt/rya-streams-query-manager-${project.version}/README.txt</name>
-                                    <collect>
-                                        
<from>${rpm.staging.path}/README.txt</from>
-                                    </collect>
-                                    <ruleset>default-ruleset</ruleset>
-                                </entry>
-                                <entry>
-                                    
<name>/opt/rya-streams-query-manager-${project.version}/bin/rya-streams-query-manager.sh</name>
-                                    <collect>
-                                        
<from>${rpm.staging.path}/bin/rya-streams-query-manager.sh</from>
-                                    </collect>
-                                    <mode>0544</mode>
-                                </entry>
-                            </entries>
+                                <mapping>
+                                    
<directory>/opt/rya-streams-query-manager-${rpm.version}</directory>
+                                    <sources>
+                                        <!-- Copy over everything exception 
for the executable script. -->
+                                        <source>
+                                            
<location>${rpm.staging.path}</location>
+                                            <excludes>
+                                                <exclude>bin/rpm/**</exclude>
+                                                
<exclude>bin/rya-streams-query-manager.sh</exclude>
+                                            </excludes>
+                                        </source>
+                                    </sources>
+                                </mapping>
+
+                                <!-- Copy over the scripts with the correct 
execution permissions. -->
+                                <mapping>
+                                    
<directory>/opt/rya-streams-query-manager-${rpm.version}/bin</directory>
+                                    
<directoryIncluded>false</directoryIncluded>
+                                    <filemode>554</filemode>
+                                    <sources>
+                                        <source>
+                                            
<location>${rpm.staging.path}/bin</location>
+                                            <includes>
+                                                
<include>rya-streams-query-manager.sh</include>
+                                            </includes>
+                                        </source>
+                                    </sources>
+                                </mapping>
+                            </mappings>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
      </build>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/cb947a9f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 532324a..3ae3aed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -140,6 +140,7 @@ under the License.
         
         <!-- set profile property defaults -->
         <skip.rya.it>true</skip.rya.it>  <!-- modified by  -P enable-it  -->
+        <skip.rpm.distribution>true</skip.rpm.distribution> <!-- modify by -P 
build-rpms -->
     </properties>
     
     <!-- Enable this profile if you want to include Geo functions within Rya. 
"mvn ... -P geoindexing" -->
@@ -231,6 +232,14 @@ under the License.
                 <skip.rya.it>false</skip.rya.it>
             </properties>
         </profile>
+        
+        <!-- enable this profile "mvn ... -P build-rpms" -->
+        <profile>
+            <id>build-rpms</id>
+            <properties>
+                <skip.rpm.distribution>false</skip.rpm.distribution>
+            </properties>
+        </profile>
 
         <!-- Enable this profile to generate a Code Coverage report with 
jacoco "mvn ... -P coverage" -->
         <profile>

Reply via email to