Commit b259f848 authored by abirembaut's avatar abirembaut Committed by GitHub
Browse files

feat(applications): use application dependencies to deploy pages (#345)

* put applications zip in classpath
* put application pages in classpath
* remove unneeded resources
* add final directory for non-nodifiable / non-deletable atrifacts
* add editonly directory for modifiable / non-deletable artifacts

covers [RUNTIME-248](https://bonitasoft.atlassian.net/browse/RUNTIME-248)
covers [RUNTIME-263](https://bonitasoft.atlassian.net/browse/RUNTIME-263)
covers [RUNTIME-183](https://bonitasoft.atlassian.net/browse/RUNTIME-183)
parent 6700b775
...@@ -44,6 +44,30 @@ ...@@ -44,6 +44,30 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!-- Applications used to retrieve theirs pages-->
<dependency>
<groupId>org.bonitasoft.web.application</groupId>
<artifactId>bonita-application-directory</artifactId>
<version>${bonita.web.version}</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.bonitasoft.web.application</groupId>
<artifactId>bonita-admin-application</artifactId>
<version>${bonita.web.version}</version>
<type>zip</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bonitasoft.web.application</groupId>
<artifactId>bonita-user-application</artifactId>
<version>${bonita.web.version}</version>
<type>zip</type>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -66,7 +90,7 @@ ...@@ -66,7 +90,7 @@
<webResources> <webResources>
<resource> <resource>
<filtering>true</filtering> <filtering>true</filtering>
<targetPath/> <targetPath />
<directory>${folder_frontend_web_config_files}</directory> <directory>${folder_frontend_web_config_files}</directory>
<includes> <includes>
<include>WEB-INF/web.xml</include> <include>WEB-INF/web.xml</include>
...@@ -75,7 +99,7 @@ ...@@ -75,7 +99,7 @@
</resource> </resource>
<resource> <resource>
<filtering>false</filtering> <filtering>false</filtering>
<targetPath/> <targetPath />
<directory>${folder_frontend_web_resources}</directory> <directory>${folder_frontend_web_resources}</directory>
<excludes> <excludes>
<exclude>META-INF/**</exclude> <exclude>META-INF/**</exclude>
...@@ -155,77 +179,77 @@ ...@@ -155,77 +179,77 @@
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
<id>get-bonita-la-resources</id> <id>get-bonita-final-applications</id>
<phase>prepare-package</phase> <phase>prepare-package</phase>
<goals> <goals>
<goal>copy</goal> <goal>copy</goal>
</goals> </goals>
<configuration> <configuration>
<artifactItems> <artifactItems>
<!-- Custom pages --> <!-- Non modifiable applications descriptors -->
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.web.page</groupId> <groupId>org.bonitasoft.web.application</groupId>
<artifactId>page-user-task-list</artifactId> <artifactId>bonita-application-directory</artifactId>
<version>${project.version}</version> <version>${bonita.web.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite>
<destFileName>bonita-task-list-page.zip</destFileName>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.distrib</groupId> <groupId>org.bonitasoft.web.application</groupId>
<artifactId>task-autogenerated-form</artifactId> <artifactId>bonita-super-admin-application</artifactId>
<version>${project.version}</version> <version>${bonita.web.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite>
<destFileName>task-autogenerated-form.zip</destFileName>
</artifactItem> </artifactItem>
</artifactItems>
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/application/final</outputDirectory>
</configuration>
</execution>
<execution>
<id>get-bonita-modifiable-applications</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<!-- Applications descriptors -->
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.distrib</groupId> <groupId>org.bonitasoft.web.application</groupId>
<artifactId>process-autogenerated-form</artifactId> <artifactId>bonita-admin-application</artifactId>
<version>${project.version}</version> <version>${bonita.web.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite>
<destFileName>process-autogenerated-form.zip</destFileName>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.web.page</groupId> <groupId>org.bonitasoft.web.application</groupId>
<artifactId>layout-living-application</artifactId> <artifactId>bonita-user-application</artifactId>
<version>${project.version}</version> <version>${bonita.web.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite>
<destFileName>bonita-default-layout.zip</destFileName>
</artifactItem> </artifactItem>
</artifactItems>
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/application</outputDirectory>
</configuration>
</execution>
<execution>
<id>get-bonita-provided-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<!-- Custom pages -->
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.distrib</groupId> <groupId>org.bonitasoft.distrib</groupId>
<artifactId>bootstrap-default-theme</artifactId> <artifactId>task-autogenerated-form</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<destFileName>bonita-bootstrap-default-theme.zip</destFileName>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.distrib</groupId> <groupId>org.bonitasoft.distrib</groupId>
<artifactId>bonita-theme</artifactId> <artifactId>process-autogenerated-form</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>bonita-theme.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-user-process-list</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>page-process-list.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-tenant-status</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<destFileName>page-tenant-status.zip</destFileName>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.web.page</groupId> <groupId>org.bonitasoft.web.page</groupId>
...@@ -233,15 +257,6 @@ ...@@ -233,15 +257,6 @@
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<destFileName>case-autogenerated-overview.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-admin-install-export-organization</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>page-admin-install-export-organization.zip</destFileName>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.web.page</groupId> <groupId>org.bonitasoft.web.page</groupId>
...@@ -249,66 +264,23 @@ ...@@ -249,66 +264,23 @@
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<destFileName>layout-bonita.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-application-home</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>bonita-home-page.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-admin-application-details</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>page-admin-application-details.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-admin-application-list</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>page-admin-application-list.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-admin-bdm</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>page-admin-bdm.zip</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-admin-case-list</artifactId>
<version>${project.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<destFileName>page-admin-case-list.zip</destFileName>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.web.page</groupId> <groupId>org.bonitasoft.distrib</groupId>
<artifactId>page-admin-process-details</artifactId> <artifactId>bonita-theme</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<destFileName>page-admin-process-details.zip</destFileName>
</artifactItem> </artifactItem>
<artifactItem> <artifactItem>
<groupId>org.bonitasoft.web.page</groupId> <groupId>org.bonitasoft.web.page</groupId>
<artifactId>page-admin-user-details</artifactId> <artifactId>page-application-home</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
<overWrite>true</overWrite> <overWrite>true</overWrite>
<destFileName>page-admin-user-details.zip</destFileName>
</artifactItem> </artifactItem>
</artifactItems> </artifactItems>
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/page</outputDirectory> <outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/page/final</outputDirectory>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
...@@ -341,6 +313,67 @@ ...@@ -341,6 +313,67 @@
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes</outputDirectory> <outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes</outputDirectory>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>get-bonita-application-pages</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.bonitasoft.web.application</groupId>
<artifactId>bonita-super-admin-application</artifactId>
<version>${bonita.web.version}</version>
<type>zip</type>
<classifier>with-resources</classifier>
<includes>pages/*</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.FlattenFileMapper />
</fileMappers>
<!-- all the pages of this app are final (cannot be removed / modified) -->
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/page/final</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.application</groupId>
<artifactId>bonita-application-directory</artifactId>
<version>${bonita.web.version}</version>
<type>zip</type>
<classifier>with-resources</classifier>
<includes>pages/*</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.FlattenFileMapper />
</fileMappers>
<!-- all the pages of this app cannot be removed but can be modified -->
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/page/editonly</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.application</groupId>
<artifactId>bonita-user-application</artifactId>
<version>${bonita.web.version}</version>
<type>zip</type>
<classifier>with-resources</classifier>
<includes>pages/*</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.FlattenFileMapper />
</fileMappers>
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/page</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.bonitasoft.web.application</groupId>
<artifactId>bonita-admin-application</artifactId>
<version>${bonita.web.version}</version>
<type>zip</type>
<classifier>with-resources</classifier>
<includes>pages/*</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.FlattenFileMapper />
</fileMappers>
<outputDirectory>${folder_frontend_web_resources}/WEB-INF/classes/org/bonitasoft/web/page</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version> <version>3.1.2</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment