Maven does not merge R.java files in the same way as Eclipse

I have a file in the res / raw folder that I can properly view when compiling with Eclipse. When the same project is compiled with Maven through Continuous Integration, the file will not go through as I expect.

In Eclipse, I have an API project and a user interface project. The API project must be built first, as the user interface project is invoked in the API. The API project was introduced into the user interface project as a source of links, so the source is well added to Eclipse.

For my CI with Maven, I have this dependency:

<dependency>
  <groupId>com.myapp.api</groupId>
  <artifactId>API</artifactId>
  <version>${project.version}</version>
  <scope>compile</scope>
</dependency>

When I launch the application that Maven created, the resource identifier that I referenced in the API is duplicated in the user interface as another resource identifier, so my res / raw file was not found in the API.

What am I missing for Maven to focus R.java files in the way Eclipse did?

+3
source share
2 answers

If you have two separate Android projects, look at the maven-android-plugin.
Here's a brief description of how to use Android library projects, and here is more information and troubleshooting.

+1
source

Android, Eclipse Maven.

mvn eclipse:eclipse

.project .classpath pom. , Android, (, ).

0

All Articles