An error occurred while packaging a command to the MAVEN project could not find the package, the package failed, the error is as follows:
When Maven fails to find a symbol error, the general step is to execute the Eclipse's project---clean-all projects, and then perform MAVEN cleanup to clear the project to see if it solves the problem.
Find some information on the net, roughly summed up as follows:
1. Project coding problem, ensure code unification
The Pom.xml file sets the JDK version, source indicates the supported JDK version, and target specifies the JDK version after the project is packaged.
Also view the JDK version of the project itself, click Project maven Dependency right-->build path->configure build path ..., and then set the JDK version of the project. Guaranteed Code Consistency
2. Pom dependency problem, this dependency may be a dependency without adding a package, if the aggregation project may not add the dependency of other modules, or add the dependencies of other modules, but did not package the dependent modules to the local warehouse, etc.
However, there is no solution to my problem, but the workaround is to add a scope tag to the missing dependencies. This scope is set to provided only when it is compiled and tested, and there is no transitivity
PS: <scope> it primarily manages dependent deployments. Currently <scope> can use 5 values:
* Compile, default, applies to all stages and will be published along with the project.
* provided, similar to compile, expects the JDK, container or user to provide this dependency. such as Servlet.jar.
* Runtime, used only at runtime, such as JDBC driver, for run and test phases.
* Test, used only during testing, to compile and run the test code. Will not be published with the project.
* System, similar to provided, needs to explicitly provide an jar,maven that contains dependencies and does not find it in repository