Java – what is the reason for the failure: “jarsigner: failed to try to rename {file} to {file}. Org” sign up with ants?

I received an error:

When trying to sign a set of cans with ants in eclipse Ant build works well in this project and has similar code in other projects I made some small changes to the code, tried to rebuild and kept getting this error

This is the relevant ant target:

<target name="sign" depends="jar" description="Signs Jars">

        <genkey keystore="myKeystore1" alias="something" storepass="somethingpass" 
          dname="CN=Classification,OU=NAPA,O=GPC,C=US"/> 


        <signjar keystore="myKeystore1" alias="something" storepass="somethingpass">
            <fileset file="${web.dir}/${jar.name}" />
            <fileset dir="${lib.dir}">
                <include name="*.jar"/>
            </fileset>  
        </signjar>
    </target>

I deleted the item and deleted it from our repository again Therefore, it has the same default project settings as other projects that will not fail in this section I checked the problem Jar, which is not read-only I changed the name, next in alphabetical order The jar file also failed No running programs are accessing the in this folder jars.

What suggestions lead to?

Solution

One possibility is that jars (located in the 'lib' directory) are in the classpath used during construction$ Is {lib. Dir} included in the classpath used in the build file?

You can create a separate directory to hold the signed jar and use the destdir attribute to assign it to the 'sign jar' task

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>