4 Commits
Author SHA1 Message Date
brian.long fb5a41e52a upgraded dependencies and plugins 2026-02-09 15:37:50 -05:00
brian.long e4ff44be35 fixed classifier NPE 2024-08-26 15:18:39 -04:00
brian.long e2e0069dec dynamically support classifer and no-classifier JAR 2024-08-24 18:20:29 -04:00
brian.long 7048dc4230 do not add classifier to JAR 2024-08-18 16:28:08 -04:00
2 changed files with 40 additions and 27 deletions
+28 -22
View File
@@ -6,12 +6,12 @@
<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>
<description>Generate Alfresco Module Packages (AMP) files in a way simialr to WAR files</description>
<url>https://bitbucket.org/inteligr8/amp-maven-plugin</url>
<url>https://git.inteligr8.com/inteligr8/amp-maven-plugin</url>
<licenses>
<license>
@@ -21,9 +21,9 @@
</licenses>
<scm>
<connection>scm:git:https://bitbucket.org/inteligr8/amp-maven-plugin.git</connection>
<developerConnection>scm:git:git@bitbucket.org:inteligr8/amp-maven-plugin.git</developerConnection>
<url>https://bitbucket.org/inteligr8/amp-maven-plugin</url>
<connection>scm:git:https://git.inteligr8.com/inteligr8/amp-maven-plugin.git</connection>
<developerConnection>scm:git:git@git.inteligr8.com:inteligr8/amp-maven-plugin.git</developerConnection>
<url>https://git.inteligr8.com/inteligr8/amp-maven-plugin</url>
</scm>
<organization>
<name>Inteligr8</name>
@@ -40,21 +40,21 @@
<properties>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.version>3.9.0</maven.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.version>3.9.11</maven.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
<version>2.21.0</version>
</dependency>
<!-- Extra Maven Plugin libraries -->
@@ -68,7 +68,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.5.0</version>
<version>4.0.2</version>
</dependency>
<!-- Embedded Maven Plugin libraries -->
@@ -81,7 +81,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.7.1</version>
<version>3.15.2</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -95,7 +95,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
@@ -115,10 +115,17 @@
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.7.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<goalPrefix>amp</goalPrefix>
</configuration>
@@ -142,7 +149,7 @@
<profiles>
<profile>
<id>ossrh-release</id>
<id>central-publish</id>
<build>
<plugins>
<plugin>
@@ -179,14 +186,13 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
@@ -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 {