I am writing a jenkins plugin. In the plugin I have a class that extends Builder which has a method that checks if a given project is a MavenModuleSet:
if (workerProject instanceof MavenModuleSet) { MavenModuleSet mavenModuleSet = (MavenModuleSet) workerProject; mavenModuleSet.setGoals("clean package"); } } when I run mvn hpi:run to test my plugin and run it I get: java.lang.NoClassDefFoundError <http://stacktrace.jenkins-ci.org/search?query=java.lang.NoClassDefFoundError>: hudson/maven/MavenModuleSet In the pom of my plugin I have tried to add the maven-plugin explicitly: <parent> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>plugin</artifactId> <version>1.553</version> </parent> <groupId>com.samples</groupId> <artifactId>my-plugin</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>hpi</packaging> <dependencies> <dependency> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>parameterized-trigger</artifactId> <version>2.22</version> </dependency> <dependency> <groupId>org.jenkins-ci.main</groupId> <artifactId>maven-plugin</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>build-name-setter</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> </dependencies> but it does not help. Any suggestions? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.