Closes #284, #282. Reverting the RPM build to use the RPM command again. The RPM build is now activated using a profile.
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 @@
</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 @@
</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>rpm</goal>
+ <goal>version</goal>
</goals>
+ </execution>
+ <execution>
+ <id>create-rpm-distribution</id>
+ <goals>
+ <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
diff --git a/pom.xml b/pom.xml
index 532324a..3ae3aed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -140,6 +140,7 @@
<!-- 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 @@
<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>