You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alain Javier Guarnieri del Gesu <ja...@ajgdg.com> on 2003/11/02 02:05:36 UTC

Extending A Project Variables

Is it possible to define a property in an extended project using the
same value in the master project?

<!-- In master. -->
<project>
  <siteDirectory>/www/ajgdg.com/codearea</siteDirectory>        
</project> 

<!-- In extension. -->
<project>
  <extends>master.xml</extends>
  <siteDirectory>${pom.siteDirectory}/project1</siteDirectory>
</project> 

It seems that my subproject values are all just a string prepended
to a common prefix. How have other folks handled this?

-- 
Alain Javier Guarnieri del Gesu - javi@ajgdg.com

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


Re: Extending A Project Variables

Posted by Alain Javier Guarnieri del Gesu <ja...@ajgdg.com>.
* Konstantin Shaposhnikov <k8...@tut.by> [2003-11-03 14:39]:
> Alain Javier Guarnieri del Gesu wrote:
> >
> > [skip]
> >
> >That's the direction I've taken. I suppose too, that this will be
> >much easier when project properties are inheritied. Something to
> >provide a common set of user defined variables.
> >
> 
> You can use variables defined in project.properties in your
> project descriptor. Now properties from project.properties file
> don't inherited from the base project to subprojects. But I saw
> message in mailing list that this feature will be implemented in
> future versions of maven (may be next release). I think that this
> is what you want.

Yes. I'm looking forward to it. Good things come to those who wait.

Thank you Maven contributors.

-- 
Alain Javier Guarnieri del Gesu - javi@ajgdg.com

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


Re: Extending A Project Variables

Posted by Konstantin Shaposhnikov <k8...@tut.by>.
Alain Javier Guarnieri del Gesu wrote:
> 
 > [skip]
 >
> That's the direction I've taken. I suppose too, that this will be
> much easier when project properties are inheritied. Something to
> provide a common set of user defined variables.
> 

You can use variables defined in project.properties in your project 
descriptor. Now properties from project.properties file don't inherited 
from the base project to subprojects. But I saw message in mailing list 
that this feature will be implemented in future versions of maven (may 
be next release). I think that this is what you want.



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


Re: Extending A Project Variables

Posted by Alain Javier Guarnieri del Gesu <ja...@ajgdg.com>.
* Konstantin Shaposhnikov <k8...@tut.by> [2003-11-03 04:43]:
> Alain Javier Guarnieri del Gesu wrote:
> 
> >* Konstantin Shaposhnikov <k8...@tut.by> [2003-11-02 17:33]:
> >
> >>On 20:05 Sat 01 Nov     , Alain Javier Guarnieri del Gesu wrote:
> >>
> >>>Is it possible to define a property in an extended project using the
> >>>same value in the master project?
> >>>
> >>><!-- In master. -->
> >>><project>
> >>> <siteDirectory>/www/ajgdg.com/codearea</siteDirectory>        
> >>></project> 
> >>>
> >>><!-- In extension. -->
> >>><project>
> >>> <extends>master.xml</extends>
> >>> <siteDirectory>${pom.siteDirectory}/project1</siteDirectory>
> >>></project> 
> >>>
> >>>It seems that my subproject values are all just a string prepended
> >>>to a common prefix. How have other folks handled this?
> >
> >
> >>This technique works fine for my projects.
> >
> >
> >I'm running out of memory when I do this. Is it possible to set
> >arbitrary variables in a pom? Could I have a pom.siteBaseDirectory
> >variable? (Runs off to check.) Nope.
> >
> Oh, I was not very carefull while reading your answer. In my case 
> situation slightly different, but I think you can handle similar 
> properties in subprojects like me:
> 
> In master:
> <project>
> <siteDirectory>/www/ajgdg.com/codearea/${pom.artifactId}</siteDirectory>
> </project>
> 
> In extension:
> <project>
>   <id>project1</id>
> </project>
> 
> So sitedirectory for extension would be "/www/ajgdg.com/codearea/project1"

That's the direction I've taken. I suppose too, that this will be
much easier when project properties are inheritied. Something to
provide a common set of user defined variables.

-- 
Alain Javier Guarnieri del Gesu - javi@ajgdg.com

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


Re: Extending A Project Variables

Posted by Konstantin Shaposhnikov <k8...@tut.by>.
Alain Javier Guarnieri del Gesu wrote:

> * Konstantin Shaposhnikov <k8...@tut.by> [2003-11-02 17:33]:
> 
>>On 20:05 Sat 01 Nov     , Alain Javier Guarnieri del Gesu wrote:
>>
>>>Is it possible to define a property in an extended project using the
>>>same value in the master project?
>>>
>>><!-- In master. -->
>>><project>
>>>  <siteDirectory>/www/ajgdg.com/codearea</siteDirectory>        
>>></project> 
>>>
>>><!-- In extension. -->
>>><project>
>>>  <extends>master.xml</extends>
>>>  <siteDirectory>${pom.siteDirectory}/project1</siteDirectory>
>>></project> 
>>>
>>>It seems that my subproject values are all just a string prepended
>>>to a common prefix. How have other folks handled this?
> 
> 
>>This technique works fine for my projects.
> 
> 
> I'm running out of memory when I do this. Is it possible to set
> arbitrary variables in a pom? Could I have a pom.siteBaseDirectory
> variable? (Runs off to check.) Nope.
> 
Oh, I was not very carefull while reading your answer. In my case 
situation slightly different, but I think you can handle similar 
properties in subprojects like me:

In master:
<project>
<siteDirectory>/www/ajgdg.com/codearea/${pom.artifactId}</siteDirectory>
</project>

In extension:
<project>
   <id>project1</id>
</project>

So sitedirectory for extension would be "/www/ajgdg.com/codearea/project1"




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


Re: Extending A Project Variables

Posted by Alain Javier Guarnieri del Gesu <ja...@ajgdg.com>.
* Konstantin Shaposhnikov <k8...@tut.by> [2003-11-02 17:33]:
> On 20:05 Sat 01 Nov     , Alain Javier Guarnieri del Gesu wrote:
> > Is it possible to define a property in an extended project using the
> > same value in the master project?
> > 
> > <!-- In master. -->
> > <project>
> >   <siteDirectory>/www/ajgdg.com/codearea</siteDirectory>        
> > </project> 
> > 
> > <!-- In extension. -->
> > <project>
> >   <extends>master.xml</extends>
> >   <siteDirectory>${pom.siteDirectory}/project1</siteDirectory>
> > </project> 
> > 
> > It seems that my subproject values are all just a string prepended
> > to a common prefix. How have other folks handled this?

> This technique works fine for my projects.

I'm running out of memory when I do this. Is it possible to set
arbitrary variables in a pom? Could I have a pom.siteBaseDirectory
variable? (Runs off to check.) Nope.

-- 
Alain Javier Guarnieri del Gesu - javi@ajgdg.com

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


Re: Extending A Project Variables

Posted by Konstantin Shaposhnikov <k8...@tut.by>.
This technique works fine for my projects.

On 20:05 Sat 01 Nov     , Alain Javier Guarnieri del Gesu wrote:
> Is it possible to define a property in an extended project using the
> same value in the master project?
> 
> <!-- In master. -->
> <project>
>   <siteDirectory>/www/ajgdg.com/codearea</siteDirectory>        
> </project> 
> 
> <!-- In extension. -->
> <project>
>   <extends>master.xml</extends>
>   <siteDirectory>${pom.siteDirectory}/project1</siteDirectory>
> </project> 
> 
> It seems that my subproject values are all just a string prepended
> to a common prefix. How have other folks handled this?
> 
> -- 
> Alain Javier Guarnieri del Gesu - javi@ajgdg.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

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


Extending an extended project - transitive inheritance

Posted by Dominik Roblek <dr...@yahoo.com>.
Is it possible to extend an extended project? I tried
the following:

*** Root project ***
<project>
...
</project> 

*** Sub-project in sub-directory ***
<project>
  <extend>${basedir}/../project.xml</extend>
  ...
</project> 

*** Sub-sub-project in sub-sub-directory ***
<project>
  <extend>${basedir}/../project.xml</extend>
  ...
</project> 

Unforunatelly it didn't work for me. How should I
handle situations where project B is a subproject of
project A and has it's own subproject C?

Dominik

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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