I'm using Intellij and a coworker is using Eclipse. There is a datamodel
project that most components depend on that has all the JPA code.
One of datamodel
dependencies is utils
. In utils
there are generated sources. My coworker in Eclipse, adds the target/generated-sources of utils
to the build path and everything builds and runs fine within Eclipse.
In Intellij, when I go to Project Structure, do I need to go to utils
and add the target/generated-sources of utils
as a Source
folder to be equivalent?
Or do I need to add that module as a dependency?
Edit: In utils pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<mkdir dir="target/generated-sources" />
<exec executable="protoc">
<arg value="--java_out=target/generated-sources" />
<arg value="src/main/resources/utilities.proto" />
</exec>
</tasks>
<sourceRoot>target/generated-sources</sourceRoot>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>