Re: Are Maven profiles like Ant targets?

2008-12-22 Thread Baptiste MATHUS
2008/12/22 Todd Thiessen > Trevor > > Its the culture I think your missing. Yes you can call goals directly > but this isn't something you should be needing very often. It isn't the +1. I only know maybe 10 special goals or so, mostly for debugging purpose (dependency:list or tree, dependency:p

RE: Are Maven profiles like Ant targets?

2008-12-22 Thread Todd Thiessen
goal directly all the time you should be asking yourself why. Good luck. --- Todd Thiessen > -Original Message- > From: Trevor Harmon [mailto:tre...@vocaro.com] > Sent: Monday, December 22, 2008 1:49 PM > To: Maven Users List > Subject: Re: Are Maven profiles like Ant tar

Re: Are Maven profiles like Ant targets?

2008-12-22 Thread Trevor Harmon
On Dec 22, 2008, at 12:38 PM, Todd Thiessen wrote: I think the reason why you are having so much trouble with Maven is that you want to "configure" it to do what you want by giving it a specific command. But actually, I can give Maven a specific command to do what I want ... as long as a plu

RE: Are Maven profiles like Ant targets?

2008-12-22 Thread Todd Thiessen
> -Original Message- > From: Trevor Harmon [mailto:tre...@vocaro.com] > > I don't know how I've given the impression that I'm trying to > avoid the Maven lifecycle I get this impression from you when you ask about how to run tasks, that are specific to a particular project, directly fro

Re: Are Maven profiles like Ant targets?

2008-12-22 Thread Trevor Harmon
On Dec 19, 2008, at 4:24 PM, Baptiste MATHUS wrote: And I'm also really wondering why you try to use maven in what seems to me an ant-ish way. I made a mistake in even mentioning Ant. It seems to give a sense that I'm closed-minded and unable to think in the "Maven way". I should have si

Re: Are Maven profiles like Ant targets?

2008-12-20 Thread Alex Athanasopoulos
This reminds me of this "best practice" that uses a single maven profile to run an ant task: http://ionixx.wordpress.com/2008/03/10/running-specified-ant-tasks-within-maven2-outside-the-lifecycle/ Basically, you can run an ant target from maven like this: mvn -Pant -Dtarget=my-target. This is b

Re: Are Maven profiles like Ant targets?

2008-12-19 Thread Baptiste MATHUS
aying you > are doing it wrong. I never said using profiles is wrong. > And btw, the subject was "Are Maven profiles like ant targets" ? The answer was clearly no. I guess it also started with this :-). And I'm also really wondering why you try to use maven in what seems to m

Re: Are Maven profiles like Ant targets?

2008-12-18 Thread Martin Höller
On Wednesday 17 December 2008 Trevor Harmon wrote: > On Dec 17, 2008, at 12:18 PM, Martin Höller wrote: > > Ok. My approach would then be to create one profile which is only > > executed > > before releasing or when running in the contiuous-integration > > server. This > > profile would configure t

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Geoffrey Wiseman
On Wed, Dec 17, 2008 at 12:17 PM, Trevor Harmon wrote: > Yes, I was trying to simplify things with that subject line but I guess I > just made them more confusing. Perhaps a better question would be, "Are > Maven profiles the only way to accomplish what I was able to accomplish with > Ant targets

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Trevor Harmon
On Dec 17, 2008, at 12:18 PM, Martin Höller wrote: Ok. My approach would then be to create one profile which is only executed before releasing or when running in the contiuous-integration server. This profile would configure the antrun plugin to execute install4j, run integration tests, and

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Martin Höller
On Wednesday 17 December 2008 Trevor Harmon wrote: > On Dec 17, 2008, at 3:54 AM, Martin Höller wrote: > > And BTW: Maven's primary goal is to help building and packaging > > software, > > not starting the developed piece of software, so IMHO the exec- > > plugin is > > not a good example here. > >

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Martin Höller
On Wednesday 17 December 2008 Trevor Harmon wrote: > On Dec 17, 2008, at 3:33 AM, Martin Höller wrote: > >> mvn -Pinstall4j package > > > > Why would you have to use a profile for this? > > Because it takes five minutes to run. Ok. My approach would then be to create one profile which is only ex

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Trevor Harmon
On Dec 17, 2008, at 11:45 AM, Geoffrey Wiseman wrote: All I'm really trying to say (and I suspect what others are trying to say) is that the answer to your original question, "Are profiles intended to play the same role as Ant targets?" is "No. They aren't." Yes, I was trying to simplify

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Trevor Harmon
On Dec 17, 2008, at 3:54 AM, Martin Höller wrote: And BTW: Maven's primary goal is to help building and packaging software, not starting the developed piece of software, so IMHO the exec- plugin is not a good example here. Well I have to disagree with you there. Testing is also not about

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Geoffrey Wiseman
On Wed, Dec 17, 2008 at 11:17 AM, Trevor Harmon wrote: > No, it doesn't fit my needs because it always prints both "hello" and > "goodbye". I want to print either "hello" or "goodbye". > > For example, in the scenario I mentioned earlier, I want to launch a > desktop application with one particul

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Trevor Harmon
On Dec 17, 2008, at 3:33 AM, Martin Höller wrote: mvn -Pinstall4j package Why would you have to use a profile for this? Because it takes five minutes to run. I don't want to wait five minutes every time I package, install, or deploy my code. The install4j stuff only needs to happen whe

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Trevor Harmon
On Dec 17, 2008, at 9:14 AM, Todd Thiessen wrote: This prints hello and goodbye as part of the clean phase. ... Doesn't this fit your needs? No, it doesn't fit my needs because it always prints both "hello" and "goodbye". I want to print either "hello" or "goodbye". For example, in the s

RE: Are Maven profiles like Ant targets?

2008-12-17 Thread Todd Thiessen
Todd Thiessen > -Original Message- > From: Trevor Harmon [mailto:tre...@vocaro.com] > Sent: Tuesday, December 16, 2008 6:02 PM > To: Maven Users List > Subject: Re: Are Maven profiles like Ant targets? > > On Dec 16, 2008, at 5:24 PM, Todd Thiessen wrote: > >

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Martin Höller
On Tuesday 16 December 2008 Trevor Harmon wrote: > Let me use a different plugin as an example. Let's say I'm developing > a desktop application, and it runs in two different modes depending on > the command-line options. I don't want to keep typing in the same long > string of options all the time

Re: Are Maven profiles like Ant targets?

2008-12-17 Thread Martin Höller
On Tuesday 16 December 2008 Trevor Harmon wrote: > On Dec 16, 2008, at 10:42 AM, Martin Höller wrote: > > You are doing it wrong. Maven has no targets like ant has. Maven has > > lifecylces [0] which is built of phases (e.g. 'compile', package', > > 'install'). Plugins are attached to phases and ar

Re: Are Maven profiles like Ant targets?

2008-12-16 Thread Trevor Harmon
On Dec 16, 2008, at 5:24 PM, Todd Thiessen wrote: I believe there is. Plugin can have different executions. There is some documentation about that here: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl e.html#Plugins But that doesn't work for the exec plugin. I'd be

Re: Are Maven profiles like Ant targets?

2008-12-16 Thread Ed Hillmann
On Wed, Dec 17, 2008 at 6:58 AM, Trevor Harmon wrote: > That plugin is fine if you want to use DocBook as a source for Doxia, but > it's not designed for stand-alone documentation created using DocBook and > the DocBook XSL stylesheets. The Xslt task in Ant works great for that, > though. > I've

RE: Are Maven profiles like Ant targets?

2008-12-16 Thread Todd Thiessen
Bah. Ignore last. Hit send by mistake. --- Todd Thiessen > Let me use a different plugin as an example. Let's say I'm > developing a desktop application, and it runs in two > different modes depending on the command-line options. I > don't want to keep typing in the same long string of optio

RE: Are Maven profiles like Ant targets?

2008-12-16 Thread Todd Thiessen
--- Todd Thiessen > -Original Message- > From: Trevor Harmon [mailto:tre...@vocaro.com] > Sent: Tuesday, December 16, 2008 3:59 PM > To: Maven Users List > Subject: Re: Are Maven profiles like Ant targets? > > On Dec 16, 2008, at 2:54 PM, Todd Thiessen wrote:

Re: Are Maven profiles like Ant targets?

2008-12-16 Thread Trevor Harmon
On Dec 16, 2008, at 2:54 PM, Todd Thiessen wrote: They are more powerful in the sense that you can still call any goal independantly But if I have two tasks implemented with AntRun, there's no way to call them independently because there's only one goal: run. I guess most of my problems bo

RE: Are Maven profiles like Ant targets?

2008-12-16 Thread Todd Thiessen
this. Run run the executable. --- Todd Thiessen > -Original Message- > From: Trevor Harmon [mailto:tre...@vocaro.com] > Sent: Tuesday, December 16, 2008 2:34 PM > To: Maven Users List > Subject: Re: Are Maven profiles like Ant targets? > > On Dec 16, 2008, at 10:

Re: Are Maven profiles like Ant targets?

2008-12-16 Thread Trevor Harmon
On Dec 16, 2008, at 10:42 AM, Martin Höller wrote: You are doing it wrong. Maven has no targets like ant has. Maven has lifecylces [0] which is built of phases (e.g. 'compile', package', 'install'). Plugins are attached to phases and are executed whenever a phase is executed. Well, without pro

Re: Are Maven profiles like Ant targets?

2008-12-16 Thread Trevor Harmon
On Dec 16, 2008, at 10:43 AM, Todd Thiessen wrote: You probably want to use a plugin. For instance you could use the DocBook plugin. http://maven-plugins.sourceforge.net/maven-sdocbook-plugin/index.html The sdocbook plugin does not work with Maven 2. I also tried the more recent docbook plu

RE: Are Maven profiles like Ant targets?

2008-12-16 Thread Todd Thiessen
cle. Good luck. --- Todd Thiessen > -Original Message- > From: Trevor Harmon [mailto:tre...@vocaro.com] > Sent: Tuesday, December 16, 2008 10:28 AM > To: Maven Users List > Subject: Are Maven profiles like Ant targets? > > I'm coming from the Ant world, where targets

Re: Are Maven profiles like Ant targets?

2008-12-16 Thread Martin Höller
On Tuesday 16 December 2008 Trevor Harmon wrote: [...] > So... am I doing this right? Are profiles intended to play the role of > Ant targets? Or is there some other mechanism for that? You are doing it wrong. Maven has no targets like ant has. Maven has lifecylces [0] which is built of phases (e.

Re: Are Maven profiles like Ant targets?

2008-12-16 Thread Geoffrey Wiseman
On Tue, Dec 16, 2008 at 10:27 AM, Trevor Harmon wrote: > I'm coming from the Ant world, where targets are fundamental. Need to > generate the JavaDocs and a JAR? Write targets called "javadoc" and "jar" > then do: > > ant javadoc > ant jar > > In Maven, these particular tasks have built-in plug

Are Maven profiles like Ant targets?

2008-12-16 Thread Trevor Harmon
I'm coming from the Ant world, where targets are fundamental. Need to generate the JavaDocs and a JAR? Write targets called "javadoc" and "jar" then do: ant javadoc ant jar In Maven, these particular tasks have built-in plugins, so there's no need to write a target. Instead you just in