-
Notifications
You must be signed in to change notification settings - Fork 33
Rpm package primary #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
edc2c73
Add support for extensions and RPM primary packaging
singhald ba243e8
Added test case for primary packaging
singhald 4d19e2a
Update tests
singhald 6099913
update license block
singhald 1f201f7
Added secondary example apt.vm file showing the necessary configurati…
singhald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>de.dentrassi.maven.rpm.test</groupId> | ||
<artifactId>test14-primaryname</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>rpm</packaging> | ||
|
||
<name>Test Package #14</name> | ||
<description> | ||
Test primary name | ||
</description> | ||
|
||
<url>http://dentrassi.de</url> | ||
|
||
<organization> | ||
<name>Jens Reimann</name> | ||
<url>http://dentrassi.de</url> | ||
</organization> | ||
|
||
<licenses> | ||
<license> | ||
<name>Eclipse Public License - v 1.0</name> | ||
<distribution>repo</distribution> | ||
<url>https://www.eclipse.org/legal/epl-v10.html</url> | ||
</license> | ||
</licenses> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<skipSigning>true</skipSigning> | ||
<rpm.skipSigning>true</rpm.skipSigning> | ||
</properties> | ||
|
||
<build> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>de.dentrassi.maven</groupId> | ||
<artifactId>rpm</artifactId> | ||
<extensions>true</extensions> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<configuration> | ||
<group>Application/Misc</group> | ||
|
||
<forceRelease>false</forceRelease> | ||
<version>1.0.0</version> | ||
|
||
<signature> | ||
<keyId>${keyId}</keyId> | ||
<keyringFile>${user.home}/.gnupg/secring.gpg</keyringFile> | ||
<passphrase>${passphrase}</passphrase> | ||
<hashAlgorithm>SHA1</hashAlgorithm> | ||
<skip>${skipSigning}</skip> | ||
</signature> | ||
|
||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>sign</id> | ||
<activation> | ||
<activeByDefault>false</activeByDefault> | ||
</activation> | ||
<properties> | ||
<skipSigning>false</skipSigning> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import java.io.File | ||
|
||
myfile=null | ||
basedir.eachDirRecurse{dir -> | ||
dir.eachFileMatch(~/.*test14-primaryname-1.0.0-0.\d+.noarch.rpm.*/) { file -> | ||
myfile=file | ||
} | ||
} | ||
|
||
myfile != null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<component-set> | ||
<components> | ||
<component> | ||
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> | ||
<role-hint>rpm</role-hint> | ||
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation> | ||
<instantiation-strategy>per-lookup</instantiation-strategy> | ||
<configuration> | ||
<phases> | ||
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources> | ||
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile> | ||
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources> | ||
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile> | ||
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test> | ||
<package>de.dentrassi.maven:rpm:rpm</package> | ||
<install>org.apache.maven.plugins:maven-install-plugin:install</install> | ||
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy> | ||
</phases> | ||
</configuration> | ||
</component> | ||
</components> | ||
</component-set> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
------ | ||
RPM Builder Plugin - Example Primary Artifact | ||
------ | ||
Daniel Singhal | ||
------ | ||
2019-07-22 | ||
----- | ||
|
||
Example configuration #2 | ||
|
||
This is an example configuration showing how to use the plugin to create an RPM as the primary project artifact | ||
|
||
+----+ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>de.dentrassi.maven.rpm.test</groupId> | ||
<artifactId>emptyTest1</artifactId> <!-- used as package name --> | ||
<version>1.0.0-SNAPSHOT</version> <!-- used as version --> | ||
<packaging>rpm</packaging> <!-- Primary Artifact Configuration --> | ||
|
||
<name>Test Package #2 -- Primary</name> <!-- used for "summary" field --> | ||
|
||
<!-- used for "description" field --> | ||
<description> | ||
This is some long long text about foo bar and all the rest. | ||
</description> | ||
|
||
<url>http://dentrassi.de</url> <!-- used for URL field --> | ||
|
||
<!-- | ||
Packager: Jens Reimann <http:/dentrassi.de> | ||
Vendor: Jens Reimann | ||
--> | ||
<organization> | ||
<name>Jens Reimann</name> | ||
<url>http://dentrassi.de</url> | ||
</organization> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<!-- For managing PGP Signing of RPM --> | ||
<rpm.skipSigning>true</rpm.skipSigning> <!-- Primary Artifact Configuration(s) --> | ||
</properties> | ||
|
||
<build> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>de.dentrassi.maven</groupId> | ||
<artifactId>rpm</artifactId> | ||
<version>${project.version}</version> | ||
<!-- Tell MVN that the plugin has a packaging option --> | ||
<extensions>true</extensions> <!-- Primary Artifact Configuration --> | ||
<executions> | ||
<execution> | ||
|
||
<goals> | ||
<goal>rpm</goal> | ||
</goals> | ||
|
||
<configuration> | ||
<attach>false</attach> <!-- don't attach RPM as a secondary artifact --> | ||
<group>Application/Misc</group> <!-- set RPM group --> | ||
|
||
<!-- rule sets --> | ||
|
||
<rulesets> | ||
<ruleset> | ||
<id>my-default</id> | ||
<rules> | ||
<rule> | ||
<when> | ||
<type>directory</type> | ||
</when> | ||
<mode>0750</mode> | ||
</rule> | ||
<rule> | ||
<when> | ||
<prefix>/etc/</prefix> | ||
</when> | ||
<configuration>true</configuration> | ||
</rule> | ||
<file> | ||
<when> | ||
<prefix>/usr/shar/doc/</prefix> | ||
</when> | ||
<documentation>true</documentation> | ||
</file> | ||
<file> | ||
<when> | ||
<suffix>README.txt</suffix> | ||
</when> | ||
<readme>true</readme> | ||
</file> | ||
<rule> | ||
<when> | ||
<type>file</type> | ||
<prefix>/usr/lib/foobar/lib/dir1</prefix> | ||
</when> | ||
<user>foo</user> | ||
<group>bar</group> | ||
</rule> | ||
</rules> | ||
</ruleset> | ||
</rulesets> | ||
|
||
<entries> | ||
|
||
<!-- add explicit directory --> | ||
|
||
<entry> | ||
<name>/etc/foo</name> | ||
<directory>true</directory> | ||
<user>root</user> | ||
<group>root</group> | ||
<mode>0755</mode> | ||
|
||
<!-- will use the default ruleset --> | ||
|
||
</entry> | ||
|
||
<!-- add single file --> | ||
|
||
<entry> | ||
<name>/etc/foo/bar.txt</name> | ||
<file>src/main/resources/bar.txt</file> | ||
<user>root</user> | ||
<group>root</group> | ||
<mode>0600</mode> | ||
<ruleset>my-default</ruleset> | ||
</entry> | ||
|
||
<!-- collect all files from : target/classes --> | ||
|
||
<entry> | ||
<name>/usr/lib/foobar</name> | ||
<collect> | ||
<from>target/classes</from> | ||
</collect> | ||
<ruleset>my-default</ruleset> | ||
</entry> | ||
|
||
<!-- collect all files from : src/main/resources/etc --> | ||
|
||
<entry> | ||
<name>/etc</name> | ||
<collect> | ||
<from>src/main/resources/etc</from> | ||
<directories>false</directories> <!-- make implicit directories --> | ||
</collect> | ||
<ruleset>my-default</ruleset> | ||
</entry> | ||
|
||
<!-- collect all files from : src/main/resources/lib --> | ||
|
||
<entry> | ||
<name>/usr/lib</name> | ||
<collect> | ||
<from>src/main/resources/lib</from> | ||
<directories>true</directories> <!-- make explicit directories --> | ||
</collect> | ||
<ruleset>my-default</ruleset> | ||
</entry> | ||
|
||
</entries> | ||
|
||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> | ||
+----+ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.