forked from drewnoakes/metadata-extractor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds MANIFEST.MF + unit test for manifest file + adjusts pom.xml
The pom.xml will use the existing MANIFEST.MF file and just add entries which are not already given.
- Loading branch information
1 parent
b0d3a3a
commit e17d91c
Showing
3 changed files
with
67 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Manifest-Version: 1.0 | ||
Implementation-Title: metadata-extractor | ||
Implementation-Version: 2.7.0-SNAPSHOT | ||
Implementation-Vendor: https://drewnoakes.com/code/exif/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.drew.testing; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.util.jar.Manifest; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class ManifestTest { | ||
|
||
@Test | ||
public void testMetadataExtractorVersion() throws Exception | ||
{ | ||
FileInputStream stream = new FileInputStream(new File("META-INF/MANIFEST.MF")); | ||
try | ||
{ | ||
Assert.assertNotNull(stream); | ||
final Manifest manifest = new Manifest(stream); | ||
Assert.assertNotNull(manifest); | ||
assertEquals("metadata-extractor", manifest.getMainAttributes().getValue("Implementation-Title")); | ||
assertEquals("https://drewnoakes.com/code/exif/", manifest.getMainAttributes().getValue("Implementation-Vendor")); | ||
assertEquals("2.7.0-SNAPSHOT", manifest.getMainAttributes().getValue("Implementation-Version")); | ||
} finally | ||
{ | ||
stream.close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters