You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guimiot Isabelle (JIRA)" <ji...@codehaus.org> on 2007/12/07 15:24:57 UTC

[jira] Created: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

site:deploy possibility to choose directory tree when using sub-modules
-----------------------------------------------------------------------

                 Key: MSITE-277
                 URL: http://jira.codehaus.org/browse/MSITE-277
             Project: Maven 2.x Site Plugin
          Issue Type: Improvement
          Components: site:deploy
    Affects Versions: 2.0-beta-6
            Reporter: Guimiot Isabelle
            Priority: Minor


I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :

[eclipse_workspace]/root
[eclipse_workspace]/sub1
[eclipse_workspace]/sub2

Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :

[publish]/root
[publish]/root/sub1
[publish]/root/sub2

I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :

[publish]/root
[publish]/sub1
[publish]/sub2

So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?

thx
Isabelle




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl closed MSITE-277.
-------------------------------

    Resolution: Not A Bug
      Assignee: Lukas Theussl

The deploy location is uniquely determined by distMngmnt.site.url, there is a default inheritance mechanism that is used consistently by the site plugin. If you want to avoid duplication, use a default directory layout. If you use a custom layout, don't complain that you have to adjust your build. ;)

> site:deploy possibility to choose directory tree when using sub-modules
> -----------------------------------------------------------------------
>
>                 Key: MSITE-277
>                 URL: http://jira.codehaus.org/browse/MSITE-277
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Improvement
>          Components: site:deploy, site:stage(-deploy)
>    Affects Versions: 2.0-beta-6
>            Reporter: Guimiot Isabelle
>            Assignee: Lukas Theussl
>            Priority: Minor
>
> I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :
> [eclipse_workspace]/root
> [eclipse_workspace]/sub1
> [eclipse_workspace]/sub2
> Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :
> [publish]/root
> [publish]/root/sub1
> [publish]/root/sub2
> I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :
> [publish]/root
> [publish]/sub1
> [publish]/sub2
> So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?
> thx
> Isabelle

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

Posted by "Richard Gomes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=191915#action_191915 ] 

Richard Gomes edited comment on MSITE-277 at 9/22/09 8:23 PM:
--------------------------------------------------------------

Hi,

I had a bad time too with this 'issue'/functionality... depending how you need it.
Yes... It would be handy to tell Maven that I use flat project model.

Below you can see how I organized my master POM.

{noformat}
    <!-- This is the master POM -->
    <distributionManagement>
        ...
        <!-- NOTES:
          * maven-site-plugin gets confused by flat project model employed by Eclipse :(
          
          * It's also confused to configure an staging URL because maven-site-plugin takes
             the staging URL from <configuration> and not from <distributionManagement>.
          
          * We circumvented these difficulties by tweaking siteURL depending on a profile.
             So, in order to 'deploy' to a staging server, please define a profile called 
             'staging' in your settings.xml file like shown below:
           
                 <settings>
                    ...
                    <profiles>
                        <profile>
                            <id>staging</id>
                            <properties>
                                <props.site.deploy.url>scp://localhost:/srv/jquantlib.org/sites</props.site.deploy.url>
                            </properties>
                        </profile>
                    </profiles>
                    ...
                 </settings>
           
             You can deploy to a staging server like this:
           
                  mvn clean site-deploy -P staging
           
             The big drawback is that we have only one <site> for 2 purposes, which is not very good :(
             One way to circumvent this problem is deploying via file: protocol to your local web server.
          
          * Every project MUST REDEFINE the <site> section as it is (no modifications are needed!) in order
             to override the way Maven promotes inheritance which supposes a hierarchical model.
        -->
        <site>
            <id>site</id>
            <name>${project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>

    </distributionManagement>
{noformat}

... and all projects need to copy/paste the same block :( 

{noformat}
    <-- This is a 'child' project -->
    <distributionManagement>
        <!-- NOTE: <site> entry cannot be inherited.
               It means to say you need to copy/paste this text as it is to all child projects.
               See comments in the parent POM for more information.
          -->
        <site>
            <id>site</id>
            <name>${project.project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>
    </distributionManagement>
{noformat}

As you can see, the trick is defining a profile 'staging' in settings.xml:

{noformat}
<settings>
	...
	<profiles>
	<profile>
		<id>staging</id>
		<properties>
		<props.site.deploy.url>file:///srv/jquantlib.org/sites</props.site.deploy.url>
		</properties>
	</profile>
	</profiles>
	...
</settings>
{noformat}
Note: I'm using file: protocol in order to deploy to my local webserver.

And then you can call Maven like this:

{noformat}
mvn clean site-deploy -P staging
{noformat}


      was (Author: rgomes1997):
    Hi,

I had a bad time too with this 'issue'/functionality... depending how you need it.
Yes... It would be handy to tell Maven that I use flat project model.

Below you can see how I organized my master POM.

{noformat}
    <!-- This is the master POM -->
    <distributionManagement>
        ...
        <!-- NOTES:
          * maven-site-plugin gets confused by flat project model employed by Eclipse :(
          
          * It's also confused to configure an staging URL because maven-site-plugin takes
             the staging URL from <configuration> and not from <distributionManagement>.
          
          * We circumvented these difficulties by tweaking siteURL depending on a profile.
             So, in order to 'deploy' to a staging server, please define a profile called 
             'staging' in your settings.xml file like shown below:
           
                 <settings>
                    ...
                    <profiles>
                        <profile>
                            <id>staging</id>
                            <properties>
                                <props.site.deploy.url>scp://localhost:/srv/jquantlib.org/sites</props.site.deploy.url>
                            </properties>
                        </profile>
                    </profiles>
                    ...
                 </settings>
           
             You can deploy to a staging server like this:
           
                  mvn clean site-deploy -P staging
           
             The big drawback is that we have only one <site> for 2 purposes, which is not very good :(
             One way to circumvent this problem is deploying via file: protocol to your local web server.
          
          * Every project MUST REDEFINE the <site> section as it is (no modification are needed!) in order
             to override the way Maven promoves inheritance which supposes a hierarchical model.
        -->
        <site>
            <id>site</id>
            <name>${project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>

    </distributionManagement>
{noformat}

... and all projects need to copy/paste the same block :( 

{noformat}
    <-- This is a 'child' project -->
    <distributionManagement>
        <!-- NOTE: <site> entry cannot be inherited.
               It means to say you need to copy/paste this text as it is to all child projects.
               See comments in the parent POM for more information.
          -->
        <site>
            <id>site</id>
            <name>${project.project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>
    </distributionManagement>
{noformat}

As you can see, the trick is defining a profile 'staging' in settings.xml:

{noformat}
<settings>
	...
	<profiles>
	<profile>
		<id>staging</id>
		<properties>
		<props.site.deploy.url>file:///srv/jquantlib.org/sites</props.site.deploy.url>
		</properties>
	</profile>
	</profiles>
	...
</settings>
{noformat}
Note: I'm using file: protocol in order to deploy to my local webserver.

And then you can call Maven like this:

{noformat}
mvn clean site-deploy -P staging
{noformat}

  
> site:deploy possibility to choose directory tree when using sub-modules
> -----------------------------------------------------------------------
>
>                 Key: MSITE-277
>                 URL: http://jira.codehaus.org/browse/MSITE-277
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>          Components: site:deploy
>    Affects Versions: 2.0-beta-6
>            Reporter: Guimiot Isabelle
>            Priority: Minor
>
> I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :
> [eclipse_workspace]/root
> [eclipse_workspace]/sub1
> [eclipse_workspace]/sub2
> Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :
> [publish]/root
> [publish]/root/sub1
> [publish]/root/sub2
> I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :
> [publish]/root
> [publish]/sub1
> [publish]/sub2
> So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?
> thx
> Isabelle

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

Posted by "Richard Gomes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=191915#action_191915 ] 

Richard Gomes edited comment on MSITE-277 at 9/22/09 8:25 PM:
--------------------------------------------------------------

Hi,

I had a bad time too with this 'issue'/functionality... depending how you need it.
Yes... It would be handy to tell Maven that I use flat project model.

Below you can see how I organized my master POM.

{noformat}
    <!-- This is the master POM -->
    <distributionManagement>
        ...
        <!-- NOTES:
          * maven-site-plugin gets confused by flat project model employed by Eclipse :(
          
          * It's also confused to configure an staging URL because maven-site-plugin takes
             the staging URL from <configuration> and not from <distributionManagement>.
          
          * We circumvented these difficulties by tweaking siteURL depending on a profile.
             So, in order to 'deploy' to a staging server, please define a profile called 
             'staging' in your settings.xml file like shown below:
           
                 <settings>
                    ...
                    <profiles>
                        <profile>
                            <id>staging</id>
                            <properties>
                                <props.site.deploy.url>scp://localhost:/srv/jquantlib.org/sites</props.site.deploy.url>
                            </properties>
                        </profile>
                    </profiles>
                    ...
                 </settings>
           
             You can deploy to a staging server like this:
           
                  mvn clean site-deploy -P staging
           
             The big drawback is that we have only one <site> for 2 purposes, which is not very good :(
             One way to circumvent this problem is deploying via file: protocol to your local web server.
          
          * Every project MUST REDEFINE the <site> section as it is (no modifications are needed!) in order
             to override the way Maven promotes inheritance which supposes a hierarchical model.
        -->
        <site>
            <id>site</id>
            <name>${project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>

    </distributionManagement>
{noformat}

... and all projects need to copy/paste the same block :( 

{noformat}
    <-- This is a 'child' project -->
    <distributionManagement>
        <!-- NOTE: <site> entry cannot be inherited.
               It means to say you need to copy/paste this text as it is to all child projects.
               See comments in the parent POM for more information.
          -->
        <site>
            <id>site</id>
            <name>${project.project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>
    </distributionManagement>
{noformat}

As you can see, the trick is defining a profile 'staging' in settings.xml:

{noformat}
<settings>
	...
	<profiles>
	<profile>
		<id>staging</id>
		<properties>
		<props.site.deploy.url>file:///srv/jquantlib.org/sites</props.site.deploy.url>
		</properties>
	</profile>
	</profiles>
	...
</settings>
{noformat}
Note: I'm using file: protocol in order to deploy to my local webserver.

And then you can call Maven like this:

{noformat}
mvn clean site-deploy -P staging
{noformat}

You can see these sites published here: http://www.jquantlib.org/sites/

Thanks

Richard Gomes
http://www.jquantlib.org/index.php/User:RichardGomes


      was (Author: rgomes1997):
    Hi,

I had a bad time too with this 'issue'/functionality... depending how you need it.
Yes... It would be handy to tell Maven that I use flat project model.

Below you can see how I organized my master POM.

{noformat}
    <!-- This is the master POM -->
    <distributionManagement>
        ...
        <!-- NOTES:
          * maven-site-plugin gets confused by flat project model employed by Eclipse :(
          
          * It's also confused to configure an staging URL because maven-site-plugin takes
             the staging URL from <configuration> and not from <distributionManagement>.
          
          * We circumvented these difficulties by tweaking siteURL depending on a profile.
             So, in order to 'deploy' to a staging server, please define a profile called 
             'staging' in your settings.xml file like shown below:
           
                 <settings>
                    ...
                    <profiles>
                        <profile>
                            <id>staging</id>
                            <properties>
                                <props.site.deploy.url>scp://localhost:/srv/jquantlib.org/sites</props.site.deploy.url>
                            </properties>
                        </profile>
                    </profiles>
                    ...
                 </settings>
           
             You can deploy to a staging server like this:
           
                  mvn clean site-deploy -P staging
           
             The big drawback is that we have only one <site> for 2 purposes, which is not very good :(
             One way to circumvent this problem is deploying via file: protocol to your local web server.
          
          * Every project MUST REDEFINE the <site> section as it is (no modifications are needed!) in order
             to override the way Maven promotes inheritance which supposes a hierarchical model.
        -->
        <site>
            <id>site</id>
            <name>${project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>

    </distributionManagement>
{noformat}

... and all projects need to copy/paste the same block :( 

{noformat}
    <-- This is a 'child' project -->
    <distributionManagement>
        <!-- NOTE: <site> entry cannot be inherited.
               It means to say you need to copy/paste this text as it is to all child projects.
               See comments in the parent POM for more information.
          -->
        <site>
            <id>site</id>
            <name>${project.project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>
    </distributionManagement>
{noformat}

As you can see, the trick is defining a profile 'staging' in settings.xml:

{noformat}
<settings>
	...
	<profiles>
	<profile>
		<id>staging</id>
		<properties>
		<props.site.deploy.url>file:///srv/jquantlib.org/sites</props.site.deploy.url>
		</properties>
	</profile>
	</profiles>
	...
</settings>
{noformat}
Note: I'm using file: protocol in order to deploy to my local webserver.

And then you can call Maven like this:

{noformat}
mvn clean site-deploy -P staging
{noformat}

  
> site:deploy possibility to choose directory tree when using sub-modules
> -----------------------------------------------------------------------
>
>                 Key: MSITE-277
>                 URL: http://jira.codehaus.org/browse/MSITE-277
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>          Components: site:deploy
>    Affects Versions: 2.0-beta-6
>            Reporter: Guimiot Isabelle
>            Priority: Minor
>
> I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :
> [eclipse_workspace]/root
> [eclipse_workspace]/sub1
> [eclipse_workspace]/sub2
> Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :
> [publish]/root
> [publish]/root/sub1
> [publish]/root/sub2
> I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :
> [publish]/root
> [publish]/sub1
> [publish]/sub2
> So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?
> thx
> Isabelle

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl updated MSITE-277:
--------------------------------

    Component/s: site:stage(-deploy)

> site:deploy possibility to choose directory tree when using sub-modules
> -----------------------------------------------------------------------
>
>                 Key: MSITE-277
>                 URL: http://jira.codehaus.org/browse/MSITE-277
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Improvement
>          Components: site:deploy, site:stage(-deploy)
>    Affects Versions: 2.0-beta-6
>            Reporter: Guimiot Isabelle
>            Priority: Minor
>
> I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :
> [eclipse_workspace]/root
> [eclipse_workspace]/sub1
> [eclipse_workspace]/sub2
> Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :
> [publish]/root
> [publish]/root/sub1
> [publish]/root/sub2
> I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :
> [publish]/root
> [publish]/sub1
> [publish]/sub2
> So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?
> thx
> Isabelle

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

Posted by "Richard Gomes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=191915#action_191915 ] 

Richard Gomes edited comment on MSITE-277 at 9/22/09 8:22 PM:
--------------------------------------------------------------

Hi,

I had a bad time too with this 'issue'/functionality... depending how you need it.
Yes... It would be handy to tell Maven that I use flat project model.

Below you can see how I organized my master POM.

{noformat}
    <!-- This is the master POM -->
    <distributionManagement>
        ...
        <!-- NOTES:
          * maven-site-plugin gets confused by flat project model employed by Eclipse :(
          
          * It's also confused to configure an staging URL because maven-site-plugin takes
             the staging URL from <configuration> and not from <distributionManagement>.
          
          * We circumvented these difficulties by tweaking siteURL depending on a profile.
             So, in order to 'deploy' to a staging server, please define a profile called 
             'staging' in your settings.xml file like shown below:
           
                 <settings>
                    ...
                    <profiles>
                        <profile>
                            <id>staging</id>
                            <properties>
                                <props.site.deploy.url>scp://localhost:/srv/jquantlib.org/sites</props.site.deploy.url>
                            </properties>
                        </profile>
                    </profiles>
                    ...
                 </settings>
           
             You can deploy to a staging server like this:
           
                  mvn clean site-deploy -P staging
           
             The big drawback is that we have only one <site> for 2 purposes, which is not very good :(
             One way to circumvent this problem is deploying via file: protocol to your local web server.
          
          * Every project MUST REDEFINE the <site> section as it is (no modification are needed!) in order
             to override the way Maven promoves inheritance which supposes a hierarchical model.
        -->
        <site>
            <id>site</id>
            <name>${project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>

    </distributionManagement>
{noformat}

... and all projects need to copy/paste the same block :( 

{noformat}
    <-- This is a 'child' project -->
    <distributionManagement>
        <!-- NOTE: <site> entry cannot be inherited.
               It means to say you need to copy/paste this text as it is to all child projects.
               See comments in the parent POM for more information.
          -->
        <site>
            <id>site</id>
            <name>${project.project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>
    </distributionManagement>
{noformat}

As you can see, the trick is defining a profile 'staging' in settings.xml:

{noformat}
<settings>
	...
	<profiles>
	<profile>
		<id>staging</id>
		<properties>
		<props.site.deploy.url>file:///srv/jquantlib.org/sites</props.site.deploy.url>
		</properties>
	</profile>
	</profiles>
	...
</settings>
{noformat}
Note: I'm using file: protocol in order to deploy to my local webserver.

And then you can call Maven like this:

{noformat}
mvn clean site-deploy -P staging
{noformat}


      was (Author: rgomes1997):
    Hi,

I had a bad time too with this 'issue'/functionality... depending how you need it.
Yes... It would be handy to tell Maven that I use flat project model.

Below you can see how I organized my master POM.

{noformat}
    <!-- This is the master POM -->
    </distributionManagement>
        ...
        <!-- NOTES:
          * maven-site-plugin gets confused by flat project model employed by Eclipse :(
          
          * It's also confused to configure an staging URL because maven-site-plugin takes
             the staging URL from <configuration> and not from <distributionManagement>.
          
          * We circumvented these difficulties by tweaking siteURL depending on a profile.
             So, in order to 'deploy' to a staging server, please define a profile called 
             'staging' in your settings.xml file like shown below:
           
                 <settings>
                    ...
                    <profiles>
                        <profile>
                            <id>staging</id>
                            <properties>
                                <props.site.deploy.url>scp://localhost:/srv/jquantlib.org/sites</props.site.deploy.url>
                            </properties>
                        </profile>
                    </profiles>
                    ...
                 </settings>
           
             You can deploy to a staging server like this:
           
                  mvn clean site-deploy -P staging
           
             The big drawback is that we have only one <site> for 2 purposes, which is not very good :(
             One way to circumvent this problem is deploying via file: protocol to your local web server.
          
          * Every project MUST REDEFINE the <site> section as it is (no modification are needed!) in order
             to override the way Maven promoves inheritance which supposes a hierarchical model.
        -->
        <site>
            <id>site</id>
            <name>${project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>

    </distributionManagement>
{noformat}

... and all projects need to copy/paste the same block :( 

{noformat}
    <-- This is a 'child' project -->
    <distributionManagement>
        <!-- NOTE: <site> entry cannot be inherited.
               It means to say you need to copy/paste this text as it is to all child projects.
               See comments in the parent POM for more information.
          -->
        <site>
            <id>site</id>
            <name>${project.project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>
    </distributionManagement>
{noformat}

As you can see, the trick is defining a profile 'staging' in settings.xml:

{noformat}
<settings>
	...
	<profiles>
	<profile>
		<id>staging</id>
		<properties>
		<props.site.deploy.url>file:///srv/jquantlib.org/sites</props.site.deploy.url>
		</properties>
	</profile>
	</profiles>
	...
</settings>
{noformat}
Note: I'm using file: protocol in order to deploy to my local webserver.

And then you can call Maven like this:

{noformat}
mvn clean site-deploy -P staging
{noformat}

  
> site:deploy possibility to choose directory tree when using sub-modules
> -----------------------------------------------------------------------
>
>                 Key: MSITE-277
>                 URL: http://jira.codehaus.org/browse/MSITE-277
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>          Components: site:deploy
>    Affects Versions: 2.0-beta-6
>            Reporter: Guimiot Isabelle
>            Priority: Minor
>
> I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :
> [eclipse_workspace]/root
> [eclipse_workspace]/sub1
> [eclipse_workspace]/sub2
> Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :
> [publish]/root
> [publish]/root/sub1
> [publish]/root/sub2
> I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :
> [publish]/root
> [publish]/sub1
> [publish]/sub2
> So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?
> thx
> Isabelle

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

Posted by "Richard Gomes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=191915#action_191915 ] 

Richard Gomes commented on MSITE-277:
-------------------------------------

Hi,

I had a bad time too with this 'issue'/functionality... depending how you need it.
Yes... It would be handy to tell Maven that I use flat project model.

Below you can see how I organized my master POM.

{noformat}
    <!-- This is the master POM -->
    </distributionManagement>
        ...
        <!-- NOTES:
          * maven-site-plugin gets confused by flat project model employed by Eclipse :(
          
          * It's also confused to configure an staging URL because maven-site-plugin takes
             the staging URL from <configuration> and not from <distributionManagement>.
          
          * We circumvented these difficulties by tweaking siteURL depending on a profile.
             So, in order to 'deploy' to a staging server, please define a profile called 
             'staging' in your settings.xml file like shown below:
           
                 <settings>
                    ...
                    <profiles>
                        <profile>
                            <id>staging</id>
                            <properties>
                                <props.site.deploy.url>scp://localhost:/srv/jquantlib.org/sites</props.site.deploy.url>
                            </properties>
                        </profile>
                    </profiles>
                    ...
                 </settings>
           
             You can deploy to a staging server like this:
           
                  mvn clean site-deploy -P staging
           
             The big drawback is that we have only one <site> for 2 purposes, which is not very good :(
             One way to circumvent this problem is deploying via file: protocol to your local web server.
          
          * Every project MUST REDEFINE the <site> section as it is (no modification are needed!) in order
             to override the way Maven promoves inheritance which supposes a hierarchical model.
        -->
        <site>
            <id>site</id>
            <name>${project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>

    </distributionManagement>
{noformat}

... and all projects need to copy/paste the same block :( 

{noformat}
    <-- This is a 'child' project -->
    <distributionManagement>
        <!-- NOTE: <site> entry cannot be inherited.
               It means to say you need to copy/paste this text as it is to all child projects.
               See comments in the parent POM for more information.
          -->
        <site>
            <id>site</id>
            <name>${project.project.artifactId} site generated by Maven</name>
            <url>${props.site.deploy.url}/${project.artifactId}</url>
        </site>
    </distributionManagement>
{noformat}

As you can see, the trick is defining a profile 'staging' in settings.xml:

{noformat}
<settings>
	...
	<profiles>
	<profile>
		<id>staging</id>
		<properties>
		<props.site.deploy.url>file:///srv/jquantlib.org/sites</props.site.deploy.url>
		</properties>
	</profile>
	</profiles>
	...
</settings>
{noformat}
Note: I'm using file: protocol in order to deploy to my local webserver.

And then you can call Maven like this:

{noformat}
mvn clean site-deploy -P staging
{noformat}


> site:deploy possibility to choose directory tree when using sub-modules
> -----------------------------------------------------------------------
>
>                 Key: MSITE-277
>                 URL: http://jira.codehaus.org/browse/MSITE-277
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>          Components: site:deploy
>    Affects Versions: 2.0-beta-6
>            Reporter: Guimiot Isabelle
>            Priority: Minor
>
> I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :
> [eclipse_workspace]/root
> [eclipse_workspace]/sub1
> [eclipse_workspace]/sub2
> Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :
> [publish]/root
> [publish]/root/sub1
> [publish]/root/sub2
> I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :
> [publish]/root
> [publish]/sub1
> [publish]/sub2
> So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?
> thx
> Isabelle

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-277) site:deploy possibility to choose directory tree when using sub-modules

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116510 ] 

Benjamin Bentmann commented on MSITE-277:
-----------------------------------------

I experienced this change, too, but it was not caused by maven-site-plugin:2.0-beta-6 but actually by Maven itself after I updated to 2.0.8. The change is caused by the fix for MNG-3134 where they brought the URL inheritance for the site in line with the other URL inheritance for SCM. In other words, the directory layout of the site resembles the layout of the source repository.

Isabelle, you need not wait for an option to get the old layout back. All that happened is that Maven changed the default handling when inheriting ${project.distributionManagement.site.url}. You can put a <distributionManagement> element in every of your sub POMs to specify the desired location and overwrite the otherwise inherited URL.

Nevertheless, I would appreciate some kind of option like a new POM element, too. Could imagine something like this:
{code:xml}
<distributionManagement>
  <site>
    <url>...</url>
    <!-- How shall the URL be adjusted when inherited by sub modules?
         default: As Maven 2.0.8 does, i.e. keep the layout from source repository
         flat:    deploy sub module to same directory as parent
         nested:  deploy sub module immediately into directory of parent
    -->
    <adjustment>default|flat|nested</adjust>
  </site>
</distributionManagement>
{code}
This would allow for a central configuration of the site layout and spare one from copy&paste'ing in the sub POMs.

> site:deploy possibility to choose directory tree when using sub-modules
> -----------------------------------------------------------------------
>
>                 Key: MSITE-277
>                 URL: http://jira.codehaus.org/browse/MSITE-277
>             Project: Maven 2.x Site Plugin
>          Issue Type: Improvement
>          Components: site:deploy
>    Affects Versions: 2.0-beta-6
>            Reporter: Guimiot Isabelle
>            Priority: Minor
>
> I use Eclipse and my modules (root and submodules) are all at the same level in the directory tree :
> [eclipse_workspace]/root
> [eclipse_workspace]/sub1
> [eclipse_workspace]/sub2
> Until the 2.0-beta-5 of the maven site plugin, when I deployed my site, I obtained this tree :
> [publish]/root
> [publish]/root/sub1
> [publish]/root/sub2
> I installed the beta-6 version, and the default behaviour has changed, I now have every module at the same level :
> [publish]/root
> [publish]/sub1
> [publish]/sub2
> So I just wondered if it was possible to have an option to choose whether we prefer to publish the submodules inside the root directory, or at the same level... ?
> thx
> Isabelle

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira