Skip to content

Commit

Permalink
[JENKINS-50475] Add support for scope "import"
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrille Le Clerc committed Apr 13, 2018
1 parent bef24d2 commit fa3c5b4
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 0 deletions.
Expand Up @@ -49,6 +49,8 @@ public class PipelineGraphPublisher extends MavenPublisher {

private boolean includeScopeProvided = true;

private boolean includeScopeImport = true;

private boolean skipDownstreamTriggers;

/**
Expand All @@ -74,6 +76,8 @@ protected Set<String> getIncludedScopes() {
includedScopes.add("provided");
if (includeScopeTest)
includedScopes.add("test");
if (includeScopeImport)
includedScopes.add("import");
return includedScopes;
}

Expand Down
@@ -0,0 +1,27 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>jenkins.mvn.test.bom</groupId>
<artifactId>my-bom</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>24.1-jre</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
@@ -0,0 +1,39 @@
<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>jenkins.mvn.test.bom</groupId>
<artifactId>my-app</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.1.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.1.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

@@ -0,0 +1,11 @@
package com.example;

public class MonoModuleMavenApp {
/**
* TODO message
* @param args
*/
public static void main(String[] args) {
System.out.println("Hello MonoModuleMavenApp");
}
}
@@ -0,0 +1,14 @@
package com.example;

import org.junit.Test;

/**
* Integration test for the maven-failsafe-plugin
*/
public class MonoModuleMavenAppIT {

@Test
public void success(){
System.out.println("MonoModuleMavenAppIT#success");
}
}
@@ -0,0 +1,11 @@
package com.example;

import org.junit.Test;

public class MonoModuleMavenAppTest {

@Test
public void success(){
System.out.println("MonoModuleMavenAppTest#success");
}
}
@@ -0,0 +1,14 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>jenkins.mvn.test.bom</groupId>
<artifactId>multimodule-parent</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
<module>my-bom</module>
<module>my-jar</module>
</modules>
</project>

0 comments on commit fa3c5b4

Please sign in to comment.