Re: Property inheritance does exist?

2013-02-07 Thread Stephen Connolly
Please take a couple of minutes to read my answer to a very similar
question on stack overflow

http://stackoverflow.com/questions/14725197/reading-properties-file-from-pom-file-in-maven/14727072#14727072

It should hopefully make things a little clearer

-Stephen

On Thursday, 7 February 2013, Graf László wrote:

> Hello,
>
> I try to port an existing ANT based build system to Maven.
> I set in my root POM (A) the org.codehaus.mojo:properties-**maven-plugin
> to read all required properties from an existing property file.
> That works fine. But when I create a new Maven module (B) where I set
> its parent to be A, it complains that does not find the property file.
>
> Of course, this property file was specified relative to the A project.
>
> More than that, the org.apache.maven.plugins:**maven-enforcer-plugin
> says that the
>
> --**--**-
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Property inheritance does exist?

2013-02-07 Thread Ansgar Konermann
Am 07.02.2013 21:49 schrieb "Ansgar Konermann" <
ansgar.konerm...@googlemail.com>:
>
> Property inheritance works for properties you put into the properties
section of a parent pom.
>
> The m-build-helper-p

s/build-helper/properties/

> creates properties dynamically *after* maven already executed pom parsing
and property inheritance. I. e.: inheriting dynamic properties does not
work.
>
> HTH
>
> Ansgar
>
> Am 07.02.2013 21:30 schrieb "Graf László" :
>
>> Hello,
>>
>> I try to port an existing ANT based build system to Maven.
>>
>> I set in my root POM (A) the org.codehaus.mojo:properties-maven-plugin
>> to read all required properties from an existing property file.
>> Of course, this property file was specified relative to the A project.
>>
>> That works fine. But when I create a new Maven module (B) where I set
>> its parent to be A, and this is a module of A, it complains that does
>> not find the property file.
>>
>> Does exist the property inheritance in Maven?
>>
>> Thoughts?
>>
>> Graf László
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>


Re: Property inheritance does exist?

2013-02-07 Thread Ansgar Konermann
Property inheritance works for properties you put into the properties
section of a parent pom.

The m-build-helper-p creates properties dynamically *after* maven already
executed pom parsing and property inheritance. I. e.: inheriting dynamic
properties does not work.

HTH

Ansgar
Am 07.02.2013 21:30 schrieb "Graf László" :

> Hello,
>
> I try to port an existing ANT based build system to Maven.
>
> I set in my root POM (A) the org.codehaus.mojo:properties-**maven-plugin
> to read all required properties from an existing property file.
> Of course, this property file was specified relative to the A project.
>
> That works fine. But when I create a new Maven module (B) where I set
> its parent to be A, and this is a module of A, it complains that does
> not find the property file.
>
> Does exist the property inheritance in Maven?
>
> Thoughts?
>
> Graf László
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@maven.**apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Property inheritance does exist?

2013-02-07 Thread Graf László

Hello,

I try to port an existing ANT based build system to Maven.

I set in my root POM (A) the org.codehaus.mojo:properties-maven-plugin
to read all required properties from an existing property file.
Of course, this property file was specified relative to the A project.

That works fine. But when I create a new Maven module (B) where I set
its parent to be A, and this is a module of A, it complains that does
not find the property file.

Does exist the property inheritance in Maven?

Thoughts?

Graf László


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Property inheritance does exist?

2013-02-07 Thread Graf László

Hello,

I try to port an existing ANT based build system to Maven.
I set in my root POM (A) the org.codehaus.mojo:properties-maven-plugin
to read all required properties from an existing property file.
That works fine. But when I create a new Maven module (B) where I set
its parent to be A, it complains that does not find the property file.

Of course, this property file was specified relative to the A project.

More than that, the org.apache.maven.plugins:maven-enforcer-plugin
says that the

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Problem with property inheritance in maven site plugin

2008-02-20 Thread Christian Kölle
VUB Stefan Seidel wrote:
> 
> ${project.version} is an internal maven property, so it is absolutely
> not a good idea to use it. So the first try should be to rename that one.
> 

Hi

Obviously this was a bad example. In my real poms the variable has
another name. I changed that in the mail because i don't want to expose
internal details of our application and haven't thought about the name
very well.

So this is not the problem.

Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with property inheritance in maven site plugin

2008-02-20 Thread VUB Stefan Seidel

Hi,

${project.version} is an internal maven property, so it is absolutely 
not a good idea to use it. So the first try should be to rename that one.


Stefan

Christian Kölle wrote:

Hi all

I have a problem with the property inheritance in the maven site project.

I have a multi-module project. The base pom looks like this:



  4.0.0
  my.project
  all
  pom
  ${project.version}

  
1.0
  

  ...


The poms of the subprojects look like this:


  4.0.0
  
my.project
all
${project.version}
../Build/pom.xml
  
  ...


This works fine for the install goal (wich use a lot of different
plugins for special purposes) but not for the site plugin. A call to
"mvn site" produces the following error:

[INFO] [site:stage]
Downloading:
http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}.pom
[INFO] Parent project loaded from repository.
[INFO] Parent project loaded from repository.
Downloading:
http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}-site_en.xml
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The site descriptor cannot be resolved from the repository: No
such file or directory

When I change to explicit version numbers in both poms everything works
fine. Obviously the site plugin has problems with resolving the property.

Any ideas?

Thanks
Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
best regards,

Stefan Seidel
software developer

VUB Printmedia GmbH
Chopinstraße 4
D-04103 Leipzig
Germany
tel.+49 (341) 9 60 50 07
fax.+49 (341) 9 60 50 92
mail.   [EMAIL PROTECTED]
web.www.vub.de

HRB Köln 24015
UStID DE 122 649 251
GF Dr. Achim Preuss Neudorf,
Dr. Christian Preuss Neudorf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with property inheritance in maven site plugin

2008-02-20 Thread Christian Kölle
Hi all

I have a problem with the property inheritance in the maven site project.

I have a multi-module project. The base pom looks like this:



  4.0.0
  my.project
  all
  pom
  ${project.version}

  
1.0
  

  ...


The poms of the subprojects look like this:


  4.0.0
  
my.project
all
${project.version}
../Build/pom.xml
  
  ...


This works fine for the install goal (wich use a lot of different
plugins for special purposes) but not for the site plugin. A call to
"mvn site" produces the following error:

[INFO] [site:stage]
Downloading:
http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}.pom
[INFO] Parent project loaded from repository.
[INFO] Parent project loaded from repository.
Downloading:
http://repo1.maven.org/maven2/my/project/${project.version}/all-${project.version}-site_en.xml
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The site descriptor cannot be resolved from the repository: No
such file or directory

When I change to explicit version numbers in both poms everything works
fine. Obviously the site plugin has problems with resolving the property.

Any ideas?

Thanks
Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How property "inheritance" works

2006-12-15 Thread Rémy Sanlaville

Hi Mykel,

I asked for the same questions some time ago without any reply.
I think, it would be nice to have some lights on this point.

Hope you will have some reply.

Rémy


How property "inheritance" works

2006-12-14 Thread Mykel Alvis

Is there a guide to how properties are cascaded through poms via maven
settings.xml, command line overrides, parent pom definitions, etc?

http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide doesn't
answer this question, and so far none of the maven docs on profiles and
properties does either.

I'm in the process of documenting how this works, but I'm having to do it
experimentally, since I can't seem to find a set of rules about how
overrides work.

Anyone have any additional information about this?

Thanks,
Mykel
--
I'm just an unfrozen caveman software developer.  I don't understand your
strange, "modern" ways.


RE: RC3 Property Inheritance Problem

2004-05-27 Thread Winston . Rast


Thanks Brett. I followed my mistakenly missing attachment with another post but
for some reason it never made it to the list. I created MAVEN-1296 in JIRa for
the issue. Hope you can get the chance to look at this as it is pretty important
in my view.
-wr





Brett Porter <[EMAIL PROTECTED]> on 05/26/2004 05:08:56 PM

Please respond to "Maven Users List" <[EMAIL PROTECTED]>

To:   "'Maven Users List'" <[EMAIL PROTECTED]>
cc:(bcc: Winston Rast/Jeppesen/TMC)

Subject:  RE: RC3 Property Inheritance Problem



Attachement is not there.

Can you post the contents of your message to JIRA and attach the example?

Thanks,
Brett

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 27 May 2004 7:36 AM
> To: [EMAIL PROTECTED]
> Subject: Re: RC3 Property Inheritance Problem
>
>
>
>
> I've been doing a lot of trial and error with this problem
> and I've narrowed it down to what I think is a problem in
> multiproject environments with inherited properties. It is
> *not* an issue strictly with the maven.compile.* properties
> as I've previously mentioned. I'm attaching a jar file of my
> stripped down example to demonstrate. In my example, I'm
> demonstrating the problem with the maven.repo.remote
> property. To replicate the problem, do the following:
>
> * Edit project.properties under test/ and change
> maven.repo.remote to something other than ibiblio.
> * Edit test/service/myservice/ejb/project.xml with a
> dependency (something NOT on ibiblio, but on the remote repo
> specified previously)
> * Remove this dependent jar from your local repository so
> it's forced to download it again
> * From test/service/myservice, execute a maven goal (I
> generally do clean)
>
> This should fail to download. Strangely, if I run the same
> maven goal from test/service/myservice/ejb, it DOES download!
> Anyone have a clue what's happening here?
>
> -wr
>
> __
> 
> NOTICE:  This communication and any files transmitted with it
> ("communication") may contain privileged or other
> confidential information. This communication is intended
> solely for the individual or entity to whom it is addressed.
> If you are not the intended recipient, or believe that you
> have received this communication in error, please do not
> print, copy, retransmit, disseminate, or otherwise use this
> communication.  Also, please indicate to the sender that you
> have received this communication in error, and then delete
> this communication and any copies. Thank you.
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RC3 Property Inheritance Problem

2004-05-26 Thread Brett Porter
Attachement is not there.

Can you post the contents of your message to JIRA and attach the example?

Thanks,
Brett

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 27 May 2004 7:36 AM
> To: [EMAIL PROTECTED]
> Subject: Re: RC3 Property Inheritance Problem
> 
> 
> 
> 
> I've been doing a lot of trial and error with this problem 
> and I've narrowed it down to what I think is a problem in 
> multiproject environments with inherited properties. It is 
> *not* an issue strictly with the maven.compile.* properties 
> as I've previously mentioned. I'm attaching a jar file of my 
> stripped down example to demonstrate. In my example, I'm 
> demonstrating the problem with the maven.repo.remote 
> property. To replicate the problem, do the following:
> 
> * Edit project.properties under test/ and change 
> maven.repo.remote to something other than ibiblio.
> * Edit test/service/myservice/ejb/project.xml with a 
> dependency (something NOT on ibiblio, but on the remote repo 
> specified previously)
> * Remove this dependent jar from your local repository so 
> it's forced to download it again
> * From test/service/myservice, execute a maven goal (I 
> generally do clean)
> 
> This should fail to download. Strangely, if I run the same 
> maven goal from test/service/myservice/ejb, it DOES download! 
> Anyone have a clue what's happening here?
> 
> -wr
> 
> __
> 
> NOTICE:  This communication and any files transmitted with it 
> ("communication") may contain privileged or other 
> confidential information. This communication is intended 
> solely for the individual or entity to whom it is addressed. 
> If you are not the intended recipient, or believe that you 
> have received this communication in error, please do not 
> print, copy, retransmit, disseminate, or otherwise use this 
> communication.  Also, please indicate to the sender that you 
> have received this communication in error, and then delete 
> this communication and any copies. Thank you.
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Re: RC3 Property Inheritance Problem

2004-05-26 Thread Winston . Rast


I've been doing a lot of trial and error with this problem and I've narrowed it
down to what I think is a problem in multiproject environments with inherited
properties. It is *not* an issue strictly with the maven.compile.* properties as
I've previously mentioned. I'm attaching a jar file of my stripped down example
to demonstrate. In my example, I'm demonstrating the problem with the
maven.repo.remote property. To replicate the problem, do the following:

* Edit project.properties under test/ and change maven.repo.remote to something
other than ibiblio.
* Edit test/service/myservice/ejb/project.xml with a dependency (something NOT
on ibiblio, but on the remote repo specified previously)
* Remove this dependent jar from your local repository so it's forced to
download it again
* From test/service/myservice, execute a maven goal (I generally do clean)

This should fail to download. Strangely, if I run the same maven goal from
test/service/myservice/ejb, it DOES download! Anyone have a clue what's
happening here?

-wr

__
NOTICE:  This communication and any files transmitted with it ("communication")
may contain privileged or other confidential information. This communication is
intended solely for the individual or entity to whom it is addressed. If you are
not the intended recipient, or believe that you have received this communication
in error, please do not print, copy, retransmit, disseminate, or otherwise use
this communication.  Also, please indicate to the sender that you have received
this communication in error, and then delete this communication and any copies.
Thank you.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RC3 Property Inheritance Problem

2004-05-26 Thread Winston . Rast


The properties are defined in only a single place. Would it help if I posted all
of my properties files?

If I put these properties in my root/project.properties, it all works, which is
confusing to me.
-wr





Brett Porter <[EMAIL PROTECTED]> on 05/25/2004 05:18:00 PM

Please respond to "Maven Users List" <[EMAIL PROTECTED]>

To:   "'Maven Users List'" <[EMAIL PROTECTED]>
cc:(bcc: Winston Rast/Jeppesen/TMC)

Subject:  RE: RC3 Property Inheritance Problem



Do any of the plugins you use (eg the xdoclet one) override the values?

- Brett

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 26 May 2004 3:56 AM
> To: Maven Users List
> Subject: Re: RC3 Property Inheritance Problem
>
>
>
>
> Just to follow up with some more info that I discovered...
>
> I created a root/maven.xml to echo the maven.compile.*
> properties during the build. Somewhere along the way my
> property values are being lost:
>
> build:
> [echo] maven.compile.source=1.4
> [echo] maven.compile.target=1.4
> multiproject:install:
> multiproject:projects-init:
> [echo] Gathering project list
> Starting the reactor...
>
> 
>
> xdoclet:ejbdoclet:
>
> java:prepare-filesystem:
>
> java:compile:
> [echo] maven.compile.source=1.3
> [echo] maven.compile.target=1.1
>
>
> So is the problem in the property inheritance, the java
> plugin, or the multiproject plugin? Your help is greatly
> appreciated. -wr
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RC3 Property Inheritance Problem

2004-05-25 Thread Brett Porter
Do any of the plugins you use (eg the xdoclet one) override the values?

- Brett

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, 26 May 2004 3:56 AM
> To: Maven Users List
> Subject: Re: RC3 Property Inheritance Problem
> 
> 
> 
> 
> Just to follow up with some more info that I discovered...
> 
> I created a root/maven.xml to echo the maven.compile.* 
> properties during the build. Somewhere along the way my 
> property values are being lost:
> 
> build:
> [echo] maven.compile.source=1.4
> [echo] maven.compile.target=1.4
> multiproject:install:
> multiproject:projects-init:
> [echo] Gathering project list
> Starting the reactor...
> 
> 
> 
> xdoclet:ejbdoclet:
> 
> java:prepare-filesystem:
> 
> java:compile:
> [echo] maven.compile.source=1.3
> [echo] maven.compile.target=1.1
> 
> 
> So is the problem in the property inheritance, the java 
> plugin, or the multiproject plugin? Your help is greatly 
> appreciated. -wr
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Re: RC3 Property Inheritance Problem

2004-05-25 Thread Winston . Rast


Just to follow up with some more info that I discovered...

I created a root/maven.xml to echo the maven.compile.* properties during the
build. Somewhere along the way my property values are being lost:

build:
[echo] maven.compile.source=1.4
[echo] maven.compile.target=1.4
multiproject:install:
multiproject:projects-init:
[echo] Gathering project list
Starting the reactor...



xdoclet:ejbdoclet:

java:prepare-filesystem:

java:compile:
[echo] maven.compile.source=1.3
[echo] maven.compile.target=1.1


So is the problem in the property inheritance, the java plugin, or the
multiproject plugin? Your help is greatly appreciated.
-wr



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RC3 Property Inheritance Problem

2004-05-25 Thread Winston . Rast


I'm trying to generate "1.4 friendly" compiled classes. I'm getting failures on
the assert keyword. Here's a rundown of my multiproject structure:

root/
project.xml (extends root/service/project.xml)
project.ent
common/
maven/
project.properties
project.xml (Parent)
entities/
versions.ent
dependencies.ent
developers.ent
service/
maven.xml
project.properties
project.xml (extends root/common/maven/project.xml)
ejb/
project.ent
project.properties
project.xml (extends root/project.xml)

I have the maven.compile.source and maven.compile.target properties set in
root/service/project.properties. Yet when I run "maven multiproject:install"
from my root directory I get a warning and error regarding the assert keyword.
If I put these properties in a root/project.properties file it works fine. Can
anyone tell me if this is a bug or if I'm doing something wrong?

-wr

__
NOTICE:  This communication and any files transmitted with it ("communication")
may contain privileged or other confidential information. This communication is
intended solely for the individual or entity to whom it is addressed. If you are
not the intended recipient, or believe that you have received this communication
in error, please do not print, copy, retransmit, disseminate, or otherwise use
this communication.  Also, please indicate to the sender that you have received
this communication in error, and then delete this communication and any copies.
Thank you.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Property inheritance

2003-10-15 Thread Paul Libbrecht
I've found it easier to simply add in a common bin directory, a modified 
copy of the maven script with the added properties.

Paul

khote wrote:
set a global
export MAVEN_HOME_LOCAL=/mavenrepository
or some such place.  Put that in your /etc/profile so everybody shares it.
- Original Message - 
From: "Alastair Rodgers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 3:46 AM
Subject: Property inheritance



Hello,

I've just started using Maven over the last couple of days, and I must
say, my first impressions are very positive (I'm used to dealing with lots
of nearly-identical Ant scripts!). Thanks.
I've been trying to use property inheritance, and I gathered from the
mailing list archive that project.properties & build.properties aren't
inherited. I tried to get round this by creating a global.properties file
and manually loading the properties from it in my base maven.xml:
 value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>

 

In global.properties I have:

 maven.repo.local=/usr/local/data/maven/repository

I then have a sub-project which inherits from this base. If I run, say
"maven jar" on the sub-project and dump the value of maven.repo.local to the
console from the sub-project's maven.xml, I find it has the desired value
(from global.properties). However, Maven is still actually using the default
repository (/home//.maven/repository to do the build) - e.g. if I
delete this dir, Maven creates it and starts downloading all the jars again.
Is there a way round this problem?

Thanks,
Al.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Property inheritance

2003-10-15 Thread Alastair Rodgers
Thanks - I wasn't aware of MAVEN_HOME_LOCAL. 


> -Original Message-
> From: khote [mailto:[EMAIL PROTECTED] 
> Sent: 15 October 2003 13:04
> To: Maven Users List
> Subject: Re: Property inheritance
> 
> 
> set a global
> export MAVEN_HOME_LOCAL=/mavenrepository
> or some such place.  Put that in your /etc/profile so 
> everybody shares it.
> 
> - Original Message - 
> From: "Alastair Rodgers" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 15, 2003 3:46 AM
> Subject: Property inheritance
> 
> 
> > Hello,
> >
> > I've just started using Maven over the last couple of days, 
> and I must
> say, my first impressions are very positive (I'm used to 
> dealing with lots of nearly-identical Ant scripts!). Thanks.
> >
> > I've been trying to use property inheritance, and I 
> gathered from the
> mailing list archive that project.properties & 
> build.properties aren't inherited. I tried to get round this 
> by creating a global.properties file and manually loading the 
> properties from it in my base maven.xml:
> >
> >value="${pom.parentBasedir().getParentFile().getCanonicalFile()}"/>
> >> file="${project.root}/etc/global.properties"/>
> >
> > In global.properties I have:
> >
> >   maven.repo.local=/usr/local/data/maven/repository
> >
> > I then have a sub-project which inherits from this base. If 
> I run, say
> "maven jar" on the sub-project and dump the value of 
> maven.repo.local to the console from the sub-project's 
> maven.xml, I find it has the desired value (from 
> global.properties). However, Maven is still actually using 
> the default repository (/home//.maven/repository to do 
> the build) - e.g. if I delete this dir, Maven creates it and 
> starts downloading all the jars again.
> >
> > Is there a way round this problem?
> >
> > Thanks,
> > Al.
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Property inheritance

2003-10-15 Thread khote
set a global
export MAVEN_HOME_LOCAL=/mavenrepository
or some such place.  Put that in your /etc/profile so everybody shares it.

- Original Message - 
From: "Alastair Rodgers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 3:46 AM
Subject: Property inheritance


> Hello,
>
> I've just started using Maven over the last couple of days, and I must
say, my first impressions are very positive (I'm used to dealing with lots
of nearly-identical Ant scripts!). Thanks.
>
> I've been trying to use property inheritance, and I gathered from the
mailing list archive that project.properties & build.properties aren't
inherited. I tried to get round this by creating a global.properties file
and manually loading the properties from it in my base maven.xml:
>
>   
>   
>
> In global.properties I have:
>
>   maven.repo.local=/usr/local/data/maven/repository
>
> I then have a sub-project which inherits from this base. If I run, say
"maven jar" on the sub-project and dump the value of maven.repo.local to the
console from the sub-project's maven.xml, I find it has the desired value
(from global.properties). However, Maven is still actually using the default
repository (/home//.maven/repository to do the build) - e.g. if I
delete this dir, Maven creates it and starts downloading all the jars again.
>
> Is there a way round this problem?
>
> Thanks,
> Al.
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Property inheritance

2003-10-15 Thread Alastair Rodgers
Hello, 

I've just started using Maven over the last couple of days, and I must say, my first 
impressions are very positive (I'm used to dealing with lots of nearly-identical Ant 
scripts!). Thanks. 

I've been trying to use property inheritance, and I gathered from the mailing list 
archive that project.properties & build.properties aren't inherited. I tried to get 
round this by creating a global.properties file and manually loading the properties 
from it in my base maven.xml: 

  
  

In global.properties I have: 

  maven.repo.local=/usr/local/data/maven/repository

I then have a sub-project which inherits from this base. If I run, say "maven jar" on 
the sub-project and dump the value of maven.repo.local to the console from the 
sub-project's maven.xml, I find it has the desired value (from global.properties). 
However, Maven is still actually using the default repository 
(/home//.maven/repository to do the build) - e.g. if I delete this dir, Maven 
creates it and starts downloading all the jars again. 

Is there a way round this problem? 

Thanks, 
Al.



Re: multiproject property inheritance

2003-09-30 Thread Jason van Zyl
On Tue, 2003-09-30 at 14:32, Sonnek, Ryan wrote:
> I know that property inheritance is a hot discussion, and I've been
> following it intently over the months.  I just had an idea though, that I'd
> like to see what people think.
> 
> Since the multiproject plugin is the replacement for the reactor, couldn't
> it be modified to load the inherited properties for each subproject?  

It doesn't replace the reactor it is a facade for the reactor. What's
underneath is still the reactor.

The problem is also not the reactor but they way in which the project is
assembled not a problem inherent in the reactor or the multiproject
plugin that uses the reactor.

> It
> could load the build.properties and project.properties from the MAIN project
> for each subproject that it executes.  I would almost think it cleaner to
> have the mulitproject plugin load a "multiproject.properties" from the MAIN
> project in order to specify what properties should be inherited by the
> subprojects.
> 
> Does this seem like a feasible solution, or is the intended path of maven
> quite different?

One of the first components that I will introduce into the 1.x versions
is the component that assembles the project and it correctly deals with
inheritance of properties among projects.

> Ryan Sonnek
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



multiproject property inheritance

2003-09-30 Thread Sonnek, Ryan
I know that property inheritance is a hot discussion, and I've been
following it intently over the months.  I just had an idea though, that I'd
like to see what people think.

Since the multiproject plugin is the replacement for the reactor, couldn't
it be modified to load the inherited properties for each subproject?  It
could load the build.properties and project.properties from the MAIN project
for each subproject that it executes.  I would almost think it cleaner to
have the mulitproject plugin load a "multiproject.properties" from the MAIN
project in order to specify what properties should be inherited by the
subprojects.

Does this seem like a feasible solution, or is the intended path of maven
quite different?

Ryan Sonnek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]