Re: file based profile activation - best practice ?

2007-08-08 Thread nicolas de loof
Based on your link, I don't need a profile but a (plugin) dependency to antcontrib to use the if tag. My POM will the look more and more like an ant script. Maven is supposed to use profiles for such use cases. Why is there a limitation NOT to support ${basedir} property in profile activation ? I

Re: file based profile activation - best practice ?

2007-08-08 Thread nicolas de loof
your suggestion works fine. Thanks to helping me solving this issue. Nico. 2007/8/8, nicolas de loof [EMAIL PROTECTED]: Based on your link, I don't need a profile but a (plugin) dependency to antcontrib to use the if tag. My POM will the look more and more like an ant script. Maven is

Re: file based profile activation - best practice ?

2007-08-08 Thread Eric Redmond
I hope you understand that antrun is meant to be a stop-gap solution - a way to ensure your ant code works in your project. Now that you have your project working you should really consider creating a plugin:goal using the script so you can extract ant from your pom. -- Eric Redmond

Re: file based profile activation - best practice ?

2007-08-08 Thread nicolas de loof
I agree about being better to create a plugin. Will just have to find time for doing it, and good arguments to spend time on a project that builds fine ;-) I just found http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html so this will be a nice way to package my antrun script

Re: file based profile activation - best practice ?

2007-08-08 Thread nicolas de loof
this will be a nice way to package my antrun script as a mojo but according to http://www.mail-archive.com/users@maven.apache.org/msg61137.html, there is no support for classpath defined in the plugin pom to setup ant taskdefs. That would be a quick and simpel way to setup a maven2 plugin

Re: file based profile activation - best practice ?

2007-08-07 Thread Eric Redmond
Why would you need to duplicate it? Have the antrun code only run if a property is set - and only set that property under the profiles you want it to execute under. You can see how to active a block of ant code here in my book:

file based profile activation - best practice ?

2007-08-06 Thread nicolas de loof
Hello, I'm using a code generator, and I'd like to avoid regeneration of code on each build. I've set a profile to launch the generation using the antrun plugin The profile is active based on a generated file missing : profile idsql2java/id activation file

Re: file based profile activation - best practice ?

2007-08-06 Thread Wayne Fay
Not ideal, but you could set up another profile that has the full path from the parent, and specify that when running from the parent ie sql2java_top or something. Wayne On 8/6/07, nicolas de loof [EMAIL PROTECTED] wrote: Hello, I'm using a code generator, and I'd like to avoid regeneration

Re: file based profile activation - best practice ?

2007-08-06 Thread nicolas de loof
The ant code required to make the generator work is huge, and duplicating it would be worst as running it twice. Thanks anyway for the suggestion 2007/8/6, Wayne Fay [EMAIL PROTECTED]: Not ideal, but you could set up another profile that has the full path from the parent, and specify that