3
In my project I needed to add the option of sending emails I added the library commons-email-1.4
I wrote all the code and tested it. So far everything perfect but when cleaning and building the file . jar of the application, here comes 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 referring to above errors in the 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 library commons-email-1.4
and remove the code from the project it builds smoothly.
I don’t know what I can do to solve the problem.
Just for the record I’m using JDK 8.
We have little information to work with. "Next error happened while running this line:" and doesn’t say which line. Is it the 269 line of build-impl.xml? Or another line? It would be interesting to post the chunk of build-impl.xml stating which line is 269 (and 929 too, which is the information we have).
– Piovezan
I will supplement the question with the building lines.
– DevAgil
netbeans does not show what error the compiler accuses?
– Victor Stafusa
How many and which libraries you have in the project?
– Victor Stafusa