Jahia in English > How Jahia Pages...

0 (0 Good)
0 (0 Bad)

How Jahia Pages and Website can be put into SVN repository?

by  dhruv.gupta@soprasteria.com »  2017/01/18 07:19

Hi,

I am able to load modules in SVN repository. However, we are unable to find how can we load Jahia pages and webiste to the SVN. Due to this we have to create pages separately and add components on each machine after loading the module from SVN.

Please advise how we can avoid such duplicate work. Should we have common Jahia server so that page created by developer can be seen by other or is there any way that these can be added to SVN?

Thanks

  (dhruv.gupta@soprasteria.com)

Number of messages  2
Registration date
0 (0 Good)
0 (0 Bad)

Re : How Jahia Pages and Website can be put into SVN repository?

by  dgriffon »  2017/01/20 10:32

Hello, 

For pages,  from the studio, in the 3rd tab of the sidepanel, you are able to create pages, theses pages will be part of the module (the same pages that are use when you create a site from a templates set), and be shared by any user that get the source of the module.

For a site, you can create a site module, once installed on the server, this module will provide a new "prepackaged site" in the web project section of the administration.

this kind of module is a simple DX module that contains in the META-INF/prepackagedSites an export of a site.

We do not have documentaiton yet on how to build such module to prevent to store a hudge binary in your source control, but you can get an example on how we did it here : 

https://github.com/Jahia/digitall

Basically, you have to export your site, then unzip it in the /src/main directory of a new dx module (unzip the zipped content of the export) then get the build section from the pom.xml of digitall and change it according to your export, the goal is to use maven maven-antrun-plugin to zip back the exported content  : 

<build>
        <resources>
            <resource>
                <directory>${project.build.directory}/classes/META-INF/prepackagedSites</directory>
                <includes>
                    <include>digitall.zip</include>
                </includes>
                <targetPath>META-INF/prepackagedSites</targetPath>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-demo-site</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <zip destfile="${project.build.directory}/demo/Digitall.zip" basedir="${basedir}/src/main/Digitall" />
                                <zip destfile="${project.build.directory}/demo/users.zip" basedir="${basedir}/src/main/users" />
                                <zip destfile="${project.build.directory}/classes/META-INF/prepackagedSites/digitall.zip">
                                    <fileset dir="${project.build.directory}/demo" />
                                    <fileset dir="${basedir}/src/main/prepackagedSites" includes="export.properties" />
                                </zip>
                                <delete dir="${project.build.directory}/demo" />
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Kind regards,

David

David Griffon (dgriffon)

Number of messages  76
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page