How multiple source sets can be managed in Maven #37
Replies: 6 comments 24 replies
-
Why not using the built in support of compiler (+resources if needed) plugin thru executions? 🤔 |
Beta Was this translation helpful? Give feedback.
-
My goal with the reference to MNG-6390 was not to said that requests are numerous (I have no data for that), but that they are not recent. |
Beta Was this translation helpful? Give feedback.
-
Because this was compared to what Gradle offers in earlier comments, I would like to share some info on that. Maybe it helps to put the scope here into perspective. In Gradle these things are called Source Set and Source Directory Set (small but important destiction!). Both Source Set and Source Directory Set can be dynamically added to a project. In fact, these are not core concepts but only concepts added by the Example
In Maven... |
Beta Was this translation helpful? Give feedback.
-
The Gradle's concept of "source set" may map approximately (but not completely) to the About building many JAR files in a single Maven module, even if the community rejected that proposal in the past, it may be time to reconsider. Because the Java language has evolved. In a Modular Source Hierarchy, those JAR files are not unrelated. Their content are the result of a single call to
Unless you can answer "yes" to one of above questions, multi-JAR files is a natural consequence of one way (among 2 or 3 ways) that Java standard compiler works today, and are necessary for allowing developers to build safer code and documentation in cases like above use case. Anyway, it is not in this thread that we can said "no, this safety doesn't deserve to be given to developers". This is a question for the community. |
Beta Was this translation helpful? Give feedback.
-
That Gradle comment was based on a misunderstanding of what Module Source Hierarchy is. I'm in the Community Over Code Europe conference and had a talk with a Gradle engineer yesterday. They reopened the issue following that discussion.
It seems to me that Maven should adapt to Java, not the opposite. |
Beta Was this translation helpful? Give feedback.
-
I remember to have seen this statement from an Oracle employee, but there is also material such as Youtube videos of Oracle employees showing how to use JPMS in our own projects. There is also some new Java features that requires JPMS, such as JEP-476 (we way agree or not with that JEP, this is not the point). In addition of already existing tools that are clearly targeted to users, not the JDK, such as |
Beta Was this translation helpful? Give feedback.
-
This is based on the discussion in #11
An idea (copied from #11) might look like this:
Goal of this milestone should not be to have a final 100% solid integration in Maven but to have a definition for the future with a working prototype. Next to that parts of the prototype that does not make Maven 4 incompatible can be merged directly to Maven.
Beta Was this translation helpful? Give feedback.
All reactions