This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new parameter: hardLinkDependencies
Instead of copying artifact to directory, hard link files. This option cannot be used if local maven repository is in different partition. Two benefits: 1) Requires less space to build 2) Faster because only link needs to be written And cons: 1) Implementation requires Java 7 (nio) 2) Code is not backwards compatible (integration tests were broken by previous regression, copied fix from #85) Also fixed issue with Travis: default distro (trusty) does not support oraclejdk7
- Loading branch information
Showing
7 changed files
with
124 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 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 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 @@ | ||
invoker.goals = clean package |
This file contains 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,54 @@ | ||
<?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>org.codehaus.mojo.rpm.its</groupId> | ||
<artifactId>rpm-dependency-hardlink-module-rpm</artifactId> | ||
<version>1.0</version> | ||
<packaging>rpm</packaging> | ||
|
||
<inceptionYear>2017</inceptionYear> | ||
<organization> | ||
<name>my org</name> | ||
<url>www.my.org</url> | ||
</organization> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
<version>1.2.14</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>rpm-maven-plugin</artifactId> | ||
<version>@pom.version@</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<distribution>My App</distribution> | ||
<group>Application/Collectors</group> | ||
<release>rel</release> | ||
<needarch>false</needarch> | ||
<defaultUsername>myuser</defaultUsername> | ||
<defaultGroupname>mygroup</defaultGroupname> | ||
<hardLinkDependencies>true</hardLinkDependencies> | ||
<mappings> | ||
<mapping> | ||
<directory>/usr/myusr/app</directory> | ||
<dependency /> | ||
<directoryIncluded>false</directoryIncluded> | ||
</mapping> | ||
</mappings> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains 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,12 @@ | ||
File rpm = new File(basedir, "target/rpm/rpm-dependency-hardlink-module-rpm/RPMS/noarch/rpm-dependency-hardlink-module-rpm-1.0-rel.noarch.rpm") | ||
if (!rpm.exists()) | ||
throw new AssertionError("rpm file does not exist: ${rpm.getAbsolutePath()}") | ||
|
||
def proc = ["rpm", "-qlp", rpm.getAbsolutePath()].execute() | ||
proc.waitFor() | ||
proc.in.text.eachLine { | ||
if (!it.equals("/usr/myusr/app/log4j-1.2.14.jar")) | ||
throw new AssertionError("rpm.dependency-hardlink log4j-1.2.14.jar missing!") | ||
} | ||
|
||
return true |
This file contains 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 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