Solve the problem of jar dependency and package replication of system in Maven
Dependent management configuration:
Com.alibaba fastjson 1.2.29 system E:/projectsx/lecing/lecing5/code/back/lib/fastjson-1.2.29-SNAPSHOT.jar
Dependency configuration:
Com.alibaba fastjson
Build configuration:
In the parent POM:
${project.artifactId} ${basedir} / src/main/java * * / * .xml * * / * .properties ${basedir} / src/main/resources Org.apache.maven.plugins maven-resources-plugin 2.7 UTF-8 org.apache.maven.plugins maven-compiler-plugin 3.5.1 1.8 1.8 UTF-8
In the child POM:
${basedir} / src/main/java * * / * .xml * * / .properties ${basedir} / src/main/resources org.apache.maven.plugins maven-dependency-plugin 3.0.2 Package copy-dependencies system ${project.build.directory} / ${project.build.finalName} / WEB-INF/lib
The plug-in in the sub-POM is the key to the solution.