You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Conor MacNeill <co...@cortexebusiness.com.au> on 2001/01/24 14:04:31 UTC

Changes to new build process

Pete,

I have made a few changes to the new build process.

The construct
    <zip zipfile="${dist.base}/${dist.name}-bin.zip"
         basedir="${dist.dir}/.."
         includes="${dist.dir}/**"/>
would fail for values of "dist.dir" which are not a simple directory.
Absolute paths and paths containing a / will fail to work as expected. I
have moved the building of distribution zips out of dist into a bin-dist
target, called from the full-dist target. I think that is reasonable.

There are some remaining issues to think about:

Ant's Exec/Execute code expects ant.home/bin to contain the scripts ant
uses at runtime to launch external commands. As the bootstrap process no
longer creates a bin directory, any such tasks used in the ant build (such
as chmod) may fail. It may work, depending on how far into building it
happens, but it is a danger, IMHO. This may also be a problem with the
install.target using ant.home if installing into an empty directory. I was
tempted to introduce a ant.install.dir value to keep it distinct from
ant.home.

total-clean does not remove dist directory. Not a big deal

If you do a "build install" and it happens that you need to do a bootstrap,
the bootstrap will end up calling build.bat and perform an install into "."
:-(

Conor




Re: Changes to new build process

Posted by Peter Donald <do...@apache.org>.
At 11:47  25/1/01 +1100, Peter Donald wrote:
>>If you do a "build install" and it happens that you need to do a bootstrap,
>>the bootstrap will end up calling build.bat and perform an install into "."
>>:-(
>
>fixed.


err - not fixed ;)

Perhaps the best way is an install.dir param.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


RE: Changes to new build process

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> From: Peter Donald [mailto:donaldp@apache.org]
> >The construct
> >    <zip zipfile="${dist.base}/${dist.name}-bin.zip"
> >         basedir="${dist.dir}/.."
> >         includes="${dist.dir}/**"/>
> >would fail for values of "dist.dir" which are not a simple directory.
> >Absolute paths and paths containing a / will fail to work as expected.
>
> I am not 100% sure why could you explain. The only thing I can think of is
> the include not working - in which case we could replace it with
> "${dist.dir}/../**" which should work, no ?

Let us say that dist.dir = dist/special.

Then the above becomes

<zip zipfile="${dist.base}/${dist.name}-bin.zip"
         basedir="dist/special/.."
         includes="dist/special/**"/>

There will be no dist/special directory in dist which is where dist/special
resolves to. Therefore nothing will be in the zip. Absolute paths fail in a
similar fashion. I don't think your proposed change would fix that. Anyway,
it is a moot point now, since this zip is only performed by the bin-dist
target and the dirs are always of the correct form.

Conor


Re: Changes to new build process

Posted by Peter Donald <do...@apache.org>.
At 12:04  25/1/01 +1100, Conor MacNeill wrote:
>Pete,
>
>I have made a few changes to the new build process.

kewl ;)

>The construct
>    <zip zipfile="${dist.base}/${dist.name}-bin.zip"
>         basedir="${dist.dir}/.."
>         includes="${dist.dir}/**"/>
>would fail for values of "dist.dir" which are not a simple directory.
>Absolute paths and paths containing a / will fail to work as expected. 

I am not 100% sure why could you explain. The only thing I can think of is
the include not working - in which case we could replace it with
"${dist.dir}/../**" which should work, no ?

>I
>have moved the building of distribution zips out of dist into a bin-dist
>target, called from the full-dist target. I think that is reasonable.
+1

>There are some remaining issues to think about:
>
>Ant's Exec/Execute code expects ant.home/bin to contain the scripts ant
>uses at runtime to launch external commands. As the bootstrap process no
>longer creates a bin directory, any such tasks used in the ant build (such
>as chmod) may fail. It may work, depending on how far into building it
>happens, but it is a danger, IMHO. 

Right - current build.xml *should* be fine but is definetly a risk if in
the future we use exec targets earlier in the build. I guess we should fix
this.

>total-clean does not remove dist directory. Not a big deal

it should ... actually "clean" should do it ;/ 

>If you do a "build install" and it happens that you need to do a bootstrap,
>the bootstrap will end up calling build.bat and perform an install into "."
>:-(

fixed.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*