Skip to content

Commit e72cac8

Browse files
authored
Explicitly declare dependencies (#143)
Reduce the risk that new dependencies will be injected accidentally from a dependency update. Rely on the commons-beanutils that is provided by Jenkins rather than including a copy in the hpi file of the plugin. The developer documentation provides more details at https://www.jenkins.io/doc/developer/plugin-development/dependencies-and-class-loading/#build-time-validation-of-bundled-artifacts Originally added to Maven hpi plugin in pull request: * jenkinsci/maven-hpi-plugin#771 Testing done * Confirmed that automated tests pass
1 parent 345ea93 commit e72cac8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<jenkins.baseline>2.479</jenkins.baseline>
2323
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
2424
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
25+
<hpi.bundledArtifacts>cglib,commons-digester3,cvsclient,jsch</hpi.bundledArtifacts>
26+
<hpi.strictBundledArtifacts>true</hpi.strictBundledArtifacts>
2527
<spotbugs.effort>Max</spotbugs.effort>
2628
<spotbugs.threshold>Low</spotbugs.threshold>
2729
<ban-junit4-imports.skip>false</ban-junit4-imports.skip>
@@ -67,6 +69,11 @@
6769
</dependencyManagement>
6870

6971
<dependencies>
72+
<dependency>
73+
<groupId>commons-beanutils</groupId>
74+
<artifactId>commons-beanutils</artifactId>
75+
<scope>provided</scope>
76+
</dependency>
7077
<dependency>
7178
<groupId>org.apache.commons</groupId>
7279
<artifactId>commons-digester3</artifactId>

0 commit comments

Comments
 (0)