Permalink
Browse files

Jenkins task doesn't launch MavenModuleSet

  • Loading branch information...
1 parent 3bc81ca commit ab1a6cd95a34ee803c2edb072ab6671925f7d2ac @m2spring m2spring committed Sep 24, 2012
View
@@ -3,6 +3,6 @@
[CI Build](https://buildhive.cloudbees.com/job/jenkinsci/job/jenkow-plugin/),
[Maven Repository](http://maven.jenkins-ci.org:8081/content/repositories/releases/com/cisco/step/jenkins/plugins/jenkow-plugin/)
-## Build Instructions
+## Caveats
-Until the Jenkow enhancements to the Activiti Designer is in place \(see [Activiti Forum: bundling Designer Extension with Designer?](http://forums.activiti.org/en/viewtopic.php?f=8&t=4234)\), the Jenkow plugin project builds its own Activiti Designer and the build needs to be done in two steps: "mvn package; mvn install"
+* Jenkins task unable to launch a Maven project. Jenkins task currently launches only items of type [Project](http://javadoc.jenkins-ci.org/hudson/model/Project.html), but a [MavenModuleSet](http://javadoc.jenkins-ci.org/hudson/maven/MavenModuleSet.html) is not a Project, but just an [AbstractProject](http://javadoc.jenkins-ci.org/hudson/model/AbstractProject.html).
View
@@ -13,3 +13,4 @@
* 20120504-08: Integrate Activiti Web UIs into Jenkins?
* 20120504-09: Jenkow Designer Perspective for Eclipse
* 20120906-01: sign the Eclipse update site \([eclipse-maven-signing-plugin](http://aniszczyk.org/2011/05/18/eclipse-org-signing-support-for-maven-tycho/)\)
+* 20120924-01: Jenkins task should be able to launch Maven projects
@@ -24,7 +24,6 @@
package com.cisco.step.jenkins.plugins.jenkow;
import hudson.model.TopLevelItem;
-import hudson.model.AbstractProject;
import hudson.model.Project;
import hudson.util.DescribableList;
@@ -64,8 +63,11 @@ public final void execute(ActivityExecution exec) throws Exception {
if (jn != null){
Jenkins jenkins = Jenkins.getInstance();
TopLevelItem it = jenkins.getItem(jn);
- if (it instanceof Project){
- Project p = (Project)it;
+ if (!(it instanceof Project)){
+ LOG.info("unable to launch job "+jn+", because it's not a Project, but just "+it.getClass());
+ }else{
+ // TODO 8: would like to have AbstractProject here, but it doesn't have BuildWrappers.
+ Project p = (Project)it;
DescribableList wrappers = p.getBuildWrappersList();
JenkowBuildWrapper wrapper = new JenkowBuildWrapper();
@@ -25,6 +25,10 @@
import hudson.model.Action;
+/**
+ * Allows to associate a Jenkins build back to the Jenkins BPMN task,
+ * if the build was started by a BPMN task.
+ */
public class JenkowAction implements Action{
private String taskId;
private String taskExecId;
View
@@ -50,7 +50,7 @@ $GIT commit -am "new trunk $NEXTVER"
$MVN $MVN_OPTIONS clean install -Dmaven.test.skip=true || exit 1
$GIT checkout -f v$RELVER
-$MVN $MVN_OPTIONS -f jenkow-plugin deploy -Dmaven.test.skip=true || exit 1
+$MVN $MVN_OPTIONS -f jenkow-plugin/pom.xml deploy -Dmaven.test.skip=true || exit 1
$GIT checkout -f master
$GIT push --all

0 comments on commit ab1a6cd

Please sign in to comment.