Skip to content
Advertisement

Netbeans exports earlier/wrong program version

I am using netbeans to create an app.

When I export in the dist file everything’s working correctly, when I am exporting for store (to include the libraries in the .jar), netbeans exports an earlier program version. Oh and yes, I have tried restarting netbeans didn’t really do anything.

This is actually the first time I encountered this issue.

And yes I have saved the project. Is this a netbeans issue or am I doing something wrong?

this is the image of what I’m doing:

enter image description here

this is the build.xml code

<?xml version="1.0" encoding="UTF-8"?>

<project name="GalaxyChromaY2_BoilerPlate" default="default" basedir=".">
    <description>Builds, tests, and runs the project JavaApplication2.</description>
    <import file="nbproject/build-impl.xml"/>
   
    
     <target name="package-for-store" depends="jar">

        <property name="store.jar.name" value="GalaxyChromaY2"/>

        <property name="store.dir" value="store"/>
        <property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/>

        <echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/>

        <delete dir="${store.dir}"/>
        <mkdir dir="${store.dir}"/>

        <jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">
            <zipgroupfileset dir="dist" includes="*.jar"/>
            <zipgroupfileset dir="dist/lib" includes="*.jar"/>

            <manifest>
                <attribute name="Main-Class" value="${main.class}"/>
            </manifest>
        </jar>

        <zip destfile="${store.jar}">
            <zipfileset src="${store.dir}/temp_final.jar"
            excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
        </zip>

        <delete file="${store.dir}/temp_final.jar"/>

    </target> 
    
</project>

Advertisement

Answer

For some reason netbeans was exporting an older version of the project so I copied the whole project file deleted the old one and tried to export again.

This time everything worked as it should.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement