sdx-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sdx-developers] RE : Marche plus :-(


From: Martin Sevigny
Subject: [sdx-developers] RE : Marche plus :-(
Date: Sat, 21 Sep 2002 18:27:38 +0200

Salut,

>  <target name="compile" depends="javacc_check,prepare-src-main"
> description="Compiles the source code" if="javacc.present">
> 
> Or, "javacc.present" est faux. Je ne connais pas trop Ant, 
> mais je trouve bizarre que la target "package" qui dépend de 
> "compile" ait pu être exécutée...

Selon la doc Ant 1.5 (section Using Ant ; Targets) :

It should be noted, however, that Ant's depends attribute only specifies
the order in which targets should be executed - it does not affect
whether the target that specifies the dependency(s) gets executed if the
dependent target(s) did not (need to) run. 

Bref, ce n'est pas un bogue de notre build mais un feature ;-)

Il y a une task "fail" :

Exits the current build (just throwing a BuildException), optionally
printing additional information.

The message of the Exception can be set via the message attribute or
character data nested into the element.

Quelque chose comme :

<fail message="Something wrong here."/>

On devrait supprimer le "if" de la target "compile", et plutôt avoir une
autre target ("fail"?) avec un unless="javacc.present" qui contiendrait
simplement un <fail/>. Et compile devrait dépendre de "fail"...

Ou à peu près...

A bientôt,

Martin Sévigny





reply via email to

[Prev in Thread] Current Thread [Next in Thread]