Gary, the test jar doesn’t perform tests. It provides test utility classes like 
LoggerContextRule.



> On Jun 22, 2021, at 12:31 PM, Gary Gregory <garydgreg...@gmail.com> wrote:
> 
> It feels to me like JPMS just plainly breaks the informal industry standard
> of the Maven project layout we have all been using for a million years.
> 
> In addition, how is one supposed to test package private code if a test jar
> tests a main jar where all packages are now different? This seems like a
> problem whether the test code is in the same Maven module or not. Or am
> I missing something? Am I the only one feeling like JPMS what developed in
> a vaccum?
> 
> Gary
> 


Gary, testing package private stuff is fine and easy if you don’t generate a 
test jar. In that case unit tests 
behave as they always have except that you have to create a module-info.java 
that gives you access 
to the internals of the module.  The problem occurs simply because the test jar 
being created cannot 
contain classes in the same package space as the main module, so you can no 
longer just publish 
your test utility classes combined with the unit tests as the test jar.

Ralph

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to