You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2004/03/09 02:04:42 UTC
Newbie question
I'm trying to use maven to build a master site with multiple subprojects,
like db.apache.org
I've worked out all the kinks, except one. The machine that the site lives
on is likely to move. So, I wanted to define the base url somewhere globally
and then base the rest of my url's from there.
This is my first try.
default_projects.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<base-url>http://projects.site.com:8080</base-url>
</project>
project.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>
<pomVersion>3</pomVersion>
<extend>${basedir}/../project_defaults.xml</extend>
<url>${pom.base-url}/adept-open</url>
</project>
As the experts already know, and I found out through expirementation, this
doesn't work.
What I really want to do is somehow access values I've set in my
default_projects.xml file from my projects.xml.
If I'm approaching the problem wrong, let me know because I could just as
easily use a global properties file if I could reference it somehow like the
default_projects.xml file.
If this is covered in the manual somewhere, please point me in the right
direction. I tried to find references to what properties are available
during the resolution of the POM by Jelly, but I couldn't find it.
Thanks in advance,
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Newbie question
Posted by Brian Enigma <en...@netninja.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A little more complex and slightly less straightforward, I would
assume you could do this using XML entity trickery. For instance:
<!DOCTYPE project [
<!ENTITY pomBaseUrl "http://server.com">
]>
<project>
...
<url>&pomBaseUrl;/adept-open</url>
...
</project>
-Brian
On Mar 8, 2004, at 5:04 PM, Hensley, Richard wrote:
> I'm trying to use maven to build a master site with multiple
> subprojects,
> like db.apache.org
>
> I've worked out all the kinks, except one. The machine that the site
> lives
> on is likely to move. So, I wanted to define the base url somewhere
> globally
> and then base the rest of my url's from there.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
> <pomVersion>3</pomVersion>
> <extend>${basedir}/../project_defaults.xml</extend>
> <url>${pom.base-url}/adept-open</url>
> </project>
>
> As the experts already know, and I found out through expirementation,
> this
> doesn't work.
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFATV2V0dKNWt3rpSURAsmgAJ9TxdXBpHv6k0I00sij2aH/hdjK5wCgqhyG
zDHICbMXmf9KecEtjNNysOE=
=LRhO
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Newbie question
Posted by di...@multitask.com.au.
"Hensley, Richard" <Ri...@McKesson.com> wrote on 09/03/2004
12:04:42 PM:
> I'm trying to use maven to build a master site with multiple
subprojects,
> like db.apache.org
http://maven-plugins.sourceforge.net does this using the multiproject
plugin.
[snip]
> default_projects.xml
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
> <pomVersion>3</pomVersion>
Add:
> <url>http://projects.site.com:8080</url>
[snip]
> project.xml
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project>
> <pomVersion>3</pomVersion>
> <extend>${basedir}/../project_defaults.xml</extend>
> <url>${pom.base-url}/adept-open</url>
Maybe use ${pom.parent.url}/adept-open
Or alternatively, what's the id/artifactId of the subproject. If that was
'adept-open' you could use:
${pom.artifactId}
--
dIon Gillard, Multitask Consulting