This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-archiver.git
The following commit(s) were added to refs/heads/master by this push: new fd45303 [MSHARED-777] Remove deprecated main attributes from generated manifest fd45303 is described below commit fd45303e6a53d5f846173e4e6e8f76f427a3f307 Author: Michael Osipov <micha...@apache.org> AuthorDate: Tue Dec 25 18:55:20 2018 +0100 [MSHARED-777] Remove deprecated main attributes from generated manifest --- src/main/java/org/apache/maven/archiver/MavenArchiver.java | 7 ------- src/site/apt/examples/manifest.apt | 5 ----- src/site/xdoc/index.xml.vm | 4 +--- src/test/java/org/apache/maven/archiver/MavenArchiverTest.java | 8 ++------ 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/apache/maven/archiver/MavenArchiver.java b/src/main/java/org/apache/maven/archiver/MavenArchiver.java index f4f2636..c184639 100644 --- a/src/main/java/org/apache/maven/archiver/MavenArchiver.java +++ b/src/main/java/org/apache/maven/archiver/MavenArchiver.java @@ -474,18 +474,11 @@ public class MavenArchiver { addManifestAttribute( m, entries, "Implementation-Title", project.getName() ); addManifestAttribute( m, entries, "Implementation-Version", project.getVersion() ); - // MJAR-5 - addManifestAttribute( m, entries, "Implementation-Vendor-Id", project.getGroupId() ); if ( project.getOrganization() != null ) { addManifestAttribute( m, entries, "Implementation-Vendor", project.getOrganization().getName() ); } - - if ( project.getUrl() != null ) - { - addManifestAttribute( m, entries, "Implementation-URL", project.getUrl() ); - } } private void handleSpecificationEntries( MavenProject project, Map<String, String> entries, Manifest m ) diff --git a/src/site/apt/examples/manifest.apt b/src/site/apt/examples/manifest.apt index 93ea1d0..32e6ee1 100644 --- a/src/site/apt/examples/manifest.apt +++ b/src/site/apt/examples/manifest.apt @@ -86,14 +86,9 @@ Specification-Version: ${project.artifact.selectedVersion.majorVersion}.${projec Specification-Vendor: ${project.organization.name} Implementation-Title: ${project.name} Implementation-Version: ${project.version} -Implementation-Vendor-Id: ${project.groupId} Implementation-Vendor: ${project.organization.name} -Implementation-URL: ${project.url} +-----+ <<Note:>> If your pom.xml does not have an <<<\<organization\>>>>/<<<\<name\>>>> element, then the <<<Specification-Vendor>>> and <<<Implementation-Vendor>>> entries will <<not>> be in the manifest. - - <<Note:>> If your pom.xml does not have a <<<\<url\>>>> element, referenced through interpolation, - then the <<<Implementation-URL>>> entry will <<not>> be in the manifest. diff --git a/src/site/xdoc/index.xml.vm b/src/site/xdoc/index.xml.vm index dd155d0..89c86ab 100644 --- a/src/site/xdoc/index.xml.vm +++ b/src/site/xdoc/index.xml.vm @@ -198,9 +198,7 @@ <source> Implementation-Title: \${project.name} Implementation-Version: \${project.version} -Implementation-Vendor-Id: \${project.groupId} Implementation-Vendor: \${project.organization.name} -Implementation-URL: \${project.url} </source> The default value is <code>false</code>. </td> @@ -348,4 +346,4 @@ artifactId=\${project.artifactId} </subsection> </section> </body> -</document> \ No newline at end of file +</document> diff --git a/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java b/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java index 6803f24..a70523f 100644 --- a/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java +++ b/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java @@ -260,7 +260,7 @@ public class MavenArchiverTest FileUtils.deleteDirectory( "target/maven-archiver" ); archiver.createArchive( session, project, config ); assertTrue( jarFile.exists() ); - + long history = System.currentTimeMillis() - 60000L; System.out.println( "history: " + history ); jarFile.setLastModified( history ); @@ -276,7 +276,7 @@ public class MavenArchiverTest archiver.createArchive( session, project, config ); // Is the assumption correct that the jar file itself // should have the same last modified time as the files itself ? - + // Based on some experiments with a result like this: // History 1532810292406 time:1532810292000 expected:<1532810352000> but was:<1532810292000> // It looks like a JDK Bug: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8177809 @@ -497,9 +497,7 @@ public class MavenArchiverTest assertEquals( "archiver test", manifest.get( Attributes.Name.IMPLEMENTATION_TITLE ) ); assertEquals( "0.1.1", manifest.get( Attributes.Name.IMPLEMENTATION_VERSION ) ); - assertEquals( "org.apache.dummy", manifest.get( Attributes.Name.IMPLEMENTATION_VENDOR_ID ) ); assertEquals( "Apache", manifest.get( Attributes.Name.IMPLEMENTATION_VENDOR ) ); - assertEquals( "http://maven.apache.org", manifest.get( Attributes.Name.IMPLEMENTATION_URL ) ); assertEquals( System.getProperty( "java.version" ), manifest.get( new Attributes.Name( "Build-Jdk" ) ) ); assertEquals( System.getProperty( "user.name" ), manifest.get( new Attributes.Name( "Built-By" ) ) ); @@ -549,9 +547,7 @@ public class MavenArchiverTest assertEquals( "archiver test", manifest.get( Attributes.Name.IMPLEMENTATION_TITLE ) ); assertEquals( "0.1.1", manifest.get( Attributes.Name.IMPLEMENTATION_VERSION ) ); - assertEquals( "org.apache.dummy", manifest.get( Attributes.Name.IMPLEMENTATION_VENDOR_ID ) ); assertEquals( "Apache", manifest.get( Attributes.Name.IMPLEMENTATION_VENDOR ) ); - assertEquals( "http://maven.apache.org", manifest.get( Attributes.Name.IMPLEMENTATION_URL ) ); assertEquals( "org.apache.maven.Foo", manifest.get( Attributes.Name.MAIN_CLASS ) );