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 8, 2018
1 parent bef24d2 commit c98d23b
Show file tree
Hide file tree
Showing 9 changed files with 155 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,46 @@
<?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>
<parent>
<groupId>jenkins.mvn.test.multimodule</groupId>
<artifactId>multimodule-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>demo-1</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>jenkins.mvn.test.multimodule</groupId>
<artifactId>shared-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.4</version>
<executions>
<execution>
<id>findbugs</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,10 @@
package com.example.demo1;

import com.example.core.Core;

public class Demo1Application {

public static void main(String[] args) {
System.out.println(new Core().sayHello("World"));
}
}
@@ -0,0 +1,12 @@
package com.example.demo1;

import org.junit.Test;

public class Demo1ApplicationTests {

@Test
public void test() {
Demo1Application.main(new String[0]);
}

}
@@ -0,0 +1,33 @@
<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</groupId>
<artifactId>mono-module-maven-app</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</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.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

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

0 comments on commit c98d23b

Please sign in to comment.