|Re: Eclipse ANT task SUCCEED but do not work [message #1719749 is a reply to message #1719715]
||Mon, 11 January 2016 19:16
| Russell Bateman
Registered: July 2009
Location: Provo, Utah, USA
On 01/11/2016 09:22 AM, Cosme Fulanito wrote:|
> This is the code of my build.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="compile-game" default="compile" basedir=".">
> <property name="build.compiler"
> <target name="compile" description="build class files">
> <echo message = "Starting compilation." level = "info"/>
> <eclipse.refreshLocal resource="mygame/src" depth="infinite"/>
> <eclipse.incrementalBuild project="mygame" kind="incremental"/>
> <echo message = "Compile complete." level = "info"/>
> This is the output when I do /home/xxxxxx/eclipse/eclipse -application
> org.eclipse.ant.core.antRunner -f build.xml
> Buildfile: build.xml
> [echo] Starting compilation.
> [echo] Compile complete.
> BUILD SUCCESSFUL
> BUILD SUCCESSFUL
> Total time: 1 second
> This happens even if I put nonsense in the options... like a wrong
> project name. It also SUCCESS when I put wrong code in my java files.
> I am missing something? I can compile from Eclipse but I want to do this
> from command line so I can integrate with other tool.
> What I expect from this is that if I have an error in the project, this
> will fail. And if it doesn't, it will update the .class files inside the
> project. Also I'd like to be able to run and/or export to jar the
> updated code from command line but that's other step :)
> Any help is appreciated. Thanks!
First, this forum is about setting Eclipse up and using it, not about
general programming issues whether for Java, C/C++, Python, Ant, etc.
Still, to help out, ...
This is the entire code of build.xml?
When I look at your ant code and your problem statement, I'm puzzled as
to why I don't see you using the ant <javac task in your code. It's what
compiles Java code.
Your best and fastest bet is to get some examples of folks' existing
build.xml, copying then tweaking them for your use.
And ask questions about ant on stackoverflow.com setting the ant and
Powered by FUDForum
. Page generated in 0.02785 seconds