How to publish multi-module site..?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to publish multi-module site..?

Stian Soiland-Reyes
Hi, (in particular Gilles and Artem)

What was the status of how to do a multi-site publish?  I just tried
now for the Commons RDF 0.3.0 site, and I could not get it to work
properly.


As mentioned in
http://central.maven.org/maven2/org/apache/commons/commons-parent/41/commons-parent-41.pom
I added a <site>to <distributionManagement> using
<url>scm:svn:${commons.scmPubUrl}</url>


Note that as Commons RDF is still in the incubator (watch this space)
it has a slightly different properties:
        <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commonsrdf/content/</commons.scmPubUrl>
        <commons.scmPubCheckoutDirectory>${project.build.directory}/site-content</commons.scmPubCheckoutDirectory>


But I could not get it to publish the submodule sites correctly.


mvn clean package site-deploy

  overwrites the main site with the last module's site instead! (Do not use!)




mvn clean package site scm-publish:publish-scm

seems to work - but does not publish the sub-sites (e.g.
commons-rdf-api/ subfolder)


mvn clean package site site:stage scm-publish:publish-scm

seems to have the same problem.


And so I had to do this manual hack to afterwards add the submodules
site folders to the SVN of the website:

for a in api integration-tests jena jsonld-java rdf4j simple ;
  do cp -r $a/target/site target/site-content/commons-rdf-$a ;
done

cd target/site-content/
svn add commons-rdf-*
svn commit -m "submodules"


Any ideas..?

--
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to publish multi-module site..?

Stian Soiland-Reyes
On 16 November 2016 at 11:26, Stian Soiland-Reyes <[hidden email]> wrote:
> But I could not get it to publish the submodule sites correctly.
> mvn clean package site-deploy
>
>   overwrites the main site with the last module's site instead! (Do not use!)

https://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html
mentions


> If subprojects inherit the (distribution) site URL from a parent POM, they will automatically append their artifactId to form their effective deployment location. This goes for both the project url and the url defined in the <distributionManagement>element of the pom.

> If your multi-module tree does not follow the Maven conventions, or if module directories are named differently than module artifacts, you have to specify the url's for each child project. See also How does the Site Plugin use the <url> element in the POM?.

This is the case for Commons RDF, as it has sub-modules like
commons-rdf-api, which (for some reason) is in a subfolder named api/
-- perhaps renaming them to match the artifactId is sufficient?


--
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to publish multi-module site..?

garydgregory
At the very least, the folder names must be fixed...

Gary

On Nov 16, 2016 3:33 AM, "Stian Soiland-Reyes" <[hidden email]> wrote:

> On 16 November 2016 at 11:26, Stian Soiland-Reyes <[hidden email]>
> wrote:
> > But I could not get it to publish the submodule sites correctly.
> > mvn clean package site-deploy
> >
> >   overwrites the main site with the last module's site instead! (Do not
> use!)
>
> https://maven.apache.org/plugins/maven-site-plugin/
> examples/multimodule.html
> mentions
>
>
> > If subprojects inherit the (distribution) site URL from a parent POM,
> they will automatically append their artifactId to form their effective
> deployment location. This goes for both the project url and the url defined
> in the <distributionManagement>element of the pom.
>
> > If your multi-module tree does not follow the Maven conventions, or if
> module directories are named differently than module artifacts, you have to
> specify the url's for each child project. See also How does the Site Plugin
> use the <url> element in the POM?.
>
> This is the case for Commons RDF, as it has sub-modules like
> commons-rdf-api, which (for some reason) is in a subfolder named api/
> -- perhaps renaming them to match the artifactId is sufficient?
>
>
> --
> Stian Soiland-Reyes
> http://orcid.org/0000-0001-9842-9718
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to publish multi-module site..?

Gilles Sadowski
In reply to this post by Stian Soiland-Reyes
On Wed, 16 Nov 2016 11:26:41 +0000, Stian Soiland-Reyes wrote:

> Hi, (in particular Gilles and Artem)
>
> What was the status of how to do a multi-site publish?  I just tried
> now for the Commons RDF 0.3.0 site, and I could not get it to work
> properly.
>
>
> As mentioned in
>
> http://central.maven.org/maven2/org/apache/commons/commons-parent/41/commons-parent-41.pom
> I added a <site>to <distributionManagement> using
> <url>scm:svn:${commons.scmPubUrl}</url>
>
>
> Note that as Commons RDF is still in the incubator (watch this space)
> it has a slightly different properties:
>
>
> <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commonsrdf/content/</commons.scmPubUrl>
>
>
> <commons.scmPubCheckoutDirectory>${project.build.directory}/site-content</commons.scmPubCheckoutDirectory>
>
>
> But I could not get it to publish the submodule sites correctly.
>
>
> mvn clean package site-deploy
>
>   overwrites the main site with the last module's site instead! (Do
> not use!)
>
>
>
>
> mvn clean package site scm-publish:publish-scm
>
> seems to work - but does not publish the sub-sites (e.g.
> commons-rdf-api/ subfolder)
>
>
> mvn clean package site site:stage scm-publish:publish-scm
>
> seems to have the same problem.

In "Commons RNG" (most recent code is in branch "RNG-30__sampling"),
I've been using the following:

$ mvn clean install site site:stage

It creates the all the (sub-)sites in
   src/<module_name>/target
and concatenates them under
   src/target/staging
(in the top-level directory).

The problem is that the above command creates a
   site-content
svn repository inside each module's directory that contains all the
(concatenated) web site; whereas IIUC that maven page:
   
https://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html
it should not be that way (since the "artefactId" and module directory
name _are_ the same).
IOW, why does maven automatically create the _sub_-site in each
   <module_name>/target/site
directory but does not copy its content under
   <module_name>/site-content/<module_name>/
?

I wonder why have a "site-content" under each
   <module_name>
directory, that would only duplicate whole (currently) or part of
the "top-level"
   site-content
?

Regards,
Gilles


> And so I had to do this manual hack to afterwards add the submodules
> site folders to the SVN of the website:
>
> for a in api integration-tests jena jsonld-java rdf4j simple ;
>   do cp -r $a/target/site target/site-content/commons-rdf-$a ;
> done
>
> cd target/site-content/
> svn add commons-rdf-*
> svn commit -m "submodules"
>
>
> Any ideas..?


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to publish multi-module site..?

Sergio Fernández
I believe with f6a80e6fcd39a8ee7426826e7b25e5cfe0628820 we've fixed the
COMMONSRDF-50 issue:

https://git1-us-west.apache.org/repos/asf?p=incubator-commonsrdf.git;a=commitdiff;h=f6a80e6fcd39a8ee7426826e7b25e5cfe0628820;hp=b05e3e6e6acad0baeeb7e19358093232119548bb

At list for the the result at target/staging looks good when executing: mvn
clean site site:stage

Please Stian, take a look to double check it.

Cheers,


On Thu, Nov 17, 2016 at 12:25 AM, Gilles <[hidden email]>
wrote:

> On Wed, 16 Nov 2016 11:26:41 +0000, Stian Soiland-Reyes wrote:
>
>> Hi, (in particular Gilles and Artem)
>>
>> What was the status of how to do a multi-site publish?  I just tried
>> now for the Commons RDF 0.3.0 site, and I could not get it to work
>> properly.
>>
>>
>> As mentioned in
>>
>> http://central.maven.org/maven2/org/apache/commons/commons-
>> parent/41/commons-parent-41.pom
>> I added a <site>to <distributionManagement> using
>> <url>scm:svn:${commons.scmPubUrl}</url>
>>
>>
>> Note that as Commons RDF is still in the incubator (watch this space)
>> it has a slightly different properties:
>>
>>
>> <commons.scmPubUrl>https://svn.apache.org/repos/infra/websit
>> es/production/commonsrdf/content/</commons.scmPubUrl>
>>
>>
>> <commons.scmPubCheckoutDirectory>${project.build.directory}/
>> site-content</commons.scmPubCheckoutDirectory>
>>
>>
>> But I could not get it to publish the submodule sites correctly.
>>
>>
>> mvn clean package site-deploy
>>
>>   overwrites the main site with the last module's site instead! (Do not
>> use!)
>>
>>
>>
>>
>> mvn clean package site scm-publish:publish-scm
>>
>> seems to work - but does not publish the sub-sites (e.g.
>> commons-rdf-api/ subfolder)
>>
>>
>> mvn clean package site site:stage scm-publish:publish-scm
>>
>> seems to have the same problem.
>>
>
> In "Commons RNG" (most recent code is in branch "RNG-30__sampling"),
> I've been using the following:
>
> $ mvn clean install site site:stage
>
> It creates the all the (sub-)sites in
>   src/<module_name>/target
> and concatenates them under
>   src/target/staging
> (in the top-level directory).
>
> The problem is that the above command creates a
>   site-content
> svn repository inside each module's directory that contains all the
> (concatenated) web site; whereas IIUC that maven page:
>   https://maven.apache.org/plugins/maven-site-plugin/examples/
> multimodule.html
> it should not be that way (since the "artefactId" and module directory
> name _are_ the same).
> IOW, why does maven automatically create the _sub_-site in each
>   <module_name>/target/site
> directory but does not copy its content under
>   <module_name>/site-content/<module_name>/
> ?
>
> I wonder why have a "site-content" under each
>   <module_name>
> directory, that would only duplicate whole (currently) or part of
> the "top-level"
>   site-content
> ?
>
> Regards,
> Gilles
>
>
> And so I had to do this manual hack to afterwards add the submodules
>> site folders to the SVN of the website:
>>
>> for a in api integration-tests jena jsonld-java rdf4j simple ;
>>   do cp -r $a/target/site target/site-content/commons-rdf-$a ;
>> done
>>
>> cd target/site-content/
>> svn add commons-rdf-*
>> svn commit -m "submodules"
>>
>>
>> Any ideas..?
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 6602747925
e: [hidden email]
w: http://redlink.co
Reply | Threaded
Open this post in threaded view
|

Re: How to publish multi-module site..?

Benedikt Ritter-4
Hi,

Sergio Fernández <[hidden email]> schrieb am Do., 17. Nov. 2016 um
00:46 Uhr:

> I believe with f6a80e6fcd39a8ee7426826e7b25e5cfe0628820 we've fixed the
> COMMONSRDF-50 issue:
>
>
> https://git1-us-west.apache.org/repos/asf?p=incubator-commonsrdf.git;a=commitdiff;h=f6a80e6fcd39a8ee7426826e7b25e5cfe0628820;hp=b05e3e6e6acad0baeeb7e19358093232119548bb
>
> At list for the the result at target/staging looks good when executing: mvn
> clean site site:stage
>
> Please Stian, take a look to double check it.
>

Our documentation [1] says mvn clean site site:stage
scm-publish:publish-scm will do the trick. If that doesn't work, we should
fix the docs.

Benedikt

[1] http://commons.apache.org/site-publish.html


>
> Cheers,
>
>
> On Thu, Nov 17, 2016 at 12:25 AM, Gilles <[hidden email]>
> wrote:
>
> > On Wed, 16 Nov 2016 11:26:41 +0000, Stian Soiland-Reyes wrote:
> >
> >> Hi, (in particular Gilles and Artem)
> >>
> >> What was the status of how to do a multi-site publish?  I just tried
> >> now for the Commons RDF 0.3.0 site, and I could not get it to work
> >> properly.
> >>
> >>
> >> As mentioned in
> >>
> >> http://central.maven.org/maven2/org/apache/commons/commons-
> >> parent/41/commons-parent-41.pom
> >> I added a <site>to <distributionManagement> using
> >> <url>scm:svn:${commons.scmPubUrl}</url>
> >>
> >>
> >> Note that as Commons RDF is still in the incubator (watch this space)
> >> it has a slightly different properties:
> >>
> >>
> >> <commons.scmPubUrl>https://svn.apache.org/repos/infra/websit
> >> es/production/commonsrdf/content/</commons.scmPubUrl>
> >>
> >>
> >> <commons.scmPubCheckoutDirectory>${project.build.directory}/
> >> site-content</commons.scmPubCheckoutDirectory>
> >>
> >>
> >> But I could not get it to publish the submodule sites correctly.
> >>
> >>
> >> mvn clean package site-deploy
> >>
> >>   overwrites the main site with the last module's site instead! (Do not
> >> use!)
> >>
> >>
> >>
> >>
> >> mvn clean package site scm-publish:publish-scm
> >>
> >> seems to work - but does not publish the sub-sites (e.g.
> >> commons-rdf-api/ subfolder)
> >>
> >>
> >> mvn clean package site site:stage scm-publish:publish-scm
> >>
> >> seems to have the same problem.
> >>
> >
> > In "Commons RNG" (most recent code is in branch "RNG-30__sampling"),
> > I've been using the following:
> >
> > $ mvn clean install site site:stage
> >
> > It creates the all the (sub-)sites in
> >   src/<module_name>/target
> > and concatenates them under
> >   src/target/staging
> > (in the top-level directory).
> >
> > The problem is that the above command creates a
> >   site-content
> > svn repository inside each module's directory that contains all the
> > (concatenated) web site; whereas IIUC that maven page:
> >   https://maven.apache.org/plugins/maven-site-plugin/examples/
> > multimodule.html
> > it should not be that way (since the "artefactId" and module directory
> > name _are_ the same).
> > IOW, why does maven automatically create the _sub_-site in each
> >   <module_name>/target/site
> > directory but does not copy its content under
> >   <module_name>/site-content/<module_name>/
> > ?
> >
> > I wonder why have a "site-content" under each
> >   <module_name>
> > directory, that would only duplicate whole (currently) or part of
> > the "top-level"
> >   site-content
> > ?
> >
> > Regards,
> > Gilles
> >
> >
> > And so I had to do this manual hack to afterwards add the submodules
> >> site folders to the SVN of the website:
> >>
> >> for a in api integration-tests jena jsonld-java rdf4j simple ;
> >>   do cp -r $a/target/site target/site-content/commons-rdf-$a ;
> >> done
> >>
> >> cd target/site-content/
> >> svn add commons-rdf-*
> >> svn commit -m "submodules"
> >>
> >>
> >> Any ideas..?
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
> --
> Sergio Fernández
> Partner Technology Manager
> Redlink GmbH
> m: +43 6602747925 <+43%20660%202747925>
> e: [hidden email]
> w: http://redlink.co
>
Reply | Threaded
Open this post in threaded view
|

Re: How to publish multi-module site..?

Stian Soiland-Reyes
In reply to this post by Sergio Fernández
Thanks for having a go, Sergio!


I've tried it (after accidentally touching the live site) with the
corresponding staging SVN directory:

        <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/staging/commonsrdf/trunk/</commons.scmPubUrl>

(for test speed commented out all <module>s except api, using -pl api
would also work)


However deploying did not work for me:

   mvn clean site site:stage scm-publish:publish-scm

As it did not check in the sub-modules folders to SVN.

The top level target/staging/ do contain the correct sub-folders like
api/ and simple/ so they are easy enough to copy over manually to
target/site-content (where they are missing) - we can just complicate
our SITE.md with the manual cp and svn commands.



Neither did this work:

  mvn clean site site:stage site:deploy

(Same result)


Strangely I get log output like:

[INFO] Relativizing decoration links with respect to project URL:
https://commonsrdf.incubator.apache.org/commons-rdf-api/


..however the menu items are correctly going to /api/ - it's just that
api/ and simple/ etc. are not given to "svn add" and thus not checked
in.


Also svn is very slow to check in javadocs.. git2pub any day now please! :-)



On 16 November 2016 at 23:45, Sergio Fernández <[hidden email]> wrote:

> I believe with f6a80e6fcd39a8ee7426826e7b25e5cfe0628820 we've fixed the
> COMMONSRDF-50 issue:
>
> https://git1-us-west.apache.org/repos/asf?p=incubator-commonsrdf.git;a=commitdiff;h=f6a80e6fcd39a8ee7426826e7b25e5cfe0628820;hp=b05e3e6e6acad0baeeb7e19358093232119548bb
>
> At list for the the result at target/staging looks good when executing: mvn
> clean site site:stage
>
> Please Stian, take a look to double check it.
>
> Cheers,
>
>
> On Thu, Nov 17, 2016 at 12:25 AM, Gilles <[hidden email]>
> wrote:
>
>> On Wed, 16 Nov 2016 11:26:41 +0000, Stian Soiland-Reyes wrote:
>>
>>> Hi, (in particular Gilles and Artem)
>>>
>>> What was the status of how to do a multi-site publish?  I just tried
>>> now for the Commons RDF 0.3.0 site, and I could not get it to work
>>> properly.
>>>
>>>
>>> As mentioned in
>>>
>>> http://central.maven.org/maven2/org/apache/commons/commons-
>>> parent/41/commons-parent-41.pom
>>> I added a <site>to <distributionManagement> using
>>> <url>scm:svn:${commons.scmPubUrl}</url>
>>>
>>>
>>> Note that as Commons RDF is still in the incubator (watch this space)
>>> it has a slightly different properties:
>>>
>>>
>>> <commons.scmPubUrl>https://svn.apache.org/repos/infra/websit
>>> es/production/commonsrdf/content/</commons.scmPubUrl>
>>>
>>>
>>> <commons.scmPubCheckoutDirectory>${project.build.directory}/
>>> site-content</commons.scmPubCheckoutDirectory>
>>>
>>>
>>> But I could not get it to publish the submodule sites correctly.
>>>
>>>
>>> mvn clean package site-deploy
>>>
>>>   overwrites the main site with the last module's site instead! (Do not
>>> use!)
>>>
>>>
>>>
>>>
>>> mvn clean package site scm-publish:publish-scm
>>>
>>> seems to work - but does not publish the sub-sites (e.g.
>>> commons-rdf-api/ subfolder)
>>>
>>>
>>> mvn clean package site site:stage scm-publish:publish-scm
>>>
>>> seems to have the same problem.
>>>
>>
>> In "Commons RNG" (most recent code is in branch "RNG-30__sampling"),
>> I've been using the following:
>>
>> $ mvn clean install site site:stage
>>
>> It creates the all the (sub-)sites in
>>   src/<module_name>/target
>> and concatenates them under
>>   src/target/staging
>> (in the top-level directory).
>>
>> The problem is that the above command creates a
>>   site-content
>> svn repository inside each module's directory that contains all the
>> (concatenated) web site; whereas IIUC that maven page:
>>   https://maven.apache.org/plugins/maven-site-plugin/examples/
>> multimodule.html
>> it should not be that way (since the "artefactId" and module directory
>> name _are_ the same).
>> IOW, why does maven automatically create the _sub_-site in each
>>   <module_name>/target/site
>> directory but does not copy its content under
>>   <module_name>/site-content/<module_name>/
>> ?
>>
>> I wonder why have a "site-content" under each
>>   <module_name>
>> directory, that would only duplicate whole (currently) or part of
>> the "top-level"
>>   site-content
>> ?
>>
>> Regards,
>> Gilles
>>
>>
>> And so I had to do this manual hack to afterwards add the submodules
>>> site folders to the SVN of the website:
>>>
>>> for a in api integration-tests jena jsonld-java rdf4j simple ;
>>>   do cp -r $a/target/site target/site-content/commons-rdf-$a ;
>>> done
>>>
>>> cd target/site-content/
>>> svn add commons-rdf-*
>>> svn commit -m "submodules"
>>>
>>>
>>> Any ideas..?
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> Sergio Fernández
> Partner Technology Manager
> Redlink GmbH
> m: +43 6602747925
> e: [hidden email]
> w: http://redlink.co



--
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]