]> source.dussan.org Git - poi.git/commitdiff
added manifest to all jar files produced in maven reactor
authorCédric Walter <cedricwalter@apache.org>
Wed, 2 Apr 2014 13:50:57 +0000 (13:50 +0000)
committerCédric Walter <cedricwalter@apache.org>
Wed, 2 Apr 2014 13:50:57 +0000 (13:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/maven@1584032 13f79535-47bb-0310-9956-ffa450edef68

build.xml
pom.xml

index e1226af08d1764ed80986beb088b30b0f412f145..3aa6139e2f707921b6431f3eb869df64b963e8e0 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1118,48 +1118,7 @@ under the License.
         <echo>Use mvn-deploy.sh to deploy the artifacts in the remote repository</echo>
     </target>
 
-    <target name="jar" depends="compile-all, compile-version" description="Creates jar files for distribution">
-        <manifest file="build/poi-manifest.mf">
-            <attribute name="Built-By" value="${user.name}"/>
-            <attribute name="Specification-Title" value="Apache POI"/>
-            <attribute name="Specification-Version" value="${version.id}"/>
-            <attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
-            <attribute name="Implementation-Title" value="Apache POI"/>
-            <attribute name="Implementation-Version" value="${version.id}"/>
-            <attribute name="Implementation-Vendor-Id" value="org.apache.poi"/>
-            <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
-        </manifest>
-        <jar destfile="${dist.dir}/${jar.name}-${version.id}-${DSTAMP}.jar"
-             manifest="build/poi-manifest.mf">
-            <fileset dir="${main.output.dir}"/>
-            <metainf dir="legal/"/>
-        </jar>
-        <jar destfile="${dist.dir}/${jar.name}-scratchpad-${version.id}-${DSTAMP}.jar"
-             manifest="build/poi-manifest.mf">
-            <fileset dir="${scratchpad.output.dir}"/>
-            <metainf dir="legal/"/>
-        </jar>
-        <jar destfile="${dist.dir}/${jar.name}-ooxml-${version.id}-${DSTAMP}.jar"
-             manifest="build/poi-manifest.mf">
-            <fileset dir="${ooxml.output.dir}"/>
-            <metainf dir="legal/"/>
-        </jar>
-        <jar destfile="${dist.dir}/${jar.name}-examples-${version.id}-${DSTAMP}.jar"
-             manifest="build/poi-manifest.mf">
-            <fileset dir="${examples.output.dir}"/>
-            <metainf dir="legal/"/>
-        </jar>
-        <jar destfile="${dist.dir}/${jar.name}-ooxml-schemas-${version.id}-${DSTAMP}.jar"
-             manifest="build/poi-manifest.mf">
-            <fileset dir="${ooxml.lite.output.dir}"/>
-            <metainf dir="legal/"/>
-        </jar>
-        <jar destfile="${dist.dir}/${jar.name}-excelant-${version.id}-${DSTAMP}.jar"
-             manifest="build/poi-manifest.mf">
-            <fileset dir="${excelant.output.dir}"/>
-            <metainf dir="legal/"/>
-        </jar>
-    </target>
+
 
     <target name="jar-src" description="Sources for Maven">
         <jar destfile="${dist.dir}/${jar.name}-${version.id}-sources-${DSTAMP}.jar"
diff --git a/pom.xml b/pom.xml
index 53eb2f138c318b351451f7c67aa9b95a55a16524..9d0c7c7945b743d1e83acbcbec170d78269ae0a8 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                     </configuration>
                 </plugin>
 
+
+                <!-- TODO add  dir="legal/" + chnage default filename build/poi-manifest.mf-->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>2.3.1</version>
+                    <configuration>
+                        <archive>
+                            <manifest>
+                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                            </manifest>
+                            <manifestEntries>
+                                <Built-By>${user.name}</Built-By>
+                                <Specification-Title>Apache POI</Specification-Title>
+                                <Specification-Version>${version.id}</Specification-Version>
+                                <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
+                                <Implementation-Title>Apache POI</Implementation-Title>
+                                <Implementation-Version>${version.id}</Implementation-Version>
+                                <Implementation-Vendor-Id>org.apache.poi</Implementation-Vendor-Id>
+                                <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
+                </plugin>
+
+
                 <plugin>
                     <groupId>org.apache.rat</groupId>
                     <artifactId>apache-rat-plugin</artifactId>