|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | + <parent> |
| 6 | + <groupId>dev.marco</groupId> |
| 7 | + <artifactId>java-angular-example</artifactId> |
| 8 | + <version>0.1-SNAPSHOT</version> |
| 9 | + <relativePath>../pom.xml</relativePath> |
| 10 | + </parent> |
| 11 | + |
| 12 | + <modelVersion>4.0.0</modelVersion> |
| 13 | + |
| 14 | + <properties> |
| 15 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 16 | + <project.build.outputEncoding>UTF-8</project.build.outputEncoding> |
| 17 | + <maven.compiler.source>15</maven.compiler.source> |
| 18 | + <maven.compiler.target>15</maven.compiler.target> |
| 19 | + <failOnMissingWebXml>false</failOnMissingWebXml> |
| 20 | + </properties> |
| 21 | + |
| 22 | + <artifactId>backend</artifactId> |
| 23 | + |
| 24 | + <dependencies> |
| 25 | + <dependency> |
| 26 | + <groupId>dev.marco</groupId> |
| 27 | + <artifactId>frontend</artifactId> |
| 28 | + <version>0.1-SNAPSHOT</version> |
| 29 | + <type>war</type> |
| 30 | + </dependency> |
| 31 | + </dependencies> |
| 32 | + |
| 33 | + <build> |
| 34 | + <plugins> |
| 35 | + <plugin> |
| 36 | + <groupId>org.springframework.boot</groupId> |
| 37 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 38 | + <version>2.4.3</version> |
| 39 | + <configuration> |
| 40 | + <mainClass>dev.marco.example.springboot.Application</mainClass> |
| 41 | + </configuration> |
| 42 | + <executions> |
| 43 | + <execution> |
| 44 | + <goals> |
| 45 | + <goal>repackage</goal> |
| 46 | + </goals> |
| 47 | + </execution> |
| 48 | + </executions> |
| 49 | + </plugin> |
| 50 | + |
| 51 | + <plugin> |
| 52 | + <groupId>org.apache.maven.plugins</groupId> |
| 53 | + <artifactId>maven-dependency-plugin</artifactId> |
| 54 | + <version>3.1.2</version> |
| 55 | + <executions> |
| 56 | + <execution> |
| 57 | + <id>unpackng</id> |
| 58 | + <phase>initialize</phase> |
| 59 | + <goals> |
| 60 | + <goal>unpack</goal> |
| 61 | + </goals> |
| 62 | + <configuration> |
| 63 | + <artifactItems> |
| 64 | + <artifactItem> |
| 65 | + <groupId>dev.marco</groupId> |
| 66 | + <artifactId>frontend</artifactId> |
| 67 | + <type>jar</type> |
| 68 | + <overWrite>true</overWrite> |
| 69 | + <outputDirectory>${project.build.directory}/angular</outputDirectory> |
| 70 | + </artifactItem> |
| 71 | + </artifactItems> |
| 72 | + </configuration> |
| 73 | + </execution> |
| 74 | + </executions> |
| 75 | + </plugin> |
| 76 | + |
| 77 | + <plugin> |
| 78 | + <groupId>org.apache.maven.plugins</groupId> |
| 79 | + <artifactId>maven-antrun-plugin</artifactId> |
| 80 | + <version>1.8</version> |
| 81 | + <executions> |
| 82 | + <execution> |
| 83 | + <id>move</id> |
| 84 | + <phase>generate-sources</phase> |
| 85 | + <goals> |
| 86 | + <goal>run</goal> |
| 87 | + </goals> |
| 88 | + <configuration> |
| 89 | + <target> |
| 90 | + <copy todir="${project.build.directory}/classes/static" flatten="false"> |
| 91 | + <fileset dir="${project.build.directory}/angular/frontend"> |
| 92 | + <include name="**/*.*"/> |
| 93 | + </fileset> |
| 94 | + </copy> |
| 95 | + </target> |
| 96 | + </configuration> |
| 97 | + </execution> |
| 98 | + </executions> |
| 99 | + </plugin> |
| 100 | + </plugins> |
| 101 | + </build> |
| 102 | +</project> |
0 commit comments