Ant claims Execution-Title / Version / Provider is not installed, but they

I am running ant 1.8.0 in detail mode. I created a manifest containing the Implementation-Title, -Version, and -Vendor, and as a result, the JAR contains a manifest with those in it. The JAR class works great. However, the conclusion from ant says

[jar] There is no set of implementation elements. Not. Implementation-version set.No Implementation-A set of suppliers.

Is this just a bug in ant or am I missing something here?

thanks

Here is my ant code:

<?xml version="1.0" encoding="UTF-8"?> <project name="helloworld.makejar" default="makejar" basedir="."> <target name ="makejar" description="Create a JAR for the HelloWorld project"> <delete file="helloworld.jar" /> <delete file="MANIFEST.MF" /> <manifest file="MANIFEST.MF"> <attribute name="Built-By" value="${user.name}" /> <attribute name="Main-Class" value="project.builder.example.HelloWorld" /> <section name="common"> <attribute name="Specification-Title" value="Example" /> <attribute name="Specification-Version" value="1.0.0" /> <attribute name="Specification-Vendor" value="Example Organization" /> <attribute name="Implementation-Title" value="common" /> <attribute name="Implementation-Version" value="1.0.0 today" /> <attribute name="Implementation-Vendor" value="Acme Corp." /> </section> </manifest> <jar jarfile="helloworld.jar" includes="**/*.class" basedir="bin" manifest="MANIFEST.MF" /> </target> <javac srcdir="src" destdir="bin" /> </project> 
+6
source share
1 answer

I think the problem is that attributes should be defined as children of the manifest, and not be children of the nested section.

Update

Perhaps using an inline manifest element will make a difference. The following snippet from an Ant document:

 <jar destfile="test.jar" basedir="."> <include name="build"/> <manifest> <!-- Who is building this jar? --> <attribute name="Built-By" value="${user.name}"/> <!-- Information about the program itself --> <attribute name="Implementation-Vendor" value="ACME inc."/> <attribute name="Implementation-Title" value="GreatProduct"/> <attribute name="Implementation-Version" value="1.0.0beta2"/> <!-- details --> <section name="common/MyClass.class"> <attribute name="Sealed" value="false"/> </section> </manifest> </jar> 
+4
source

Source: https://habr.com/ru/post/895807/


All Articles