[ 
https://issues.apache.org/jira/browse/SUREFIRE-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17154082#comment-17154082
 ] 

Tibor Digana commented on SUREFIRE-1811:
----------------------------------------

[~cowwoc]
If you are thinking in terms of visibility of SPI resources or 
{{META-INF/persistence.xml}}, it may be legal to expose them via {{open}} 
especially the JPA resources. You want the Hibernate to read this resource and 
there is no risk to make such a module {{open}} due to the fact that the Java 
EE container must have Java Reflection access to the JPA Entity classes and 
{{persistence.xml}}. I don't see this bad attitude. Finally, the JAR files 
endup in the WAR and nowhere else. It would be really very strange architecture 
to share that JAR across multiple WARs, but if it is intended why not, awful 
architecture but it would happen with or without JPMS anyway. Normally, the 
JARs are not shared across WARs.
I do not see JPMS very useful in the enterprise world. Maybe if the Jakarta EE 
project would consider JPMS as the Cloud service so that the JEE container 
would be a service and the CDI, JTA, JAX-RS apis would be attached to the 
module path upon the module descriptor. But the WAR is enclosed application so 
we do not have to be too strict.

> Add resources to JPMS test module
> ---------------------------------
>
>                 Key: SUREFIRE-1811
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1811
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Failsafe Plugin
>    Affects Versions: 3.0.0-M5
>            Reporter: Pavel_K
>            Priority: Major
>
> I am testing version 3.0.0-M5 with two module-info in one project - one main 
> and one for test. My test project is here 
> https://github.com/PashaTurok/hibernate-h2-test4 . The problem is with 
> resources. For example, I have  src/main/resources/META-INF/persistence.xml 
> file that is not copied to test module. Because of this it is not possible to 
> find resource in test module and it is necessary to use something like this 
> https://github.com/PashaTurok/hibernate-h2-test4/blob/292e2e683ad72487cbf8d2e5a35dde0d9255001a/src/test/java/com/foo/hibernate/h2/test4/TestIT.java#L72
>  . 
> In target/test-classes/META-INF/jpms.args I see:
> {code:java}
> --patch-module
> my.project=/home/..../hibernate-h2-test4/src/main/java, 
> /home/.../hibernate-h2-test4/target/generated-sources/annotations
> {code}
> As I understand test module will NOT contain resources from the module under 
> test? I mean that test module will NOT contain 
> /home/..../hibernate-h2-test4/src/main/resources? 
> That's why I suggest to include src/main/resources in test module.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to