keycloak-scim/themes/pom.xml
stianst 2f0b03e1a0 KEYCLOAK-11782 Cleanup
* Updated npm-update profile
  - Update Node and NPM versions
  - Exclude optional dependencies
  - Remove node_modules within src/main/node_modules (PatternFly for example includes all dependencies in patternfly/node_modules, we don't need these)
  - Remove minimist and mkdirp from src/main/node_modules as these are not included in dist, so we don't need the source

* src/main/node_modules was updated to PatternFly 3.41.6 at some point, but not properly since src/main/resources/theme/keycloak/common/resources/node_modules/patternfly is currently on 3.38.1

* Removed ^ in versions in package.json as this results in unreliable updates of dependencies
2019-11-01 12:09:25 -03:00

286 lines
14 KiB
XML
Executable file

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>8.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-themes</artifactId>
<name>Keycloak Themes</name>
<description/>
<profiles>
<profile>
<id>community</id>
<activation>
<property>
<name>!product</name>
</property>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/resources-community</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>product</id>
<activation>
<property>
<name>product</name>
</property>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/resources-product</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/keycloak-preview/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>account2</id>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<nodeVersion>v8.9.4</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>compile typescript</id>
<goals>
<goal>npm</goal>
</goals>
<phase>compile</phase>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<execution>
<id>npm remove dev dependencies production=true</id>
<goals>
<goal>npm</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<arguments>install --production=true --no-package-lock</arguments>
</configuration>
</execution>
</executions>
<configuration>
<workingDirectory>src/main/resources/theme/keycloak-preview/account/resources</workingDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/resources/theme/keycloak-preview/account/resources/node_modules</directory>
</fileset>
<fileset>
<directory>src/main/resources/theme/keycloak-preview/account/resources/node</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>npm-update</id>
<build>
<plugins>
<!-- Install NPM and download packages -->
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.8.0</version>
<executions>
<execution>
<id>install-node-and-npm</id>
<phase>generate-resources</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm-install</id>
<phase>generate-resources</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install -P -E --no-optional --ignore-scripts --no-bin-links --no-shrinkwrap --no-package-lock</arguments>
</configuration>
</execution>
</executions>
<configuration>
<nodeVersion>v12.13.0</nodeVersion>
<npmVersion>6.9.0</npmVersion>
<workingDirectory>src/main/resources</workingDirectory>
</configuration>
</plugin>
<!-- Clean downloaded packages from NPM -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-all</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/resources/node_modules</directory>
</fileset>
<fileset>
<directory>src/main/resources/theme/keycloak/common/resources/node_modules</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-downloaded</id>
<phase>generate-resources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/node_modules/angular-translate/node_modules/</directory>
</fileset>
<fileset>
<directory>src/main/node_modules/patternfly/node_modules/</directory>
</fileset>
<fileset>
<directory>src/main/node_modules/rcue/node_modules/</directory>
</fileset>
<fileset>
<directory>src/main/node_modules/minimist</directory>
</fileset>
<fileset>
<directory>src/main/node_modules/mkdirp</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy files from NPM packages -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>src/main/resources/theme/keycloak/common/resources/node_modules</outputDirectory>
<resources>
<resource>
<directory>src/main/node_modules</directory>
<excludes>
<exclude>**/*.json</exclude>
<exclude>**/*.json</exclude>
<exclude>**/*.markdown</exclude>
<exclude>**/*.swf</exclude>
<exclude>**/*.sh</exclude>
<exclude>**/.bin/**</exclude>
<exclude>**/bin/**</exclude>
<exclude>**/build/**</exclude>
<exclude>**/docs/**</exclude>
<exclude>**/demo/**</exclude>
<exclude>**/devtools/**</exclude>
<exclude>**/example/**</exclude>
<exclude>**/examples/**</exclude>
<exclude>**/grunt/**</exclude>
<exclude>**/less/**</exclude>
<exclude>**/node_modules/**</exclude>
<exclude>**/sass/**</exclude>
<exclude>**/scss/**</exclude>
<exclude>**/src/**</exclude>
<exclude>**/test/**</exclude>
<exclude>**/tests/**</exclude>
<exclude>**/_config.yml</exclude>
<exclude>**/api.md</exclude>
<exclude>**/AUTHORS.txt</exclude>
<exclude>**/CHANGELOG.md</exclude>
<exclude>**/CONTRIBUTING.md</exclude>
<exclude>**/HELP-US-OUT.txt</exclude>
<exclude>**/README.md</exclude>
<exclude>**/Gruntfile.js</exclude>
<exclude>**/Gemfile*</exclude>
<exclude>**/index.js</exclude>
<exclude>**/.*</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/node_modules</directory>
<includes>
<include>angular-ui-select2/src/select2.js</include>
<include>filesaver/src/Filesaver.js</include>
<include>filesaver/src/changename.js</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>