You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Hoffer <dh...@gmail.com> on 2009/04/10 18:41:04 UTC
Site deploy to local directory
Can someone help with a simple site plugin question?
I am just trying to build a site of a multi-module project and want to
publish it to my local hard drive. Here is my pom.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
<distributionManagement>
...
<site>
<id>website</id>
<url>file://${basedir}/target/website</url>
</site>
</distributionManagement>
If I run mvn site:deploy it creates only part of the site at
${basedir}/target/website, the root content is there and just one project
module, it's like it just quit!
If I run mvn site:stage it creates a valid site with all links working but
at a project specific staging location.
If I run mvn site:stage-deploy it creates a valid site but all links are
back up to the original module target locations.
None of these options create a valid web site under the specified URL
location. How can I do this?
Re: Site deploy to local directory
Posted by David Hoffer <dh...@gmail.com>.
That is the behavior that I expected but it did not work. Instead the child
modules put their site output in their own target folder. I could not find
any solution other than redirect it back up.
BTW, I'm using v2.1.
-Dave
On Fri, Apr 10, 2009 at 5:27 PM, Wendy Smoak <ws...@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 4:06 PM, David Hoffer <dh...@gmail.com> wrote:
> > Yes file:///tmp/website would work but not for the child modules; its in
> the
> > child that I have the issue.
>
> It should work, and you shouldn't have to specify a site url in each
> child module.
>
> For example the site at [1] comes from the pom [2] which does not have
> a distributionManagement section. The url is inherited from the
> parent, then the artifactId is appended for each child module.
>
> [1] http://continuum.apache.org/ref/1.3.2/continuum-core/
> [2]
> http://svn.apache.org/repos/asf/continuum/tags/continuum-1.3.2/continuum-core/pom.xml
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
Re: Site deploy to local directory
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Apr 10, 2009 at 4:06 PM, David Hoffer <dh...@gmail.com> wrote:
> Yes file:///tmp/website would work but not for the child modules; its in the
> child that I have the issue.
It should work, and you shouldn't have to specify a site url in each
child module.
For example the site at [1] comes from the pom [2] which does not have
a distributionManagement section. The url is inherited from the
parent, then the artifactId is appended for each child module.
[1] http://continuum.apache.org/ref/1.3.2/continuum-core/
[2] http://svn.apache.org/repos/asf/continuum/tags/continuum-1.3.2/continuum-core/pom.xml
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Site deploy to local directory
Posted by David Hoffer <dh...@gmail.com>.
Yes file:///tmp/website would work but not for the child modules; its in the
child that I have the issue.
I got it working by specifying the parent folder as two levels up from each
child (module). (it seems there should be a maven property to get this
directly in the child.)
Actually /target/website worked fine because I'm deploying to a subfolder
after everything else is done. Then our CI (TeamCity) picks up the contents
from here and publishes the entire website for us, so we just use this as a
temp folder.
T-Dave
On Fri, Apr 10, 2009 at 4:30 PM, Wendy Smoak <ws...@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 9:41 AM, David Hoffer <dh...@gmail.com> wrote:
> > Can someone help with a simple site plugin question?
> >
> > I am just trying to build a site of a multi-module project and want to
> > publish it to my local hard drive. Here is my pom.
> >
> > <plugins>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-site-plugin</artifactId>
> > <version>2.0</version>
> > </plugin>
> > </plugins>
> > <distributionManagement>
> > ...
> > <site>
> > <id>website</id>
> > <url>file://${basedir}/target/website</url>
> > </site>
> > </distributionManagement>
> >
> > If I run mvn site:deploy it creates only part of the site at
> > ${basedir}/target/website, the root content is there and just one project
> > module, it's like it just quit!
>
> What happens if you publish to file:///tmp/website?
>
> Maven uses the 'target' directory as its work area, trying to publish
> there doesn't make sense. And ${basedir} is different in each
> submodule so as you've discovered, it's not going to work when
> inherited.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Site deploy to local directory
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Apr 10, 2009 at 9:41 AM, David Hoffer <dh...@gmail.com> wrote:
> Can someone help with a simple site plugin question?
>
> I am just trying to build a site of a multi-module project and want to
> publish it to my local hard drive. Here is my pom.
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-site-plugin</artifactId>
> <version>2.0</version>
> </plugin>
> </plugins>
> <distributionManagement>
> ...
> <site>
> <id>website</id>
> <url>file://${basedir}/target/website</url>
> </site>
> </distributionManagement>
>
> If I run mvn site:deploy it creates only part of the site at
> ${basedir}/target/website, the root content is there and just one project
> module, it's like it just quit!
What happens if you publish to file:///tmp/website?
Maven uses the 'target' directory as its work area, trying to publish
there doesn't make sense. And ${basedir} is different in each
submodule so as you've discovered, it's not going to work when
inherited.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Site deploy to local directory
Posted by David Hoffer <dh...@gmail.com>.
I don't think this is the case for sharing; all I am trying to do is specify
the site deployment folder for child modules.
-Dave
On Fri, Apr 10, 2009 at 4:04 PM, Wendy Smoak <ws...@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 12:29 PM, David Hoffer <dh...@gmail.com> wrote:
> > That's what it was...anybody know a better way to get the parent build
> dir
> > than
> >
> > ${project.build.directory}/../../target/
>
> Why? Normally you share things through the repository.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Site deploy to local directory
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Apr 10, 2009 at 12:29 PM, David Hoffer <dh...@gmail.com> wrote:
> That's what it was...anybody know a better way to get the parent build dir
> than
>
> ${project.build.directory}/../../target/
Why? Normally you share things through the repository.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Site deploy to local directory
Posted by David Hoffer <dh...@gmail.com>.
That's what it was...anybody know a better way to get the parent build dir
than
${project.build.directory}/../../target/
-Dave
On Fri, Apr 10, 2009 at 12:47 PM, David Hoffer <dh...@gmail.com> wrote:
> Perhaps my macro is wrong.
>
> How can I get parent's .${project.build.directory} in child?
>
> -Dave
>
>
> On Fri, Apr 10, 2009 at 12:28 PM, David Hoffer <dh...@gmail.com> wrote:
>
>> I think I forgot something, mvn site-deploy should deploy site to URL
>> specified in site section right?
>>
>> The parent project does deploy here correctly. However the child modules
>> do not. So I figured each child pom must need its own site configuration to
>> append its module name to the URL, like:
>>
>> <site>
>> <id>website</id>
>> <url>${website-root}/${project.artifactId}</url>
>> </site>
>>
>> However this still doesn't work, the children keep putting their output in
>> their own target/website folder.
>>
>> How can I enable the children to use the children's site URL?
>>
>> -Dave
>>
>>
>>
>>
>> On Fri, Apr 10, 2009 at 11:11 AM, David Hoffer <dh...@gmail.com>wrote:
>>
>>> That doesn't really help it just overrides
>>> <url>file://${basedir}/target/website</url>
>>>
>>> It still puts the content at %stagingDirectory%localhost/[SVN check out
>>> folder]/target/website/[website content here]
>>>
>>> I need a fixed location relative to %stagingDirectory%. I don't want
>>> [SVN check out folder] to be part of the destination because it isn't
>>> constent.
>>>
>>> -Dave
>>>
>>>
>>> On Fri, Apr 10, 2009 at 10:56 AM, Stevo Slavić <ss...@gmail.com>wrote:
>>>
>>>> Use "mvn %some_other_goal% site:stage
>>>> -DstagingDirectory=%desired_site_dir%"
>>>>
>>>> Regards,
>>>> Stevo.
>>>>
>>>> On Fri, Apr 10, 2009 at 6:41 PM, David Hoffer <dh...@gmail.com>
>>>> wrote:
>>>>
>>>> > Can someone help with a simple site plugin question?
>>>> >
>>>> > I am just trying to build a site of a multi-module project and want to
>>>> > publish it to my local hard drive. Here is my pom.
>>>> >
>>>> > <plugins>
>>>> > <plugin>
>>>> > <groupId>org.apache.maven.plugins</groupId>
>>>> > <artifactId>maven-site-plugin</artifactId>
>>>> > <version>2.0</version>
>>>> > </plugin>
>>>> > </plugins>
>>>> > <distributionManagement>
>>>> > ...
>>>> > <site>
>>>> > <id>website</id>
>>>> > <url>file://${basedir}/target/website</url>
>>>> > </site>
>>>> > </distributionManagement>
>>>> >
>>>> > If I run mvn site:deploy it creates only part of the site at
>>>> > ${basedir}/target/website, the root content is there and just one
>>>> project
>>>> > module, it's like it just quit!
>>>> >
>>>> > If I run mvn site:stage it creates a valid site with all links working
>>>> but
>>>> > at a project specific staging location.
>>>> >
>>>> > If I run mvn site:stage-deploy it creates a valid site but all links
>>>> are
>>>> > back up to the original module target locations.
>>>> >
>>>> > None of these options create a valid web site under the specified URL
>>>> > location. How can I do this?
>>>> >
>>>>
>>>
>>>
>>
>
Re: Site deploy to local directory
Posted by David Hoffer <dh...@gmail.com>.
Perhaps my macro is wrong.
How can I get parent's .${project.build.directory} in child?
-Dave
On Fri, Apr 10, 2009 at 12:28 PM, David Hoffer <dh...@gmail.com> wrote:
> I think I forgot something, mvn site-deploy should deploy site to URL
> specified in site section right?
>
> The parent project does deploy here correctly. However the child modules
> do not. So I figured each child pom must need its own site configuration to
> append its module name to the URL, like:
>
> <site>
> <id>website</id>
> <url>${website-root}/${project.artifactId}</url>
> </site>
>
> However this still doesn't work, the children keep putting their output in
> their own target/website folder.
>
> How can I enable the children to use the children's site URL?
>
> -Dave
>
>
>
>
> On Fri, Apr 10, 2009 at 11:11 AM, David Hoffer <dh...@gmail.com> wrote:
>
>> That doesn't really help it just overrides
>> <url>file://${basedir}/target/website</url>
>>
>> It still puts the content at %stagingDirectory%localhost/[SVN check out
>> folder]/target/website/[website content here]
>>
>> I need a fixed location relative to %stagingDirectory%. I don't want [SVN
>> check out folder] to be part of the destination because it isn't constent.
>>
>> -Dave
>>
>>
>> On Fri, Apr 10, 2009 at 10:56 AM, Stevo Slavić <ss...@gmail.com> wrote:
>>
>>> Use "mvn %some_other_goal% site:stage
>>> -DstagingDirectory=%desired_site_dir%"
>>>
>>> Regards,
>>> Stevo.
>>>
>>> On Fri, Apr 10, 2009 at 6:41 PM, David Hoffer <dh...@gmail.com>
>>> wrote:
>>>
>>> > Can someone help with a simple site plugin question?
>>> >
>>> > I am just trying to build a site of a multi-module project and want to
>>> > publish it to my local hard drive. Here is my pom.
>>> >
>>> > <plugins>
>>> > <plugin>
>>> > <groupId>org.apache.maven.plugins</groupId>
>>> > <artifactId>maven-site-plugin</artifactId>
>>> > <version>2.0</version>
>>> > </plugin>
>>> > </plugins>
>>> > <distributionManagement>
>>> > ...
>>> > <site>
>>> > <id>website</id>
>>> > <url>file://${basedir}/target/website</url>
>>> > </site>
>>> > </distributionManagement>
>>> >
>>> > If I run mvn site:deploy it creates only part of the site at
>>> > ${basedir}/target/website, the root content is there and just one
>>> project
>>> > module, it's like it just quit!
>>> >
>>> > If I run mvn site:stage it creates a valid site with all links working
>>> but
>>> > at a project specific staging location.
>>> >
>>> > If I run mvn site:stage-deploy it creates a valid site but all links
>>> are
>>> > back up to the original module target locations.
>>> >
>>> > None of these options create a valid web site under the specified URL
>>> > location. How can I do this?
>>> >
>>>
>>
>>
>
Re: Site deploy to local directory
Posted by David Hoffer <dh...@gmail.com>.
I think I forgot something, mvn site-deploy should deploy site to URL
specified in site section right?
The parent project does deploy here correctly. However the child modules do
not. So I figured each child pom must need its own site configuration to
append its module name to the URL, like:
<site>
<id>website</id>
<url>${website-root}/${project.artifactId}</url>
</site>
However this still doesn't work, the children keep putting their output in
their own target/website folder.
How can I enable the children to use the children's site URL?
-Dave
On Fri, Apr 10, 2009 at 11:11 AM, David Hoffer <dh...@gmail.com> wrote:
> That doesn't really help it just overrides
> <url>file://${basedir}/target/website</url>
>
> It still puts the content at %stagingDirectory%localhost/[SVN check out
> folder]/target/website/[website content here]
>
> I need a fixed location relative to %stagingDirectory%. I don't want [SVN
> check out folder] to be part of the destination because it isn't constent.
>
> -Dave
>
>
> On Fri, Apr 10, 2009 at 10:56 AM, Stevo Slavić <ss...@gmail.com> wrote:
>
>> Use "mvn %some_other_goal% site:stage
>> -DstagingDirectory=%desired_site_dir%"
>>
>> Regards,
>> Stevo.
>>
>> On Fri, Apr 10, 2009 at 6:41 PM, David Hoffer <dh...@gmail.com> wrote:
>>
>> > Can someone help with a simple site plugin question?
>> >
>> > I am just trying to build a site of a multi-module project and want to
>> > publish it to my local hard drive. Here is my pom.
>> >
>> > <plugins>
>> > <plugin>
>> > <groupId>org.apache.maven.plugins</groupId>
>> > <artifactId>maven-site-plugin</artifactId>
>> > <version>2.0</version>
>> > </plugin>
>> > </plugins>
>> > <distributionManagement>
>> > ...
>> > <site>
>> > <id>website</id>
>> > <url>file://${basedir}/target/website</url>
>> > </site>
>> > </distributionManagement>
>> >
>> > If I run mvn site:deploy it creates only part of the site at
>> > ${basedir}/target/website, the root content is there and just one
>> project
>> > module, it's like it just quit!
>> >
>> > If I run mvn site:stage it creates a valid site with all links working
>> but
>> > at a project specific staging location.
>> >
>> > If I run mvn site:stage-deploy it creates a valid site but all links are
>> > back up to the original module target locations.
>> >
>> > None of these options create a valid web site under the specified URL
>> > location. How can I do this?
>> >
>>
>
>
Re: Site deploy to local directory
Posted by David Hoffer <dh...@gmail.com>.
That doesn't really help it just overrides
<url>file://${basedir}/target/website</url>
It still puts the content at %stagingDirectory%localhost/[SVN check out
folder]/target/website/[website content here]
I need a fixed location relative to %stagingDirectory%. I don't want [SVN
check out folder] to be part of the destination because it isn't constent.
-Dave
On Fri, Apr 10, 2009 at 10:56 AM, Stevo Slavić <ss...@gmail.com> wrote:
> Use "mvn %some_other_goal% site:stage
> -DstagingDirectory=%desired_site_dir%"
>
> Regards,
> Stevo.
>
> On Fri, Apr 10, 2009 at 6:41 PM, David Hoffer <dh...@gmail.com> wrote:
>
> > Can someone help with a simple site plugin question?
> >
> > I am just trying to build a site of a multi-module project and want to
> > publish it to my local hard drive. Here is my pom.
> >
> > <plugins>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-site-plugin</artifactId>
> > <version>2.0</version>
> > </plugin>
> > </plugins>
> > <distributionManagement>
> > ...
> > <site>
> > <id>website</id>
> > <url>file://${basedir}/target/website</url>
> > </site>
> > </distributionManagement>
> >
> > If I run mvn site:deploy it creates only part of the site at
> > ${basedir}/target/website, the root content is there and just one project
> > module, it's like it just quit!
> >
> > If I run mvn site:stage it creates a valid site with all links working
> but
> > at a project specific staging location.
> >
> > If I run mvn site:stage-deploy it creates a valid site but all links are
> > back up to the original module target locations.
> >
> > None of these options create a valid web site under the specified URL
> > location. How can I do this?
> >
>
Re: Site deploy to local directory
Posted by Stevo Slavić <ss...@gmail.com>.
Use "mvn %some_other_goal% site:stage -DstagingDirectory=%desired_site_dir%"
Regards,
Stevo.
On Fri, Apr 10, 2009 at 6:41 PM, David Hoffer <dh...@gmail.com> wrote:
> Can someone help with a simple site plugin question?
>
> I am just trying to build a site of a multi-module project and want to
> publish it to my local hard drive. Here is my pom.
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-site-plugin</artifactId>
> <version>2.0</version>
> </plugin>
> </plugins>
> <distributionManagement>
> ...
> <site>
> <id>website</id>
> <url>file://${basedir}/target/website</url>
> </site>
> </distributionManagement>
>
> If I run mvn site:deploy it creates only part of the site at
> ${basedir}/target/website, the root content is there and just one project
> module, it's like it just quit!
>
> If I run mvn site:stage it creates a valid site with all links working but
> at a project specific staging location.
>
> If I run mvn site:stage-deploy it creates a valid site but all links are
> back up to the original module target locations.
>
> None of these options create a valid web site under the specified URL
> location. How can I do this?
>