The Source for Java Technology Collaboration
User: Password:



Rich Unger

Rich Unger's Blog

NB Module Suite building tip

Posted by richunger on October 24, 2005 at 12:45 PM | Comments (2)

I have a module suite with many modules in it, and the default run/debug/profile targets depend on the 'build' target. This makes sense. You can't run it if you haven't built it, right? Only, most of the time when I actually want to run my app, it's already in a built state, or I just need to build one module, and the suite's build target takes forever to no-op through all the other modules. So, I added the following to my suite's build.xml file:
    <!-- override run/debug/profile to NOT build all the modules first.
         Saves lots of time, but you need to remember to do a "Build All" in the IDE
         or run the "build" target in the ant script if you really do need to
         build. -->
    <target name="debug" depends="-init" description="Debug vbuilder in NetBeans IDE">
        <ant antfile="${harness.dir}/run.xml" target="debug"/>
    </target>
    <target name="profile" depends="-init" description="Profile vbuilder in NetBeans IDE">
        <ant antfile="${harness.dir}/run.xml" target="profile"/>
    </target>
    <target name="run" depends="-init" description="Run V-Builder">
        <ant antfile="${harness.dir}/run.xml" target="run"/>
    </target>
Works like a charm. ...what doesn't work like a charm is CDATA blocks in this blog editor. How frustrating!

Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Isn't there a 'Build Projects on Classpath' flag like it is in J2SE projects for the libraries options?

    Posted by: herkules on October 25, 2005 at 07:05 AM

  • FYI - in recent builds, you've gotta change the depends= clause into

    depends="-init,-jdk-init"

    Otherwise, when you run the IDE it might not find your jdkhome to run the target with.

    -- Tor

    Posted by: tnorbye on November 20, 2006 at 06:09 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds