not your typical multiple jars in a project question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

not your typical multiple jars in a project question

through much trial and error, thanks to tim's suggestion, i did get this
to work. i created a project with an existing ant script [1], and had to
hand-edit project.xml [2] to add the "export" elements. the ant script
can be just about anything. i use the one below because it has targets
my scripts depend upon.

when you make another project dependent on this project, all the
exported jarfiles are, well, exported. but the project path is an
absolute path and placed in nbproject/private/ so i
moved this to nbproject/ (since nbproject/private is
not checked into the subversion repository) and made it relative
(../extras-jfreechart) in all the projects that depend upon

it seems as though relative paths are used only when they reside within
the project. for example, if i have one project with a "lib" directory
with several precompiled jars, and i make the project depened upon these
jars, then a raltive path is used, and this is placed in but, if these jars were to reside anywhere outside
the project itself, an absolute path would be used, and placed in hope this makes sense.

also, i think i found a bug. somtimes, when i made a project depend upon
extras-jfreechart, it failed to setup the path to this project properly
in project.xml. for example:


note the script element. this should be:


this has the effect of producing something like this in the deps-clean
target in build-Impl.xml:

    <ant target="clean" inheritall="false" antfile="build.xml"/>

instead of:

    <ant target="clean" inheritall="false"

so you see an error message like:

    build-impl.xml:482: ant task calling a target that depends on its
parent target 'deps-clean'.

if you edit project.xml appropriately and rebuild build-Impl.xml (don't
remember how), everything is ok.

thanks much.



<?xml version="1.0" encoding="UTF-8"?>
<project name="extras-jfreechart" default="dist" basedir=".">
    <target name="compile" />
    <target name="dist" depends="compile" />
    <target name="jar" />
    <target name="clean" />


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="">
        <general-data xmlns="">
            <!--Do not use Project Properties customizer when editing
this file manually.-->
                <action name="build">
                <action name="clean">
                <action name="rebuild">
                    <ide-action name="build"/>
                    <ide-action name="clean"/>
                    <ide-action name="rebuild"/>