Hi,
Top-package (unnamed package) classes can not be referenced from classes
in named packages anyway, so they usually represent just reflective
entry points (such as Main class with main() method). If a jar is used
as an automatic module, it would probably be safe to just ignore any
classes that appear in the jar at the top-level. Maybe this way there
would be less grief in trying to use such jars as automatic modules than
by rejecting them.
Regards, Peter
On 08/02/2016 02:59 PM, Andrew Dinn wrote:
On 02/08/16 13:01, Alan Bateman wrote:
HelpMojo seems to be something to do with Maven Plugin Plugin. It
doesn't seem to be present in nar-maven-plugin 3.3.0 or 3.5.0
HelpMojo is indeed something to do with the Maven Plugin Plugin. The
latter will generate a class called HelpMojo on demand to provide
automatic help output to guide configuration and use of a Maven plugin
built using the Plugin Plugin.
However, a generated HelpMojo definition is not normally generated in
the empty package since it is usually generated in the same package as
the XXXMojo that implements the XXX plugin behaviour. Of course it can
also be implemented by hand. Looking at the 3.0.0 source jar file
com/github/maven_nar/HelpMojo.java
contains a definition for class HelpMojo which appears to have been
hand-code and does not have a package declaration. The package
declaration appears to have been added in 3.2.0. In 3.3.0 the file
appears to have been removed -- I assume the class been auto-generated
by this stage.
So, the solution here is to use the fixed version of the plugin.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander