| | |
| | | <docker.password>Harbor12345</docker.password> |
| | | <docker.namespace>ubcs</docker.namespace> |
| | | <docker.plugin.version>1.4.13</docker.plugin.version> |
| | | <!-- 各子模块按实际目录层次定义相对数据,使所有服务模块输出资源汇聚到相同目录,详见子目录定义示例 --> |
| | | <boot-jar-output>${project.build.directory}</boot-jar-output> |
| | | <server.lib.path>../../target/libs</server.lib.path> |
| | | </properties> |
| | | |
| | | <modules> |
| | |
| | | <module>ubcs-plugin-api</module> |
| | | <module>ubcs-service</module> |
| | | <module>ubcs-service-api</module> |
| | | <module>ubcs-codeApply</module> |
| | | <!--<module>ubcs-codeApply</module>--> |
| | | </modules> |
| | | |
| | | <dependencyManagement> |
| | |
| | | <resources> |
| | | <resource> |
| | | <directory>src/main/resources</directory> |
| | | <excludes> |
| | | <!--<exclude>bootstrap.yml</exclude> |
| | | <exclude>application.yml</exclude> |
| | | <exclude>application-dev.yml</exclude> |
| | | <exclude>application-test.yml</exclude> |
| | | <exclude>application-prop.yml</exclude>--> |
| | | </excludes> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/java</directory> |
| | |
| | | </resource> |
| | | </resources> |
| | | <pluginManagement> |
| | | <!--<plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <version>${spring.boot.version}</version> |
| | | <configuration> |
| | | <fork>true</fork> |
| | | <finalName>${project.build.finalName}</finalName> |
| | | </configuration> |
| | | <executions> |
| | | <execution> |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>com.spotify</groupId> |
| | | <artifactId>dockerfile-maven-plugin</artifactId> |
| | | <version>${docker.plugin.version}</version> |
| | | <configuration> |
| | | <username>${docker.username}</username> |
| | | <password>${docker.password}</password> |
| | | <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository> |
| | | <tag>${project.version}</tag> |
| | | <useMavenSettingsForAuth>true</useMavenSettingsForAuth> |
| | | <buildArgs> |
| | | <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE> |
| | | </buildArgs> |
| | | </configuration> |
| | | <!–子服务添加如下配置,运行 mvn deploy 命令便会自动打包镜像–> |
| | | <!–<executions> |
| | | <execution> |
| | | <id>default</id> |
| | | <goals> |
| | | <goal>build</goal> |
| | | <goal>push</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions>–> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-antrun-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>run</goal> |
| | | </goals> |
| | | <configuration> |
| | | <tasks> |
| | | <!–suppress UnresolvedMavenProperty –> |
| | | <copy overwrite="true" |
| | | tofile="${session.executionRootDirectory}/target/${project.artifactId}.jar" |
| | | file="${project.build.directory}/${project.artifactId}.jar" /> |
| | | </tasks> |
| | | </configuration> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | </plugins>--> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | <goal>copy-dependencies</goal> |
| | | </goals> |
| | | <configuration> |
| | | <outputDirectory>../../target/lib</outputDirectory> |
| | | <outputDirectory>${server.lib.path}</outputDirectory> |
| | | <excludeTransitive>false</excludeTransitive> |
| | | <stripVersion>false</stripVersion> |
| | | <includeScope>runtime</includeScope> |
| | |
| | | <archive> |
| | | <manifest> |
| | | <addClasspath>true</addClasspath> |
| | | <classpathPrefix>lib/</classpathPrefix> |
| | | <!--<classpathPrefix>./libs</classpathPrefix>--> |
| | | <classpathPrefix>/data1/ubcs/ubcs-server/libs</classpathPrefix> |
| | | <useUniqueVersions>false</useUniqueVersions> |
| | | </manifest> |
| | | </archive> |
| | | <excludes> |
| | | <exclude>application-dev.yml</exclude> |
| | | <exclude>application-prod.yml</exclude> |
| | | <exclude>application.yml</exclude> |
| | | <exclude>lib/*</exclude> |
| | | </excludes> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </pluginManagement> |
| | | |
| | | <!--<plugins> |
| | | <plugin> |
| | | <groupId>com.spotify</groupId> |
| | | <artifactId>dockerfile-maven-plugin</artifactId> |
| | | <configuration> |
| | | <skip>true</skip> |
| | | </configuration> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <artifactId>maven-compiler-plugin</artifactId> |
| | | <version>${maven.plugin.version}</version> |
| | | <configuration> |
| | | <source>${java.version}</source> |
| | | <target>${java.version}</target> |
| | | <encoding>UTF-8</encoding> |
| | | <compilerArgs> |
| | | <arg>-parameters</arg> |
| | | </compilerArgs> |
| | | </configuration> |
| | | </plugin> |
| | | |
| | | </plugins>--> |
| | | |
| | | </build> |
| | | |
| | | <repositories> |