aboutsummaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/pom.xml
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2022-02-15 18:02:23 +0000
committerdanielhanrahan <daniel.hanrahan@est.tech>2022-02-16 15:26:38 +0000
commit770049ea162573d5afa1aaefed6131fe5e0a77f7 (patch)
treef702a09afd7b18879a562674c760c682c78895c0 /gui-editors/gui-editor-apex/pom.xml
parent29df248caa234bc0dff3c20875bdaecfeba127e0 (diff)
Refactor apex-editor frontend build
Moved frontend from src/main/resources/webapp to src/main/webapp Moved static resources such as jquery-ui to webapp/dist folder Configured jest to exclude webapp/dist from coverage report Removed unused ZIP file assembly Cleaned up POM Issue-ID: POLICY-3896 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia006eb94a39586219029866eef94aef38912ad65
Diffstat (limited to 'gui-editors/gui-editor-apex/pom.xml')
-rw-r--r--gui-editors/gui-editor-apex/pom.xml102
1 files changed, 40 insertions, 62 deletions
diff --git a/gui-editors/gui-editor-apex/pom.xml b/gui-editors/gui-editor-apex/pom.xml
index 1095e14..e42777e 100644
--- a/gui-editors/gui-editor-apex/pom.xml
+++ b/gui-editors/gui-editor-apex/pom.xml
@@ -37,10 +37,10 @@
<policy.apex-pdp.version>2.4.0</policy.apex-pdp.version>
<policy.common.version>1.10.1-SNAPSHOT</policy.common.version>
<policy.models.version>2.6.1-SNAPSHOT</policy.models.version>
- <webapp.dir>src/main/resources/webapp</webapp.dir>
- <sonar.nodejs.executable>${project.basedir}/src/main/resources/webapp/node/node</sonar.nodejs.executable>
- <sonar.sources>${project.basedir}/src/main/java,${project.basedir}/src/main/resources/webapp/js</sonar.sources>
- <sonar.exclusions>src/main/resources/webapp/js/__test__/**,src/main/resources/webapp/js/jquery/**,src/main/resources/webapp/js/edit_area/**,src/main/resources/webapp/js/jquery-ui-1.12.1/**,src/main/resources/webapp/js/lib/**</sonar.exclusions>
+ <webapp.dir>${project.basedir}/src/main/webapp</webapp.dir>
+ <sonar.nodejs.executable>${webapp.dir}/node/node</sonar.nodejs.executable>
+ <sonar.sources>${project.basedir}/src/main/java,${webapp.dir}/js</sonar.sources>
+ <sonar.exclusions>${webapp.dir}/js/__test__/**</sonar.exclusions>
</properties>
<dependencies>
@@ -101,25 +101,6 @@
</dependencies>
<build>
- <defaultGoal>install</defaultGoal>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <excludes>
- <exclude>webapp/node/**</exclude>
- <exclude>webapp/node_modules/**</exclude>
- <exclude>webapp/webpack.config.js</exclude>
- <exclude>webapp/package.json</exclude>
- <exclude>webapp/package-lock.json</exclude>
- <exclude>webapp/dist/**</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${webapp.dir}/dist/</directory>
- <targetPath>webapp/</targetPath>
- </resource>
- </resources>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
@@ -127,6 +108,7 @@
<version>1.9.1</version>
<configuration>
<nodeVersion>v14.17.0</nodeVersion>
+ <npmVersion>6.14.5</npmVersion>
<installDirectory>${webapp.dir}</installDirectory>
<workingDirectory>${webapp.dir}</workingDirectory>
<npmDownloadRoot>${repo.npm}</npmDownloadRoot>
@@ -137,9 +119,7 @@
<goals>
<goal>install-node-and-npm</goal>
</goals>
- <configuration>
- <npmVersion>6.14.5</npmVersion>
- </configuration>
+ <phase>generate-resources</phase>
</execution>
<execution>
<id>npm install</id>
@@ -149,25 +129,55 @@
<configuration>
<arguments>install</arguments>
</configuration>
+ <phase>generate-resources</phase>
</execution>
<execution>
<id>npm test</id>
<goals>
<goal>npm</goal>
</goals>
- <phase>test</phase>
<configuration>
<arguments>test</arguments>
</configuration>
+ <phase>test</phase>
</execution>
<execution>
<id>webpack build</id>
<goals>
<goal>webpack</goal>
</goals>
+ <phase>generate-resources</phase>
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy frontend resources</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${webapp.dir}/dist</directory>
+ </resource>
+ <resource>
+ <directory>${webapp.dir}</directory>
+ <includes>
+ <include>js/fileMenu.js</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
@@ -190,37 +200,12 @@
</filesets>
</configuration>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/node/**</exclude>
- <exclude>**/node_modules/**</exclude>
- <exclude>webapp/webpack.config.js</exclude>
- <exclude>webapp/package.json</exclude>
- <exclude>webapp/package-lock.json</exclude>
- </excludes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>make shared resources</id>
- <goals>
- <goal>single</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/resources.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
@@ -249,14 +234,6 @@
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
- <exclude>webapp/package-lock.json</exclude>
- <exclude>webapp/package.json</exclude>
- <exclude>webapp/.babelrc</exclude>
- <exclude>webapp/.gitignore</exclude>
- <exclude>webapp/webpack.config.js</exclude>
- <exclude>webapp/dist/</exclude>
- <exclude>webapp/js/Apex*.js</exclude>
- <exclude>webapp/js/__test__/</exclude>
</excludes>
</filter>
</filters>
@@ -270,6 +247,7 @@
</transformers>
</configuration>
</plugin>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>