rpm-maven-plugin

Dynamically create the version number within the Ambari's metainfo.xml file using maven build processes

限于喜欢 提交于 2020-01-16 04:00:18
问题 I don’t want to hardcode my service version into metainfo.xml, Can I do it? <service> <name>DUMMY_APP</name> <displayName>My Dummy APP</displayName> <comment>This is a distributed app.</comment> <version>0.1</version> --------------This I don't want to hardcode, Can I doit? <components> ... </components> </service> I am using maven as my build tool. 回答1: This can be done by using maven's resource filtering. Three steps are required: Define a maven property that will hold the version number

Check if Maven pom is SNAPSHOT

不羁岁月 提交于 2019-12-24 19:15:01
问题 I need a way to set a property is.snapshot to 0 if project is currently a SNAPSHOT version, otherwise set the property to 1 . My attempt was to use the build-helper-plugin <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>version-helper</id> <goals> <goal>regex-property</goal> </goals> </execution> </executions> <configuration> <name>is.snapshot</name> <value>${project.version}</value> <regex>.*

Maven RPM Plugin does not generate the scriptlets specified

主宰稳场 提交于 2019-12-10 23:33:55
问题 I am trying to create an rpm package with the help of the rpm-maven-plugin. All goes well until I try to have it generate the %pre scriptlet (or any scriptlet for that matter) The pom.xml excerpt is: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>rpm-maven-plugin</artifactId> <version>2.0-beta-2</version> <executions> <execution> <goals> <goal>attached-rpm</goal> </goals> </execution> </executions> <configuration> <copyright>Copyright 2010 XXX, Inc. All rights reserved</copyright>

Using maven-rpm-plugin how do I to replace text in files similar to the assembly plugin

时光总嘲笑我的痴心妄想 提交于 2019-12-10 19:22:50
问题 I have a maven project where I create two packagings. One is a tar.gz file (for some targets) and an RPM for linux targets that can use RPM. I use the maven-assembly-plugin for the tar.gz file. I use maven-rpm-plugin for the RPM packaging. The assembly plug allows the specification of a true option that will replace any maven properties in the target files. For example (from my pom): <fileSet> <directory>${basedir}/src/resources/</directory> <outputDirectory>/</outputDirectory> <filtered>true

rpmlib(FileDigests) dependency error on RPM built with rpm-maven-plugin

家住魔仙堡 提交于 2019-12-10 11:19:19
问题 Just like with this question, I try to an install an RPM and get the following errors: # rpm -iv myapp-0.0.14-SNAPSHOT.rpm error: Failed dependencies: rpmlib(FileDigests) <= 4.6.0-1 is needed by myapp-0.0.14-SNAPSHOT20151117233758.noarch rpmlib(PayloadIsXz) <= 5.2-1 is needed by myapp-0.0.14-SNAPSHOT20151117233758.noarch But my app was built with the rpm-maven-plugin. There are differences in redhat version between the build machine and the server on which I want to do the install. $ uname -a

Example of a multi-module web application with the rpm-maven-plugin?

谁说我不能喝 提交于 2019-12-09 05:35:01
问题 Does anyone know of any web applications that are built with Maven to an RPM? The RPM Maven Plugin provides the functionality to build to an RPM, but it's documentation is lacking. Specifically, I'm looking for an example that would include multiple modules, i.e. Chapter 8. A Multi-module Project, from the "Maven by Example" series. An example with only a single module would be: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

rpmlib(FileDigests) dependency error on RPM built with rpm-maven-plugin

笑着哭i 提交于 2019-12-06 07:56:48
Just like with this question , I try to an install an RPM and get the following errors: # rpm -iv myapp-0.0.14-SNAPSHOT.rpm error: Failed dependencies: rpmlib(FileDigests) <= 4.6.0-1 is needed by myapp-0.0.14-SNAPSHOT20151117233758.noarch rpmlib(PayloadIsXz) <= 5.2-1 is needed by myapp-0.0.14-SNAPSHOT20151117233758.noarch But my app was built with the rpm-maven-plugin . There are differences in redhat version between the build machine and the server on which I want to do the install. $ uname -a Linux buildmach 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 x86_64 x86_64 GNU

Example of a multi-module web application with the rpm-maven-plugin?

点点圈 提交于 2019-12-03 06:53:34
Does anyone know of any web applications that are built with Maven to an RPM? The RPM Maven Plugin provides the functionality to build to an RPM, but it's documentation is lacking. Specifically, I'm looking for an example that would include multiple modules, i.e. Chapter 8. A Multi-module Project , from the "Maven by Example" series. An example with only a single module would be: <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

does an external script in rpm-maven-plugin have access to maven properties

非 Y 不嫁゛ 提交于 2019-12-02 20:01:09
问题 In an external postinstallScriptlet as follows, is there a way to access maven properties such as ${project.artifactId} ? The pom.xml file has this snippet: <postinstallScriptlet> <scriptFile>scripts/postinstall.sh</scriptFile> <fileEncoding>utf-8</fileEncoding> </postinstallScriptlet> 回答1: The properties are not directly accessible, but you can use the maven-resources-plugin copy-resources goal to apply filters while copying from your scripts directory into target. Your scriptFile