Re: example of correctly consuming an Ant project programmatically

2012-05-31 Thread Mitch Gitman
ust be a few out there), that would be great. On Thu, May 31, 2012 at 2:17 PM, Nicolas Lalevée wrote: > > Le 31 mai 2012 à 18:33, Mitch Gitman a écrit : > > > Can someone point me to a good, reference example of consuming an Ant > > project programmatically? The code need

example of correctly consuming an Ant project programmatically

2012-05-31 Thread Mitch Gitman
Can someone point me to a good, reference example of consuming an Ant project programmatically? The code needs to have access to the org.apache.tools.ant.Project object. I have been able to do this, but with just one catch. Below are the relevant lines of Java code: Project project = new Project()

Re: Ant + Spring = classpath purgatory

2011-01-29 Thread Mitch Gitman
n executing task uses the ClassLoader obtained by LoaderUtils.getContextClassLoader() rather than the task's own AntClassLoader. On Sat, Jan 29, 2011 at 12:26 AM, Mitch Gitman wrote: > Here's another old post that corroborates the one I linked to: > http://www.mail-archive.com/u

Re: Ant + Spring = classpath purgatory

2011-01-29 Thread Mitch Gitman
the default one, as obtained by LoaderUtils.getContextClassLoader(), represents. This goes back to my observation that this sort of problem doesn't arise elsewhere. Note. I'm using Ant 1.7.1. On Fri, Jan 28, 2011 at 11:33 PM, Mitch Gitman wrote: > I have a Spring-based application

Ant + Spring = classpath purgatory

2011-01-28 Thread Mitch Gitman
I have a Spring-based application that I'm exposing through an Ant task, among other interfaces. The moment where I run into trouble is when the application tries to use Spring's ClassLoader-based code to load a Spring application context: ApplicationContext applicationContext = new ClassP

Re: checkmodified=”true” on a chain resolver’s child resolver

2010-09-14 Thread Mitch Gitman
I’m very pleased to say… My bad. I’ve managed to get checkmodified behaving exactly as I would expect it to behave on a child resolver within a chain. Looks like there was some weirdness about a test I was running. On Sun, Sep 5, 2010 at 5:23 PM, Mitch Gitman wrote: > I’m using Ivy 2.2.0-

Re: latest-revision latest-strategy & integration versions

2010-08-25 Thread Mitch Gitman
ild-base.xml > > > Cheers, > Geoff > > > On Wed, Aug 25, 2010 at 3:14 AM, Mitch Gitman wrote: > > > Bumping this to the top to see if I can get any takers. I'm particularly > > interested in seeing how anyone was able to work a timestamp or > buildnumber

Re: OS specific artifacts

2010-08-19 Thread Mitch Gitman
1) It sounds like what you "want" to do is create two different files in the same Ivy module and give them the same name, even though they are two different files. This doesn't make sense. I would suggest, instead of trying to find a way to work around your current state of things, think about wha

Re: OSGI and IVY

2010-07-20 Thread Mitch Gitman
I've never had to get this working myself, so my understanding may be a bit off here. It strikes me that, at build time, there are two directions of translation: 1. MANIFEST.MF to ivy.xml: where you want to consume OSGi bundles as if they were an Ivy repo 2. ivy.xml to MANIFEST.MF: when you want to

Re: Partial transitive retrieve

2010-07-08 Thread Mitch Gitman
compilation - > with all the relevant confs - just the retrieve that collects the > dependencies into the ear/lib folder doesn't work correctly. > > I assume a combination of ivy:cachefileset and an ant copy task would have > the same effect, wouldn't it? > > > 2

Re: Use ivy-dependencies to create ant-tasks

2010-03-10 Thread Mitch Gitman
Marc, doing everything at once at init sounds a bit heavyweight and monolithic. Imagine you're resolving and retrieving 15 different task libraries when all you need for a given build is two or three. Instead, I would obtain tasks on an as-needed basis. So for example, the moment you need a partic

Re: I think the answer to this question is no

2010-01-19 Thread Mitch Gitman
rol the Ant-agnostic logging. Not a question so much as thinking out loud. On Mon, Jan 18, 2010 at 2:05 PM, Dominique Devienne wrote: > On Sun, Jan 17, 2010 at 11:30 PM, Mitch Gitman wrote: > > Is there any programmatic mechanism within Ant to arbitrarily query what > the > > cu

I think the answer to this question is no

2010-01-17 Thread Mitch Gitman
But it doesn't hurt to ask. Is there any programmatic mechanism within Ant to arbitrarily query what the current log level is? For example, can the task I'm implementing find out whether the user has invoked Ant with the -verbose option? The analogous functionality in Commons Logging or Log4j woul

Re: How to programaticly gather all the artifacts from an ivy file.

2009-10-08 Thread Mitch Gitman
The standard way to gather the artifacts for a given Ivy conf is to invoke the following Ant tasks in sequence: 1. ivy:resolve 2. ivy:cachefileset If you want to accomplish the same programmatically, I would suggest looking into how you can leverage these existing tasks or the top-level APIs they

Re: Publishing 3rd party libraries to local repo

2009-10-05 Thread Mitch Gitman
Answers inline. On Mon, Oct 5, 2009 at 5:04 AM, Troy Self wrote: > Hello, > > I am new to Ivy and am trying to setup a repository for my software team. I > have > gone through all of the tutorials on the web site and have some questions. > > Is there a tried and true approach for quickly creatin

Re: cobertura-instrument--anyone seen this?

2009-05-12 Thread Mitch Gitman
on 0 classes. This is true even in verbose mode. I checked if Cobertura 1.8 behaved differently. Sure enough, it started spewing out ClassNotFoundExceptions. On Tue, May 12, 2009 at 2:06 PM, Mitch Gitman wrote: > Thanks, Francis. Actually, just after I posted this query, I thought, "I > b

Re: cobertura-instrument--anyone seen this?

2009-05-12 Thread Mitch Gitman
ollow-up eventually when I figure it out. On Tue, May 12, 2009 at 11:49 AM, Francis Galiegue wrote: > Le Tuesday 12 May 2009 20:31:10 Mitch Gitman, vous avez écrit : > > I'm not sure there's a better forum for this question. I'm invoking > > the *cobertura-instrume

cobertura-instrument--anyone seen this?

2009-05-12 Thread Mitch Gitman
I'm not sure there's a better forum for this question. I'm invoking the *cobertura-instrument *Ant task for instrumenting classes for Cobertura code coverage. Very simplistic implementation: The output I get though is this: [cobertura:cobertura-instrument] C

Re: IvyDE 2.0.0.beta1 does not download sources nor javadocs

2009-02-11 Thread Mitch Gitman
Nicolas, I'm trying to understand the impact of this change. Suppose an Ivy module publishes artifacts for source and Javadoc. Presumably, there are "source" and "javadoc" Ivy configurations, or the like. I don't quite see the relevance then of the following fields in the Ivy plugin configuration

Re: jar task collapsing non-Java, non-class files

2009-01-20 Thread Mitch Gitman
bit of the blame with Eclipse. On Tue, Jan 20, 2009 at 3:36 PM, Mitch Gitman wrote: > Here's a little experiment that reduces the problem to its simplest case. > Suppose for argument's sake I'm not jarring any class files. Here's a > passage t

Re: jar task collapsing non-Java, non-class files

2009-01-20 Thread Mitch Gitman
java" To *this*: includes="**/*.xml" Suddenly now, the jar task collapses the directory structure. On Tue, Jan 20, 2009 at 3:25 PM, Mitch Gitman wrote: > I'm using a fileset as a nested element of the jar Ant task. When the > fileset consists of .class files or .java fi

jar task collapsing non-Java, non-class files

2009-01-20 Thread Mitch Gitman
I'm using a fileset as a nested element of the jar Ant task. When the fileset consists of .class files or .java files, the archiving takes place correctly: * com * mycompany * myproject * SomeClass.class But when the fileset consists of some other kind of file, like XML fil

Re: Newbie: How to skip publish to local repository

2009-01-20 Thread Mitch Gitman
David, forgive me beforehand for answering your question (A) with another question and then (B) by sidestepping it. Could you clarify what you mean by "local repository"? I think in the usual Ivy parlance, this means local to an individual developer's machine. Do you mean local to your machine or

Re: scriptdef unable to load an Ant API class

2009-01-03 Thread Mitch Gitman
gument And not as: public *static *class TagArgument No wonder I shy away from inner classes. On Fri, Jan 2, 2009 at 9:30 PM, Mitch Gitman wrote: > I have a *scriptdef *to do some customization of the *javadoc *Ant task. > What I want to do is pass to the *scriptdef *a tag element pre

scriptdef unable to load an Ant API class

2009-01-02 Thread Mitch Gitman
I have a *scriptdef *to do some customization of the *javadoc *Ant task. What I want to do is pass to the *scriptdef *a tag element precisely like the tag element that can be a child of the javadoc task element. The class that corresponds to the tag element is *Javadoc.TagArgument*. Below is the r

Re: Noob Question, Transitive Dependencies?

2008-12-18 Thread Mitch Gitman
ith, Michael * < michael.griff...@fda.hhs.gov> wrote: > Mitch, > > Thanks for the reply. It seems as though I still have to go through and > add each jar as an artifact. I'm not sure what the distinction is > between a publication and a dependency... > > MG &g

Re: Ant 1.7 doesn't like antcall with inheritrefs

2008-12-17 Thread Mitch Gitman
Disregard this post. Turns out in the Ant target called by *antcall*, I was using refid below, not torefid: In other words, my mistake. And that warning was what was catching it. This is one case where I'm happy to be embarrassed. On Wed, Dec 17, 2008 at 8:41 PM, Mitch G

Ant 1.7 doesn't like antcall with inheritrefs

2008-12-17 Thread Mitch Gitman
I'm familiar with this warning in Ant 1.7: Warning: Reference *reference_name* has not been set at runtime, but was found during build file parsing, attempting to resolve. Future versions of Ant may support referencing ids defined in non-executed targets. But now suppose that the target in which t

Re: buildnumber Ant task & automated updates of ivy.xml

2008-11-21 Thread Mitch Gitman
ting of major and minor versions. Of course, there's always the easy way out, which is to just pass in the desired new version as an argument. Like so: ant ivy-publish 2.0 Not very foolproof, you must admit. > 4- Dependencies should either be constrained by "latest.integration&quo

Re: buildnumber Ant task & automated updates of ivy.xml

2008-11-19 Thread Mitch Gitman
Quick replies inline. On Wed, Nov 19, 2008 at 8:30 AM, Shawn Castrianni < [EMAIL PROTECTED]> wrote: > I started off using the buildnumber task to let IVY control the build > number for CI, but then found it difficult to tell the CI tool what the > version number was that IVY selected. Obvioulsy,

Re: buildnumber Ant task & automated updates of ivy.xml

2008-11-19 Thread Mitch Gitman
Thanks, Jonathan. This looks like precisely the simple, obvious approach that I had been overlooking. Anyway, this leads me to my next area where I seem to be missing something obvious. Suppose that *ivy:publish *is normally only invoked during a CI build. Now suppose that you want to be manually

buildnumber Ant task & automated updates of ivy.xml

2008-11-19 Thread Mitch Gitman
There's one Ivy Ant task that had been flying under my radar, the buildnumber task. It seems to me that the natural use for the *buildnumber *task is during a build invoked by continuous integration. A CI-invoked Ant target would go int

Re: problems with partial dependency and eviction

2008-11-10 Thread Mitch Gitman
Shawn, forgive me for steering you in another direction. Rather than mess around with dependency/include--if I control the dependency itself--I would find it simpler, both practically and conceptually, to create two different configurations of the dependency: - One whose publication is part1.ja