Even properties are apparently reevaluated at each submodule pom.xml's usage,
thus, yielding the same result as at the beginning of this thread. Nice
thought for a workaround though. I tried it too. Just too bad it doesn't
work.
Giorgio Gallo-3 wrote:
>
> Just guessing...
>
> What if you define a property in parent pom and then use it to configure
> jalopy?
>
> ==parent pom==
> <properties>
> <property>
> <name>my.jalopy.convention</name>
> <value>${basedir}/src/.......</value>
> </property>
> </properties>
>
> ==child pom==
> <configuration>
> <jalopy.convention>${my.jalopy.convention}<jalopy.convention>
> </configuration>
>
> Didn't try it myself - just thought that maybe it could work (I imagine
> variable substitution in properties is done in the pom defining them).
>
>
> On Saturday 29 April 2006 21:55, Wayne Fay wrote:
>> You could also provide a full path to the xml file ie
>> /home/maven/jalopy/jalopy.xml. But then the build would be
>> non-portable.
>>
>> I'd go the HTTP route myself.
>>
>> Wayne
>>
>> On 4/29/06, dan tran <[EMAIL PROTECTED]> wrote:
>> > If you have a way to pull the convention file from http, that is the
>> way
>> > to go.
>> >
>> > -D
>> >
>> > On 4/29/06, Anatol Pomozov <[EMAIL PROTECTED]> wrote:
>> > > Hi, dan.
>> > >
>> > > But I would like to run jalopy on submodule level as well as root
>> > > level. And
>> > > I dont want to duplicate info in all pom.xml file. So this tip is not
>> > > very useful.
>> > >
>> > > Seems that putting jalopy.xml under HTTP is only way here.
>> > >
>> > > On 4/29/06, dan tran <[EMAIL PROTECTED]> wrote:
>> > > > I just take quick look at the source. The param name for
>> convention
>> > >
>> > > field
>> > >
>> > > > is "jalopy.convention",
>> > > > so your configuration must be like this
>> > > >
>> > > > <configuration>
>> > > > <jalopy.convention>../../......./src/main/resources/jalopy.xml<
>> > > > jalopy.convention>
>> > > > </configuration>
>> > > >
>> > > > how many "../" you need to do dependening on where you are relative
>> > > > to your
>> > > > root.
>> > > >
>> > > > -D
>> > > >
>> > > > On 4/29/06, dan tran <[EMAIL PROTECTED]> wrote:
>> > > > > Use ".." to walking up the source tree instead of basedir.
>> > > > >
>> > > > > -D
>> > > > >
>> > > > > On 4/29/06, Anatol Pomozov <[EMAIL PROTECTED]> wrote:
>> > > > > > Hi.
>> > > > > >
>> > > > > > I am trying to configure jalopy plugin for maven2. I have
>> single
>> > > >
>> > > > jalopy
>> > > >
>> > > > > > configuration file that will be used in my project for all
>> > >
>> > > submodules.
>> > >
>> > > > > > I would like to store jalopy in VCS (it means on filesystem not
>> > > > > > on
>> > > >
>> > > > HTTP
>> > > >
>> > > > > > server)
>> > > > > >
>> > > > > > Jalopy configuration stored in root project
>> > > > > > ${root}/src/main/resources/jalopy.xml
>> > > > > >
>> > > > > > Now I need to tell jalopy plugin where this configuration file
>> > > >
>> > > > located.
>> > > >
>> > > > > > I am
>> > > > > > trying to configure plugin in following way
>> > > > > >
>> > > > > > <build>
>> > > > > > <plugins>
>> > > > > > <plugin>
>> > > > > > <groupId>org.codehaus.mojo</groupId>
>> > > > > > <artifactId>jalopy-maven-plugin</artifactId>
>> > > > > > <version>1.0-SNAPSHOT</version>
>> > > > > > <configuration>
>> > > > > >
>> > > > > >
>> <convention>${basedir}/src/main/resources/jalopy.xml</convention>
>> > > > > > </configuration>
>> > > > > > </plugin>
>> > > > > > </plugins>
>> > > > > > </build>
>> > > > > >
>> > > > > > But it does not work when I try to run jalopy plugin from
>> > > > > > submodule, because
>> > > > > > ${basedir} calculated relatively to submodule directory.
>> > > > > >
>> > > > > > So there is a question. Is any way to get path relatively root
>> > > >
>> > > > project??
>> > > >
>> > > > > > (I
>> > > > > > have 3 layer in POM hierarchy
>> > > > > > rootPom->applicationPom->submodulePom)
>> > > > > >
>> > > > > >
>> > > > > > Thanks for your help.
>> > > > > > --
>> > > > > > anatol ( http://pomozov.info
>> > >
>> > > --
>> > > anatol (http://pomozov.info)
>
> --
> Giorgio Gallo
> Sinapsi Spa
> Phone: +39(02)58209525
> Mobile: +39(349)1485142
>
>
>
>
--
View this message in context:
http://www.nabble.com/How-to-get-path-relatively-to-the-parent-project-pom-tf1528872s177.html#a13068476
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]