[
https://issues.apache.org/jira/browse/SUREFIRE-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151348#comment-17151348
]
Tibor Digana commented on SUREFIRE-1811:
----------------------------------------
[~Pavel_K]
{{>> Do I understand you right - you want to find out if surefire includes
resources from src/main/resources}}
Exactly this is my meaning. As I understood the point of the title of this Jira
issue.
While talking about the ITs, it's practically easier to have some nested
projects or separate Git projects.
In my experiences, I used the same approach as you, this means writing the Unit
Tests and Integration Test in one POM (with Surefire and Failsafe plugin) but i
had to make the tricks to mutate the classpath with additional
inclusions/exclusions. I had the project under control but my colleagues were
lost, so i was finally the only one maintainer. So it means simple ITs and UTs
can be in one POM, but the question is how long it would be easy project.
My team also used {{maven-invoker-plugin}} but it did not work well with
InteliJ IDEA. Maybe now the IDEA is more intelligent, since I left the company
I did not use the project with latest version of IDEA.
As an example, this is the Maven Core project and its Jenkinsfile which builds
the Maven dist and runs the ITs by [cloning the Git
repo|https://github.com/apache/maven/blob/master/Jenkinsfile#L73] from another
Git repo [Maven Integration
Tests|https://github.com/apache/maven-integration-testing/].
> 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)