Skip to content

Commit

Permalink
Merge branch 'master' into MJAR-280-java-8-mininum
Browse files Browse the repository at this point in the history
  • Loading branch information
olamy committed Feb 15, 2022
2 parents f3d1283 + 41e8033 commit 66cd3e2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
Expand Up @@ -15,15 +15,13 @@
# specific language governing permissions and limitations
# under the License.

name: GitHub CI
name: Verify

on:
push:
branches-ignore:
- dependabot/**
pull_request:

jobs:
build:
name: Verify
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v1
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v2
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,3 +14,4 @@ out/
/dependencies.xml
.java-version
.checkstyle
/.factorypath
17 changes: 7 additions & 10 deletions pom.xml
Expand Up @@ -30,7 +30,7 @@
</parent>

<artifactId>maven-jar-plugin</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Apache Maven JAR Plugin</name>
Expand Down Expand Up @@ -76,10 +76,10 @@

<properties>
<mavenFileManagementVersion>3.0.0</mavenFileManagementVersion>
<mavenArchiverVersion>3.5.0</mavenArchiverVersion>
<mavenArchiverVersion>3.5.2</mavenArchiverVersion>
<mavenVersion>3.1.0</mavenVersion>
<javaVersion>8</javaVersion>
<project.build.outputTimestamp>2020-04-07T21:04:00Z</project.build.outputTimestamp>
<project.build.outputTimestamp>2022-01-08T21:19:21Z</project.build.outputTimestamp>
</properties>

<dependencies>
Expand Down Expand Up @@ -117,7 +117,7 @@
<!--
! other dependencies contain references to older versions
! so we define it here explicit to make sure we get the
! correct version for plexus-archiver and plexus-utils.
! correct version for plexus-utils.
-->
<!--
! maven-shared-utils is pulled by file-management
Expand All @@ -130,16 +130,13 @@
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
<version>3.3.4</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>4.2.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
15 changes: 15 additions & 0 deletions src/it/manifest-content/verify.bsh
Expand Up @@ -21,6 +21,7 @@
import java.io.*;
import java.util.*;
import java.util.jar.*;
import java.util.zip.*;
import org.codehaus.plexus.util.*;

boolean result = true;
Expand All @@ -42,6 +43,20 @@ try
return false;
}

ZipFile zip = new ZipFile( artifact );
Enumeration resultingEntries = zip.entries();
if ( !"META-INF/".equals( resultingEntries.nextElement().getName() ) )
{
System.err.println( "META-INF/ must be first zip entry" );
return false;
}
if ( !"META-INF/MANIFEST.MF".equals( resultingEntries.nextElement().getName() ) )
{
System.err.println( "META-INF/MANIFEST.MF must be second zip entry" );
return false;
}
zip.close();

JarFile jar = new JarFile( artifact );

Attributes manifest = jar.getManifest().getMainAttributes();
Expand Down
Expand Up @@ -243,7 +243,7 @@ public File createArchive()
}

MavenArchiver archiver = new MavenArchiver();
archiver.setCreatedBy( "Maven Jar Plugin", "org.apache.maven.plugins", "maven-jar-plugin" );
archiver.setCreatedBy( "Maven JAR Plugin", "org.apache.maven.plugins", "maven-jar-plugin" );

if ( containsModuleDescriptor )
{
Expand Down

0 comments on commit 66cd3e2

Please sign in to comment.