Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required library to project configuration #615

Merged
merged 3 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ THE SOFTWARE.
<properties>
<revision>1.59</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.222.4</jenkins.version>
<jenkins.version>2.277.4</jenkins.version>
<java.level>8</java.level>
<aws-java-sdk.version>1.11.995</aws-java-sdk.version>
</properties>
Expand Down Expand Up @@ -209,6 +209,8 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<!-- TODO: remove version once https://github.com/jenkinsci/bom/commit/0de33628090ece61378f6e8d97711b93af9b997a is released -->
<version>1.77</version>
alecharp marked this conversation as resolved.
Show resolved Hide resolved
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -262,16 +264,14 @@ THE SOFTWARE.
<version>1.7.30</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>libzfs</artifactId>
<version>0.8</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-bom</artifactId>
<version>${jenkins.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
Expand All @@ -287,11 +287,16 @@ THE SOFTWARE.
</dependency>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.222.x</artifactId>
<version>29</version>
<artifactId>bom-2.277.x</artifactId>
<version>807.v6d348e44c987</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it needed now and not before?

Copy link
Member Author

@alecharp alecharp May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the version used in two different dependencies which are using different versions.
And it is a dependencyManagement not a direct dependency.

<version>2.10.2</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
8 changes: 4 additions & 4 deletions src/test/java/hudson/plugins/ec2/TemplateLabelsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void testLabelAtom() throws Exception {
assertEquals(true, ac.canProvision(new LabelAtom(LABEL1)));
assertEquals(true, ac.canProvision(new LabelAtom(LABEL2)));
assertEquals(false, ac.canProvision(new LabelAtom("aaa")));
assertEquals(true, ac.canProvision(null));
assertEquals(true, ac.canProvision((Label) null));
}

@Test
Expand All @@ -89,7 +89,7 @@ public void testLabelExpression() throws Exception {
public void testEmptyLabel() throws Exception {
setUpCloud("");

assertEquals(true, ac.canProvision(null));
assertEquals(true, ac.canProvision((Label) null));
}

@Test
Expand All @@ -99,14 +99,14 @@ public void testExclusiveMode() throws Exception {
assertEquals(true, ac.canProvision(new LabelAtom(LABEL1)));
assertEquals(true, ac.canProvision(new LabelAtom(LABEL2)));
assertEquals(false, ac.canProvision(new LabelAtom("aaa")));
assertEquals(false, ac.canProvision(null));
assertEquals(false, ac.canProvision((Label) null));
}

@Test
public void testExclusiveModeEmptyLabel() throws Exception {
setUpCloud("", Node.Mode.EXCLUSIVE);

assertEquals(false, ac.canProvision(null));
assertEquals(false, ac.canProvision((Label) null));
}

}