R.java and Maven Release Problem

1 view
Skip to first unread message

Shane Isbell

unread,
Sep 5, 2008, 6:09:45 PM9/5/08
to Masa Developers
R.java generation within the source directory causes some problems
with the maven release plugin. Specifically, it complains about a
modified R.java not matching the svn version. I'm thinking about
moving any generated files into a target/generated-source directory.
This would mean that R.Java would not be versioned within a vs but
would still be used in a compile. Thoughts?

Thanks,
Shane

Kobi Cohen-Arazi

unread,
Sep 5, 2008, 7:06:06 PM9/5/08
to masa-de...@googlegroups.com
Hi,

Sorry if it is a stupid question:
Do we really need to version control R.java?

Thanks,
Kobi
--
- Kobi

Shane Isbell

unread,
Sep 6, 2008, 3:55:14 PM9/6/08
to masa-de...@googlegroups.com
On Fri, Sep 5, 2008 at 4:06 PM, Kobi Cohen-Arazi <kobi.co...@gmail.com> wrote:
Hi,

Sorry if it is a stupid question:
Do we really need to version control R.java?
Since it's generated, it shouldn't be under version control but I'm not sure how having a primary source directory and a generated source directory would affect the Eclipse builds and setup for android. Since there were no objections, I went ahead and made the change. By default, R.Java and aidl files are now placed in target/generated-sources directory. The next step is to add support for the new platform unit tests with a Masa build.

Thanks,
Shane


Shane Isbell

unread,
Sep 6, 2008, 3:56:34 PM9/6/08
to masa-de...@googlegroups.com
This update means that the maven release plugin should work.

Kobi Cohen-Arazi

unread,
Sep 7, 2008, 12:25:13 AM9/7/08
to masa-de...@googlegroups.com
OK. but how would Maven's compiler pluging know that R.java is not in src/main/java/....but in a different place ?
Don't you need to instruct it to look for that file in that directory? (or maybe I'm missing here something.)

Thanks,
Kobi.

Shane Isbell

unread,
Sep 7, 2008, 1:02:46 AM9/7/08
to masa-de...@googlegroups.com
I just add the additional location through MavenProject.addCompileSourceRoot within the aapt mojo.

Shane
Reply all
Reply to author
Forward
0 new messages