Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Aggregator javadoc dependency problem

Can you check build classpath for myproject-subproject either with
dependency:build-classpath or by running the build with -X parameter? I
want to know if the javadoc jar is on classpath or not.

--
Regards,
Igor

On 12-10-12 11:54 AM, Chris Conroy wrote:
I've encountered a problem with m2e's handling of a dependency on a
javadoc jar. In short, dependencies with the javadoc classifier are
being improperly treated as java dependencies.



I have a top level aggregator (packaging=pom) project which includes an
aggregate-jar goal from the maven-javadoc-plugin in order to generate
project-wide javadoc for hosting in a web server.

In one of the aggregator's sub-projects, I have a dependency on the
result of that aggregate-jar goal:

<dependency>
     <groupId>org.mygroup</groupId>
     <artifactId>myproject-toplevel</artifactId>
     <classifier>javadoc</classifier>
</dependency>

I use this dependency so that I can make the javadoc available to be
served by a jetty server within the project, and it works fine from the
command line.


However, there appear to be 2 issues in the handling of this by m2e that
manifests as 1 type of error:
*"Project 'myproject-subproject' is missing required Java project
'myproject-toplevel'"*

*  (1): The javadoc dependency is being treated as a Java dependency,*
but it isn't! It is of type JAR, but there's no java code to compile in
there, just the javadoc pages. It's possible this is a bug in the
maven-javadoc-plugin, but I'm not sure as I'm relatively new to Maven.
*(2): I can't seem to get m2e to apply the java nature to the top level
aggregator project.* It looks like this might be intentional:
http://dev.eclipse.org/mhonarc/lists/m2e-users/msg01889.html

(1) or (2) on its own would be fine, but their combination is
breaking. If I remove the aggregator project from my Eclipse workspace,
then m2e is happy again.


Any advice for configuration options to fix this would be greatly
appreciated.





My workspace layout looks like:
myproject-toplevel
myproject-subproj1
myproject-subproj2
myproject-subproj3
...

Technically, I don't need myproject-toplevel in the workspace because
all of the code lives in the sub projects. However I'd like to resolve
this issue because it's useful to be able to include the aggregator
project in order to edit the top level pom.xml, and other team members
are likely to import that project when setting up their workspace since
the import UI selects all available poms in a structure to import.


--
Chris Conroy


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



Back to the top