Skip to content
Permalink
Browse files
Merge pull request #14 from cjo9900/JENKINS-15977
[FIXED JENKINS-15977] ClassNotFound is maven plugin not installed
  • Loading branch information
ikedam committed Feb 4, 2014
2 parents 7df40f1 + 6cd2d83 commit d00c85521648361512e84ea0439ca6b1a95b9a4c
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
@@ -277,7 +277,8 @@ public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListene

Copier copier = Jenkins.getInstance().getExtensionList(Copier.class).get(0).clone();

if (src instanceof MavenModuleSetBuild) {
if (Hudson.getInstance().getPlugin("maven-plugin") != null && (src instanceof MavenModuleSetBuild) ) {
// use classes in the "maven-plugin" plugin as might not be installed
// Copy artifacts from the build (ArchiveArtifacts build step)
boolean ok = perform(src, build, expandedFilter, targetDir, baseTargetDir, copier, console);
// Copy artifacts from all modules of this Maven build (automatic archiving)
@@ -377,11 +378,13 @@ public FormValidation doCheckProjectName(
FormValidation result;
Item item = Jenkins.getInstance().getItem(value, anc.getParent());
if (item != null)
result = item instanceof MavenModuleSet
? FormValidation.warning(Messages.CopyArtifact_MavenProject())
: (item instanceof MatrixProject
if (Hudson.getInstance().getPlugin("maven-plugin") != null && item instanceof MavenModuleSet) {
result = FormValidation.warning(Messages.CopyArtifact_MavenProject());
} else {
result = (item instanceof MatrixProject)
? FormValidation.warning(Messages.CopyArtifact_MatrixProject())
: FormValidation.ok());
: FormValidation.ok();
}
else if (value.indexOf('$') >= 0)
result = FormValidation.warning(Messages.CopyArtifact_ParameterizedName());
else

0 comments on commit d00c855

Please sign in to comment.