<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"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>it.maggioli.suite</groupId> <artifactId>rep-web</artifactId> <version>0.0.2.0000</version> <relativePath>../</relativePath> </parent> <groupId>it.maggioli.suite</groupId> <artifactId>rep-wc</artifactId> <!-- evita di creare il file jar --> <packaging>pom</packaging> <profiles> <profile> <id>jenkins-release</id> <activation> <file> <exists>/home/jenkins/.m2/settings.xml</exists> </file> <property> <name>release</name> <value>true</value> </property> </activation> <build> <plugins> <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>1.6</version> <configuration> <!-- definito in settings.xml --> <installDirectory>${build.ng.config.directory.install}</installDirectory> </configuration> <executions> <execution> <id>yarn release jenkins</id> <goals> <goal>yarn</goal> </goals> <configuration> <!-- eseguire solo da jenkins --> <arguments>_jenkins</arguments> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>3.1.0</version> <executions> <execution> <id>copy-resources from "temp" into parent target folder</id> <phase>package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.parent.basedir}/target/angular/temp</outputDirectory> <includeEmptyDirs>true</includeEmptyDirs> <resources> <resource> <directory>${project.build.directory}/angular/temp</directory> <filtering>false</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources from "war" into parent target folder</id> <phase>package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.parent.basedir}/target/angular/war</outputDirectory> <includeEmptyDirs>true</includeEmptyDirs> <resources> <resource> <directory>${project.build.directory}/angular/war</directory> <filtering>false</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0.0</version> <executions> <execution> <id>generating env.properties</id> <phase>generate-resources</phase> <goals> <goal>write-project-properties</goal> </goals> <configuration> <outputFile> ${project.build.directory}/env.properties </outputFile> </configuration> </execution> </executions> </plugin> <plugin> <!-- questo plugin e' necessario per normalizzare i path in windows creati nel file env.properties --> <groupId>com.google.code.maven-replacer-plugin</groupId> <artifactId>replacer</artifactId> <version>1.5.2</version> <executions> <execution> <id>replacing invalid chars in env.properties</id> <phase>generate-resources</phase> <goals> <goal>replace</goal> </goals> </execution> </executions> <configuration> <file>${project.build.directory}/env.properties</file> <replacements> <replacement> <token>\\:</token> <value>:</value> </replacement> </replacements> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>properties-to-lowercase</id> <goals> <goal>regex-property</goal> </goals> <configuration> <name>appPrefixLower</name> <regex>.*</regex> <value>${appPrefix}</value> <replacement>$0</replacement> <failIfNoMatch>false</failIfNoMatch> <toLowerCase>true</toLowerCase> </configuration> </execution> </executions> </plugin> <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>1.6</version> <!-- ${frontend-maven-plugin.version} --> <configuration> <!-- definito in settings.xml --> <installDirectory>${build.ng.config.directory.install}</installDirectory> </configuration> <executions> <execution> <id>install node ${build.ng.config.node.version} and yarn ${build.ng.config.yarn.version}</id> <goals> <goal>install-node-and-yarn</goal> </goals> <configuration> <!-- definito in produzione-web --> <nodeVersion>${build.ng.config.node.version}</nodeVersion> <!-- definito in produzione-web --> <yarnVersion>${build.ng.config.yarn.version}</yarnVersion> </configuration> </execution> <execution> <id>yarn install</id> <goals> <goal>yarn</goal> </goals> <configuration> <!-- definito in produzione-web --> <arguments>_install --cache-folder ${build.ng.config.directory.cache}</arguments> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>