ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Brown" <da...@davidwbrown.name>
Subject Re: NetBeans target "run" to .bat file
Date Fri, 28 Mar 2008 21:29:59 GMT
Hello Andrew, the interesting or the needed information from ant -debug is the classpath used
by Ant plus a myriad of other useful information. The ant -p output should show the default
target. Also, you will see alternative targets to run such as: testing or minimally a clean
target. When I debug a build.xml the first two things I do are run the two commands stated
above. You need to get one of the Ant user gurus to look at your build.xml. I also use NetBeans
and Eclipse but I always study the build.xml albeit machine or human generated. As a result
I always reduce if not eliminate my build and deploy problems. There are enough issues with
just the target development without incurring build and deployment issues. This is why you
will need to understand the Ant build.xml. See: Hatcher and Loughran Ant book (Google for
it). Maybe if you get lucky Steve will answer your questions. HTH.

Andrew n marshall wrote ..
> 
> David Brown wrote:
> > Hello Andrew, fixing the build.xml would be the better solution in the long-run.
> Well, it is an automatically generated and maintained Ant build file 
> created by NetBeans.
> The Ant build seems to work great, even independent of NetBeans, so I 
> don't even know what to "fix".
> And I still need to create a batch file that runs without Ant for my 
> non-developers.
> 
> So, I'm not convinced that is the right approach.
> > What interesting output does ant -debug display? And, what is the default target
> (ant -p)?
> >   
> All of the targets are imported from nbproject/build-impl.xml, the 
> NetBeans managed file.  The default target is "default", which is 
> described as "Build and test whole project".
> 
> "ant -debug" spews lots of information.  Nothing looks particularly 
> "interesting" in the context of this problem.  Again, the ant build file 
> runs fine.
> 
> 
> Anm
> 
> 
> > Andrew n marshall wrote ..
> >   
> >> This may be more of a general Java question than a specific Ant 
> >> question, but here it goes....
> >>
> >> I have a project that I built with NetBeans.  NetBeans gave me a nice 
> >> ant file that works great.  But I need non-developers who don't have ant 
> >> installed to be able to run it.
> >>
> >> When I run "ant -v run", I get this:
> >> (This is going to word wrap horribly. Sorry.)
> >>
> >> run:
> >> dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath}
> >> from path as it doesn't exist
> >> dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath}
> >> from path as it doesn't exist
> >>      [java] Executing 'C:\local\Java\jdk1.5.0_15\jre\bin\java.exe' with arguments:
> >>      [java] '-classpath'
> >>      [java] 'D:\Projects\SASO\sandbox\saso\lib\elutil\je4util.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\lib\swing-layout-1.0.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\lib\vecmath.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\build\classes'
> >>      [java] 'edu.usc.ict.saso.testgui.Main'
> >>      [java]
> >>      [java] The ' characters around the executable and arguments are
> >>      [java] not part of the command.
> >> dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath}
> >> from path as it doesn't exist
> >> dropping D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\${libs.swing-layout.classpath}
> >> from path as it doesn't exist
> >>
> >>
> >>
> >> ... and proceeds to run fine.
> >>
> >> I copy, pasted, and editted that output down to a .bat file looking like 
> >> this:
> >>
> >> C:\local\Java\jdk1.5.0_15\jre\bin\java.exe -classpath "D:\Projects\SASO\sandbox\saso\lib\elutil\je4util.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\lib\swing-layout-1.0.jar;D:\Project\SASO\sandbox\saso\tools\JavaTestGUI\lib\vecmath.jar;D:\Projects\SASO\sandbox\saso\tools\JavaTestGUI\build\classes"
> >> edu.usc.ict.saso.testgui.Main
> >>
> >> At least on my own machine, it should run exactly like it does in Ant, 
> >> right?
> >>
> >> But it doesn't.  It throws a NoClassDefFoundError when it can't find the 
> >> javax/vecmath/Tuple3f inside the vecmath.jar.  Apparently the -classpath 
> >> in the batch file is not getting loaded in the same way it is in the Ant 
> >> run target.
> >>
> >> HELP!!  What is my batch file missing to make this run?
> >>
> >>
> >> Anm
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>     
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message