Where did configureDefaultMaven and createMavenProject go?

25 views
Skip to first unread message

Gavin Mogan

unread,
Jul 8, 2016, 6:58:07 PM7/8/16
to Jenkins Developers
Trying to upgrade to the latest base plugin for jenkins and running into a couple issues.

I'm pretty certain the upgrade should just be a minor change to the pom file to separate things out:

diff --git a/pom.xml b/pom.xml
index 14b1b17..769ca98 100755
--- a/pom.xml
+++ b/pom.xml
@@ -3,9 +3,14 @@
     <parent>
         <groupId>org.jenkins-ci.plugins</groupId>
         <artifactId>plugin</artifactId>
-        <version>1.609.2</version>
+        <version>2.11</version>
+        <relativePath/>
     </parent>
     <properties>
+        <!-- Baseline Jenkins version you use to build the plugin. Users must have this version or newer to run. -->
+        <jenkins.version>1.609.2</jenkins.version>
+        <!-- Java Level to use. Java 7 required when using core >= 1.612 -->
+        <java.level>7</java.level>


But I can no longer run the tests that call jenkinsRule.configureDefaultMaven and createMavenProject

Whats the suggestion for those? Did they get moved to other modules?

Jesse Glick

unread,
Jul 8, 2016, 7:03:38 PM7/8/16
to Jenkins Dev
On Fri, Jul 8, 2016 at 6:58 PM, Gavin Mogan <ga...@gavinmogan.com> wrote:
> I can no longer run the tests that call
> jenkinsRule.configureDefaultMaven and createMavenProject

For `configureDefaultMaven`, add a `test`-scoped dependency on
`jenkins-test-harness-tools`.

For `createMavenProject`, just use
`rule.jenkins.createProject(MavenProject.class, "name")`.

Gavin Mogan

unread,
Jul 8, 2016, 8:23:33 PM7/8/16
to jenkin...@googlegroups.com
Awesome! that lead me to the right spot

jenkinsRule.createProject(MavenModuleSet.class, "mavenBuildProject");

ToolInstallations.configureDefaultMaven("apache-maven-3.0.1", Maven.MavenInstallation.MAVEN_30);

Just in case anyone else runs into this in the future https://github.com/saucelabs/jenkins-sauce-ondemand-plugin/pull/7 is the complete but very minor list of changes I made to get the latest version working. Mostly removing dependancies from the pom file and fixing the new inherited tests.



--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/3BJFxoykC6c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3eLs%3DU8TpRfVAJ1%3DwLB46PBUTao9fS4uDjzF3cKmH9KQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages