3 Commits

Author SHA1 Message Date
e4ff44be35 fixed classifier NPE 2024-08-26 15:18:39 -04:00
e2e0069dec dynamically support classifer and no-classifier JAR 2024-08-24 18:20:29 -04:00
7048dc4230 do not add classifier to JAR 2024-08-18 16:28:08 -04:00
2 changed files with 13 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>amp-maven-plugin</artifactId>
<version>1.1.1</version>
<version>1.1-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>A Maven plugin to generate AMP files</name>

View File

@@ -130,9 +130,8 @@ public class AmpMojo extends AbstractMojo implements ArtifactResolutionCallback
if (this.classifier != null) {
this.getLog().info("A classifier was specified; injecting classifier into module and output artifact names");
this.outputAmpFile = this.injectClassifier(this.outputAmpFile);
this.moduleJarFile = this.injectClassifier(this.moduleJarFile);
}
this.normalize();
File ampFile = this.getOutputFile();
@@ -201,10 +200,18 @@ public class AmpMojo extends AbstractMojo implements ArtifactResolutionCallback
}
private File getModuleFile() throws MojoExecutionException {
if (this.classifier != null) {
String moduleJarFile = this.injectClassifier(this.moduleJarFile);
File jarFile = new File(moduleJarFile);
if (jarFile.exists())
return jarFile;
}
File jarFile = new File(this.moduleJarFile);
if (!jarFile.exists())
throw new MojoExecutionException("The module JAR file does not exist: " + this.moduleJarFile);
return jarFile;
if (jarFile.exists())
return jarFile;
throw new MojoExecutionException("The module JAR file does not exist: " + this.moduleJarFile);
}
private File getModulePropertyFile() throws MojoExecutionException {