I have two modules: Component and Application. The Component module is obscured due to a dependency conflict (google protocol buffers) later in the build process.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.3</version> <configuration> <relocations> <relocation> <pattern>com.google.protobuf</pattern> <shadedPattern>my.package.protocols.shaded.com.google.protobuf</shadedPattern> </relocation> </relocations> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin>
The application depends on the Component module. However, the source files in the application cannot reference the shaded library on which the component depends. This is important for interacting with a component.
<-- snip from Application pom.xml --> <dependency> <groupId>my-group</groupId> <artifactId>component</artifactId> <version>${project.version}</version> </dependency>
Although no import was found by IntelliJ, the Maven build works fine. What am I missing / doing wrong?
intellij-idea maven
Andrew White
source share