ervu-eks/frontend/pom.xml
2025-11-21 18:31:02 +03:00

154 lines
4.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.micord.ervu</groupId>
<artifactId>eks</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<groupId>ru.micord.ervu.eks</groupId>
<artifactId>frontend</artifactId>
<packaging>war</packaging>
<properties>
<enable.version.in.url>false</enable.version.in.url>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/.nx</directory>
<directory>${basedir}/.angular</directory>
<directory>${basedir}/tmp</directory>
<directory>${basedir}/dist</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<id>replace-version-in-url</id>
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${basedir}/dist/src/resources/app-config.json</include>
</includes>
<replacements>
<replacement>
<token>%project.version%</token>
<value>${project.version}</value>
</replacement>
<replacement>
<token>%enable.version.in.url%</token>
<value>${enable.version.in.url}</value>
</replacement>
</replacements>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<copyWebResources>false</copyWebResources>
<webResources>
<resource>
<directory>${basedir}/build_dev</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>frontend build</id>
<goals>
<goal>exec</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build-dev</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>prod</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<copyWebResources>false</copyWebResources>
<webResources>
<resource>
<directory>${basedir}/dist</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>frontend build</id>
<goals>
<goal>exec</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>enable-version-in-url</id>
<properties>
<enable.version.in.url>true</enable.version.in.url>
</properties>
</profile>
</profiles>
</project>