Simplest Enterprise Continuous Integration Solutions

Saturday, April 20, 2013

Enterprise Linux: Build a RPM package via RPM Maven Plugin

Based upon RPM Maven pom.xml

[rpmbuilder@rpm-build-server ~]$ find /home/rpmbuilder/wworkspace
/home/rpmbuilder/wworkspace/
/home/rpmbuilder/wworkspace/pom.xml
/home/rpmbuilder/wworkspace/src
/home/rpmbuilder/wworkspace/src/main
/home/rpmbuilder/wworkspace/src/main/scriptlets
/home/rpmbuilder/wworkspace/src/main/scriptlets/post.sh
/home/rpmbuilder/wworkspace/src/main/scriptlets/preun.sh
/home/rpmbuilder/wworkspace/src/main/scriptlets/pre.sh
/home/rpmbuilder/wworkspace/src/main/scripts
/home/rpmbuilder/wworkspace/src/main/scripts/demo.sh
/home/rpmbuilder/wworkspace/src/main/conf
/home/rpmbuilder/wworkspace/src/main/conf/configuration.properties
/home/rpmbuilder/wworkspace/src/changelog

[rpmbuilder@rpm-build-server ~]$ mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: /usr/local/apache-maven-3.0.4
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: /usr/java/jdk1.6.0_35/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: " 2.6.18-194.el5.x86_64", arch: "amd64", family: "unix"

[rpmbuilder@rpm-build-server workspace]$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building qxc-rpm-demo 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ qxc-rpm-demo ---
[INFO] Deleting /home/rpmbuilder/workspace/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-resources) @ qxc-rpm-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ qxc-rpm-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/rpmbuilder/workspace/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ qxc-rpm-demo---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ qxc-rpm-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/rpmbuilder/workspace/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ qxc-rpm-demo ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ qxc-rpm-demo ---
[INFO] No tests to run.
[INFO] Surefire report directory: /home/rpmbuilder/workspace/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ qxc-rpm-demo ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /home/rpmbuilder/workspace/target/qxc-rpm-demo-1.0.jar
[INFO]
[INFO] --- rpm-maven-plugin:2.1-alpha-4:rpm (default) @ qxc-rpm-demo ---
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/BUILD
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/RPMS
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/SOURCES
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/SPECS
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/SRPMS
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/tmp-buildroot
[INFO] Creating directory /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/buildroot
[INFO] Copying files to /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/tmp-buildroot/opt/qxc/qxc-rpm-demo
[INFO] Copying files to /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/tmp-buildroot/opt/qxc/qxc-rpm-demo/conf
[INFO] Creating spec file /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/SPECS/qxc-rpm-demo.spec
[INFO] Building target platforms: noarch-unknown-linux
[INFO] Building for target noarch-unknown-linux
[INFO] Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.j6kVsi
[WARNING] + umask 022
[WARNING] + cd /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/BUILD
[WARNING] + '[' -d /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/buildroot ']'
[WARNING] + mv /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/tmp-buildroot/opt /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/buildroot
[WARNING] + /usr/lib/rpm/brp-compress
[WARNING] + /usr/lib/rpm/brp-strip
[WARNING] + /usr/lib/rpm/brp-strip-static-archive
[WARNING] + /usr/lib/rpm/brp-strip-comment-note
[INFO] Processing files: qxc-rpm-demo-1.0-215708.noarch
[INFO] Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/buildroot
[INFO] Wrote: /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/RPMS/noarch/qxc-rpm-demo-1.0-215708.noarch.rpm
[INFO] Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.roUQR2
[WARNING] + umask 022
[WARNING] + cd /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/BUILD
[WARNING] + /bin/rm -rf /home/rpmbuilder/workspace/target/rpm/qxc-rpm-demo/buildroot
[WARNING] + exit 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.398s
[INFO] Finished at: Thu Nov 22 22:19:52 UTC 2012
[INFO] Final Memory: 6M/16M

[INFO] ------------------------------------------------------------------------

No comments:

Post a Comment