Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Getting "missing required source folder: 'src/test/java'" for m2e 1.1

I don't know much about m2e/adt integration, so can't tell if the code
does anything wrong (can't really tell what it does without knowing what
instances get injected and how).

Not sure if this will help, but you can see overall m2e/jdt project
configuration logic in [1]. The code that creates source folders is [2].

One thing to note is that java project configurators are not supposed to
manipulated jdt project configuration directly. They are supposed to
mutate provided IClasspathDescriptor instance.

[1] https://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java?id=releases/1.1/1.1.0.20120530-0009#n103 [2] https://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java?id=releases/1.1/1.1.0.20120530-0009#n357


--
Regards,
Igor

On 12-09-02 7:34 AM, Ricardo Gladwell wrote:
Hi Igor

I think I've narrowed it down as to why my plugin is stripping out the
optional attributes for source folder classpath entries. I inject an
instance of the JavaProjectConfigurator into my project, which I call
before I start to re-configure my project:

javaProjectConfigurator.configure(request, monitor);

Please see here:

https://github.com/rgladwell/m2e-android/blob/master/me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/AndroidMavenProjectConfigurator.java#L68

For some reason the JavaProjectConfigurator is stripping out these
attributes, am I doing something wrong?

TIA...

--
Ricardo Gladwell <ricardo.gladwell@xxxxxxxxx>
Web: http://gladwell.me/ - Twitter: @rgladwell
GTalk: ricardo.gladwell@xxxxxxxxx


On 28 August 2012 12:52, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
All source folders created by m2e 1.1+ should be marked as optional.
Looks like android tooling does not respect that classpath entry attribute.

See [1] for some background info and discussion

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=361549


--
Regards,
Igor


On 12-08-28 5:47 AM, Ricardo Gladwell wrote:

Hi Guys

Since I upgraded to m2e 1.1 I've been getting an error message "missing
required source folder: 'src/test/java'" for android-maven-plugin
projects in Eclipse despite the fact I don't have a "src/test/java"
folder in my Android project source tree.

How is m2e 1.1 getting this additional source folder? Am I doing
something wrong with my m2e extension? Or is the android-maven-plugin
adding test source folders to the MavenProject model even when they
don't exist?

TIA...

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



Back to the top