In my project I needed to add the option to send emails I added the library commons-email-1.4
I wrote all the code and tested. So far everything is perfect however when cleaning and building the application .jar file, here is the error.
ant -f C:\Users\Clayton\Documents\NetBeansProjects\Agil307 - Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Updating property file: C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\built-clean.properties
Deleting directory C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build
clean:
init:
deps-jar:
Created dir: C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build
Updating property file: C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\built-jar.properties
Created dir: C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\classes
Created dir: C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\classes\META-INF
Copying 1 file to C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\classes\META-INF
Created dir: C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\empty
Created dir: C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\generated-sources\ap-source-output
Compiling 401 source files to C:\Users\Clayton\Documents\NetBeansProjects\Agil307\build\classes
C:\Users\Clayton\Documents\NetBeansProjects\Agil307\nbproject\build-impl.xml:929: The following error occurred while executing this line:
C:\Users\Clayton\Documents\NetBeansProjects\Agil307\nbproject\build-impl.xml:269: Error running C:\Program Files\Java\jdk1.8.0_31\bin\javac.exe compiler
FALHA NA CONSTRUÇÃO (tempo total: 49 segundos)
Lines for the above errors in file build-impl.xml
928<target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
929 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
930 <copy todir="${build.classes.dir}">
931 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
932 </copy>
933</target>
269<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
270 <src>
271 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
272 <include name="*"/>
273 </dirset>
274 </src>
If I remove the commons-email-1.4
library and remove the project code it builds smoothly.
I do not know what I can do to solve the problem.
Just for registration I'm using JDK 8.