You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Berin Loritsch <bl...@apache.org> on 2002/04/04 16:28:55 UTC

Build Failure with strange location of jar

build.fail:
     [echo]
 
+-----------------------------------------------------------------+
            + BUILD FAILURE
|
 
+-----------------------------------------------------------------+
            |
|
            | The dependency-checking system tried to build the project:
|
            |   D:\projects\jakarta-avalon-excalibur\all/../instrument
            | which should have provided the property:
|
            |   excalibur-instrument.jar =
/opt/jakarta-avalon-excalibur/instrum
ent/build/lib/excalibur-instrument-0.1.jar
            | However, after the build, no such file exists.
|
            |
|
            | Typically this is because the required project changed the
name |
            | of the jar it produces. If so, please correct this in
|
            | default.properties, ant.properties.sample or
ant.properties     |
 
+-----------------------------------------------------------------+


BUILD FAILED

D:\projects\jakarta-avalon-excalibur\depchecker.xml:237: Failed
Requirement


First, the Dependency checking is great.  However,
excalibur-instrument.jar
seems to have a hard-coded path somewhere that I cannot trace.  My stuff
is
located at /projects/jakarta-avalon-excalibur/*** and not in /opt.  If
anyone
does not have Excalibur in /opt they will see this message.

How is it coming up with that name?


"They that give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."
                - Benjamin Franklin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Build Failure with strange location of jar

Posted by Peter Donald <pe...@apache.org>.
On Fri, 5 Apr 2002 11:13, Jeff Turner wrote:
> > Could you put the above property reading at the bottom of the precedence
> > chain?
>
> I'm okay to move it, if we can also source ${user.home}/build.properties
> at the beginning.

okay.

I understand why you do things like that - I actually argued for making ant 
effectively do something like

<property file="${ant.home}/site.properties"/>

to load per-site defaults (but still allow them to be overidden by users). 
Unfortunately this was -1'ed at the time though it may be possible to change 
this in next ant revision - hopefully ;)

> The thing that really swayed me was the order of sourcing
> './ant.properties' and '../ant.properties'. If you're going to source
> ${user.home} last, then I'm sure you'd also want the order there to be:
>
> <property file="ant.properties"/>
> <property file="../ant.properties"/>

+1

-- 
Cheers,

Pete

*-------------------------------------*
| Does the name `Pavlov' ring a bell? |
*-------------------------------------*


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Build Failure with strange location of jar

Posted by Jeff Turner <je...@socialchange.net.au>.
On Fri, Apr 05, 2002 at 09:26:50AM +1000, Peter Donald wrote:
> On Fri, 5 Apr 2002 09:23, Jeff Turner wrote:
> > <property file="${user.home}/.ant.properties"/>
> 
> Could you put the above property reading at the bottom of the precedence 
> chain?

I'm okay to move it, if we can also source ${user.home}/build.properties
at the beginning.

The rest of this email describes why I changed the order in the first
place. I did a lot of thinking about the precedence issue. This is the
"complex, multifaceted issue" I mentioned in my first email ;P


> Otherwise I can't overide my user settings for a sepcific project. An 
> example where this is useful is for things like setting the jikes compiler. 
> Some projects wont compile under jikes so I want to be able disable jikes for 
> that project but in all other cases I want to use jikes.

The primary use-case for the new order is the setting of ${lib.repo}.
With the coming of Maven, many people are going to have jar
repositories. They want to set ${lib.repo} in their home dir, and then
projects can define ${lib.repo}/whatever.jar. That won't work unless you
source ${user.home}/.ant.properties first.

So there's valid use-cases on both sides.

But hey, Excalibur has very few external deps, and if it's main
developers liked the old system, why change?

The thing that really swayed me was the order of sourcing
'./ant.properties' and '../ant.properties'. If you're going to source
${user.home} last, then I'm sure you'd also want the order there to be:

<property file="ant.properties"/>
<property file="../ant.properties"/>

for consistency; most-project-specific to least-project-specific.

Unfortunately, there's a crucial feature of the dependency checking
system which requires the other order: the ability to build
"standalone" (eg from a source distribution).

Let me explain..

We need components to be packaged as source distributions. They need to
be buildable without relying on ../*. That's a problem when the
depchecking relies on '../depchecker.xml'.

The solution I came up with is this: define a variable
${depchecker.prefix}, containing the component-relative path to
depchecker.xml. In the build.xml files, use it as follows:

<ant
	antfile="${depchecker.prefix}/depchecker.xml"
	target="checkRequiredFile">
	...
</ant>

In ./default.properties, set it to "./".
In ../default.properties, set it to "../".
Then source ../default.properties before ./default.properties.

So..

If we're downloaded from CVS, ../default.properties will exist, and will
set ${depchecker.prefix} to "../", correctly locating ../depchecker.xml.

If we're packaged as a source distribution, ../default.properties won't
exist, so ./default.properties is used, and ${depchecker.prefix} will be
"./". When we create the source distribution, we'll copy
../depchecker.xml to ./, so that path will be correct.

Cunning :)

So for this to work, the order must be:

<property file="../ant.properties"/>
<property file="ant.properties"/>

And if that's the order, then for consistency, we should adopt
least-specific-to-most-specific ordering:

<property file="${user.home}/.ant.properties"/>
<property file="../ant.properties"/>
<property file="ant.properties"/>

So for the sake of consistency, as well as conforming to how the
Turbine/jar repository world does things, I adopted that order. 


--Jeff

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Build Failure with strange location of jar

Posted by Peter Donald <pe...@apache.org>.
On Fri, 5 Apr 2002 09:23, Jeff Turner wrote:
> <property file="${user.home}/.ant.properties"/>

Could you put the above property reading at the bottom of the precedence 
chain? Otherwise I can't overide my user settings for a sepcific project. An 
example where this is useful is for things like setting the jikes compiler. 
Some projects wont compile under jikes so I want to be able disable jikes for 
that project but in all other cases I want to use jikes.

> <property file="../ant.properties"/>
> <property file="ant.properties"/>
> <property file="../default.properties"/>
> <property file="default.properties"/>
>
>
> --Jeff
>
> > "They that give up essential liberty to obtain a little temporary safety
> >  deserve neither liberty nor safety."
> >                 - Benjamin Franklin

-- 
Cheers,

Pete

"You know what a dumbshit the 'average man' on the street is? Well, by
definition, half of them are even dumber than that!"
					J.R. "Bob" Dobbs

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Build Failure with strange location of jar

Posted by Jeff Turner <je...@socialchange.net.au>.
On Thu, Apr 04, 2002 at 09:28:55AM -0500, Berin Loritsch wrote:
> 
> build.fail:
>      [echo]
> The dependency-checking system tried to build the project: |
> D:\projects\jakarta-avalon-excalibur\all/../instrument
> which should have provided the property:
>
> excalibur-instrument.jar =
> /opt/jakarta-avalon-excalibur/instrument/build/lib/excalibur-instrument-0.1.jar
...

> First, the Dependency checking is great.  However,
> excalibur-instrument.jar seems to have a hard-coded path somewhere
> that I cannot trace.  My stuff is located at
> /projects/jakarta-avalon-excalibur/*** and not in /opt.  If anyone
> does not have Excalibur in /opt they will see this message.
> 
> How is it coming up with that name?

You have an ant.properties file, either all/ant.properties, or
ant.properties in excalibur's root, using the default ${base.path} which
is /opt.

Assuming:
 - you don't want to build baxter (requires jmxri.jar)
 - you have junit.jar in your ${ant.home}/lib
 - you have jakarta-avalon and jakarta-avalon-logkit in the same
   directory as jakarta-avalon-excalibur

Then you do not need to create *any* ant.properties files. The default
jar properties (in defaults.properties) will be correct. If those
assumptions are correct, then any ant.properties files are likely to
just cause trouble.

Also, when trying to debug things like this, keep in mind that the
ordering of properties files has changed to:

<property file="${user.home}/.ant.properties"/>
<property file="../ant.properties"/>
<property file="ant.properties"/>
<property file="../default.properties"/>
<property file="default.properties"/>


--Jeff

> "They that give up essential liberty to obtain a little temporary safety
>  deserve neither liberty nor safety."
>                 - Benjamin Franklin

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>