Skip to content

Commit

Permalink
Change GroovyDoc artifact type to javadoc, so it can be handled corre…
Browse files Browse the repository at this point in the history
…ctly (#151)
  • Loading branch information
keeganwitt committed Feb 28, 2020
1 parent 8115a12 commit e80b40d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -96,7 +96,7 @@ public class GroovyDocJarMojo extends GroovyDocMojo {
/**
* The classifier for the GroovyDoc jar.
*/
@Parameter(defaultValue = "groovydoc", required = true)
@Parameter(defaultValue = "groovydoc")
private String classifier;

/**
Expand All @@ -118,10 +118,10 @@ public void execute() throws MojoExecutionException {
try {
File outputFile = generateArchive(groovyDocOutputDirectory, finalName + "-" + classifier + ".jar");

if (!attach) {
getLog().info("NOT adding GroovyDoc to attached artifacts list.");
if (attach) {
projectHelper.attachArtifact(project, "javadoc", classifier, outputFile);
} else {
projectHelper.attachArtifact(project, "groovydoc", classifier, outputFile);
getLog().info("Not adding GroovyDoc jar to attached artifacts list.");
}
} catch (ArchiverException e) {
throw new MojoExecutionException("ArchiverException: Error while creating archive", e);
Expand Down
Expand Up @@ -96,7 +96,7 @@ public class GroovyDocTestsJarMojo extends GroovyDocTestsMojo {
/**
* The classifier for the test GroovyDoc jar.
*/
@Parameter(defaultValue = "test-groovydoc", required = true)
@Parameter(defaultValue = "test-groovydoc")
private String testClassifier;

/**
Expand All @@ -118,10 +118,10 @@ public void execute() throws MojoExecutionException {
try {
File outputFile = generateArchive(testGroovyDocOutputDirectory, finalName + "-" + testClassifier + ".jar");

if (!attach) {
getLog().info("NOT adding GroovyDoc to attached artifacts list.");
if (attach) {
projectHelper.attachArtifact(project, "javadoc", testClassifier, outputFile);
} else {
projectHelper.attachArtifact(project, "groovydoc", testClassifier, outputFile);
getLog().info("Not adding test GroovyDoc jar to attached artifacts list.");
}
} catch (ArchiverException e) {
throw new MojoExecutionException("ArchiverException: Error while creating archive", e);
Expand Down

0 comments on commit e80b40d

Please sign in to comment.