You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Mike Rettig <mi...@gmail.com> on 2005/05/06 18:56:17 UTC

Adding Jar support to the import task

All,

Does the current import task support importing build xml's from jar
files? I haven't found any examples and the source doesn't look like
it supports this.

Can this be added? This would make creating reusable builds much easier.

example:

<project name="my.project">
  <property name="dir.source" value="src/java"/>
  <import jar="lib/my.build.system.jar" file="buildfiles/default-build.xml"/>
</project>

I currently work on a large project that has about 30 different
builds. Reusing build files has been difficult. We already have a
system that allows us to publish and reuse jars across builds, so this
seems like the logical way to reuse the build files.

Ultimately, this seems like a reasonable way for people to build
standard build files to be distributed to the masses.  For instance,
you could do a maven clone as a set of imported build files from a
jar.

<project name="my.project">
  <import jar="lib/maven-clone-1.0.jar" file="buildfiles/default-build.xml"/>
</project>

I can provide help for developing and testing. The implementation
shouldn't be difficult.

Thoughts? Comments?

Regards,

Mike Rettig

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Adding Jar support to the import task

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Mike Rettig wrote:
> All,
> 
> Does the current import task support importing build xml's from jar
> files? I haven't found any examples and the source doesn't look like
> it supports this.
> 
> Can this be added? This would make creating reusable builds much easier.
...

You bet.

> <project name="my.project">
>   <import jar="lib/maven-clone-1.0.jar" file="buildfiles/default-build.xml"/>
> </project>
> 
> I can provide help for developing and testing. The implementation
> shouldn't be difficult.
> 
> Thoughts? Comments?

I wrote the import task exactly for this purpose. Unfortunately only the 
vanilla import functionality got accepted.

http://antworks.krysalis.org/

It was already offered to Ant some time ago.
AFAIK the offer still stands.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Adding Jar support to the import task

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 6 May 2005, Alexey Solofnenko <tr...@gmail.com> wrote:

> There was a discussion to support URLs. URLs should cover this use
> case.

More than just discussion, the current CVS HEAD already supports this.

The main problem is how to work with the ant.file.IMPORTED_NAME
properly.  As long as we assume that people who put their importable
files into jars (or on websites) know what they are doing and never
try to resolve relative URIs, things should work as expected.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Adding Jar support to the import task

Posted by Jeffrey E Care <ca...@us.ibm.com>.
Did we ever resolve the issue of the implicit reference to the imported 
file not mapping very well to files imported from archives?

Just as a point of reference we manage to build WebSphere Application 
Server with vanilla imports as they are today and our build logic is 
common across 30+ unique top-level builds and well over 750 sub-builds. 
Every project is different of course but I think this shows that the size 
of the project is not really a factor.

JEC
-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis




Alexey Solofnenko <tr...@gmail.com> 
05/06/2005 01:05 PM
Please respond to
"Ant Developers List"


To
Ant Developers List <de...@ant.apache.org>, Mike Rettig 
<mi...@gmail.com>
cc

Subject
Re: Adding Jar support to the import task






There was a discussion to support URLs. URLs should cover this use case.

- Alexey.

On 5/6/05, Mike Rettig <mi...@gmail.com> wrote:
> 
> All,
> 
> Does the current import task support importing build xml's from jar
> files? I haven't found any examples and the source doesn't look like
> it supports this.
> 
> Can this be added? This would make creating reusable builds much easier.
> 
> example:
> 
> <project name="my.project">
> <property name="dir.source" value="src/java"/>
> <import jar="lib/my.build.system.jar" file="buildfiles/default-build.xml
> "/>
> </project>
> 
> I currently work on a large project that has about 30 different
> builds. Reusing build files has been difficult. We already have a
> system that allows us to publish and reuse jars across builds, so this
> seems like the logical way to reuse the build files.
> 
> Ultimately, this seems like a reasonable way for people to build
> standard build files to be distributed to the masses. For instance,
> you could do a maven clone as a set of imported build files from a
> jar.
> 
> <project name="my.project">
> <import jar="lib/maven-clone-1.0.jar" file="buildfiles/default-build.xml
> "/>
> </project>
> 
> I can provide help for developing and testing. The implementation
> shouldn't be difficult.
> 
> Thoughts? Comments?
> 
> Regards,
> 
> Mike Rettig
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 


-- 
Alexey N. Solofnenko trelony at gmail.com <http://gmail.com>
home: http://trelony.cjb.net/
Pleasant Hill, CA (GMT-8 hours usually)


Re: Adding Jar support to the import task

Posted by Alexey Solofnenko <tr...@gmail.com>.
There was a discussion to support URLs. URLs should cover this use case.

- Alexey.

On 5/6/05, Mike Rettig <mi...@gmail.com> wrote:
> 
> All,
> 
> Does the current import task support importing build xml's from jar
> files? I haven't found any examples and the source doesn't look like
> it supports this.
> 
> Can this be added? This would make creating reusable builds much easier.
> 
> example:
> 
> <project name="my.project">
> <property name="dir.source" value="src/java"/>
> <import jar="lib/my.build.system.jar" file="buildfiles/default-build.xml
> "/>
> </project>
> 
> I currently work on a large project that has about 30 different
> builds. Reusing build files has been difficult. We already have a
> system that allows us to publish and reuse jars across builds, so this
> seems like the logical way to reuse the build files.
> 
> Ultimately, this seems like a reasonable way for people to build
> standard build files to be distributed to the masses. For instance,
> you could do a maven clone as a set of imported build files from a
> jar.
> 
> <project name="my.project">
> <import jar="lib/maven-clone-1.0.jar" file="buildfiles/default-build.xml
> "/>
> </project>
> 
> I can provide help for developing and testing. The implementation
> shouldn't be difficult.
> 
> Thoughts? Comments?
> 
> Regards,
> 
> Mike Rettig
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 


-- 
Alexey N. Solofnenko trelony at gmail.com <http://gmail.com>
home: http://trelony.cjb.net/
Pleasant Hill, CA (GMT-8 hours usually)