pom.xml 4.7 KB
Newer Older
1 2 3 4 5 6 7
<?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">
    <parent>
        <artifactId>zlt-web</artifactId>
        <groupId>com.zlt</groupId>
zlt2000's avatar
zlt2000 已提交
8
        <version>5.6.0</version>
9 10 11 12
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>react-web</artifactId>
13
    <description>React开发的前端(Ant Design)</description>
14 15

    <properties>
16 17
        <node.version>v16.13.2</node.version>
        <yarn.version>v1.22.19</yarn.version>
18
    </properties>
19 20 21 22 23 24
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>
25
    <!--<build>
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.12.1</version>
                <executions>
                    <execution>
                        <id>install node and yarn</id>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>src/main/frontend</installDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn install</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                            <workingDirectory>src/main/frontend</workingDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn run build</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                            <workingDirectory>src/main/frontend</workingDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <includeEmptyDirs>true</includeEmptyDirs>
                </configuration>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
87
                <version>${spring-boot-dependencies.version}</version>
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/frontend/dist</directory>
                <targetPath>META-INF/central-platform-ui</targetPath>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>
    <profiles>
        <profile>
            <id>noNode</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
123
    </profiles>-->
124 125

</project>