MAVEN 工程A 依赖 MAVEN 工程B
工程B 已经install在本地Maven repo 中了,eclipse 没有报错,是能够找到工程B的class 文件,但是打包的时候就报错
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project service-provider: Compilation failure: Compilation failure:
[ERROR] /xxxxx/oservice/service-provider/src/main/java/com/xxx/service/provider/SchoolServiceImpl.java:[15,17] cannot find symbol
[ERROR] symbol: class SchoolMapper
[ERROR] location: class zzz.xxx.service.provider.SchoolServiceImpl
[ERROR] /services/microservice/xxx-service-provider/src/main/java/com/xxx/service/provider/SchoolServiceImpl.java:[18,16] cannot find symbol
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.greatschools.service.provider.App</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>