Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-51093] - Add support of artifacts from Incrementals repo (JE…
…P-305)
- Loading branch information
1 parent
b3a78a6
commit ace264d
Showing
6 changed files
with
96 additions
and
16 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
35 changes: 35 additions & 0 deletions
35
...om-war-packager-lib/src/main/java/io/jenkins/tools/warpackager/lib/impl/POMGenerator.java
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,35 @@ | ||
package io.jenkins.tools.warpackager.lib.impl; | ||
|
||
import io.jenkins.tools.warpackager.lib.config.Config; | ||
import org.apache.maven.model.Model; | ||
import org.apache.maven.model.Repository; | ||
|
||
/** | ||
* @author Oleg Nenashev | ||
* @since TODO | ||
*/ | ||
public class POMGenerator { | ||
|
||
protected final Config config; | ||
|
||
public POMGenerator(Config config) { | ||
this.config = config; | ||
} | ||
|
||
//TODO: support customization via build settings | ||
protected void addRepositories(Model target) { | ||
// Common repo | ||
Repository jenkinsRepository = new Repository(); | ||
jenkinsRepository.setId("repo.jenkins-ci.org"); | ||
jenkinsRepository.setUrl("https://repo.jenkins-ci.org/public/"); | ||
target.addPluginRepository(jenkinsRepository); | ||
target.addRepository(jenkinsRepository); | ||
|
||
// Incrementals repo | ||
Repository incrementals = new Repository(); | ||
incrementals.setId("incrementals"); | ||
incrementals.setUrl("https://repo.jenkins-ci.org/incrementals/"); | ||
target.addPluginRepository(incrementals); | ||
target.addRepository(incrementals); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
custom-war-packager-maven-plugin/src/it/incrementals/config.yml
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,15 @@ | ||
bundle: | ||
groupId: "io.github.oleg-nenashev" | ||
artifactId: "mywar" | ||
description: "Test for incrementals" | ||
war: | ||
groupId: "org.jenkins-ci.main" | ||
artifactId: "jenkins-war" | ||
source: | ||
git: https://github.com/jenkinsci/jenkins.git | ||
version: 2.118 | ||
plugins: | ||
- groupId: "org.jenkins-ci.plugins" | ||
artifactId: "buildtriggerbadge" | ||
source: | ||
version: 2.10-rc129.5fad9a56d6e9 |
1 change: 1 addition & 0 deletions
1
custom-war-packager-maven-plugin/src/it/incrementals/invoker.properties
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 |
35 changes: 35 additions & 0 deletions
35
custom-war-packager-maven-plugin/src/it/incrementals/pom.xml
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,35 @@ | ||
<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>io.jenkins.tools.war-packager.its</groupId> | ||
<artifactId>incrementals</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<packaging>pom</packaging> | ||
|
||
<build> | ||
<finalName>${project.artifactId}</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>custom-war</goal> | ||
</goals> | ||
<configuration> | ||
<configFilePath>config.yml</configFilePath> | ||
<warVersion>1.1-SNAPSHOT</warVersion> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |