-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FREEMARKER-7] convert to Maven build #96
Conversation
a3395e7
to
0a84190
Compare
I'd say not too bad for the first try :) |
0a84190
to
8ee01fc
Compare
Down to three test errors:
Sadly there is not description for the exception:
|
As of migrating away from Ant, there's already a PR for a Gradle-based solution, that keeps binary backward compatibility, while still modularizes the source code (as it's in the current 3.x). That also can handle the cases where we depend on multiple versions of the same artifact (like even of Java), which we sometimes need (in 2.x, as we have a monolithic artifact, for backward compatibility). As of the Maven package name change, I'm against changes that are annoyances for the users without bringing significant new benefits in exchange. At least last time I checked, renaming a Maven group is a pain for its consumers, because then Maven won't do version conflict resolution between the old and new artifacts, and you end up having multiple versions of the same classes in your application. (So then you should also rename the Java packages, so the two artifacts can co-exist, but that's an even more drastic change, and should have really good reasons. Like when you want to break backward compatibility in template language rules anyway, as in the current 3.x, then you should do that. But not just for aesthetic reasons for sure.) |
I know. But since we are Apache, you'd get plenty of help from other foundation members, committers etc. We already have an Apache-based project setup which adds the benefit of streamlined releases, reproducible releases etc. As for the backward compatibility:
No need to do that right now, BUT it would be worth it to streamline Apache projects.
That is not entirely true. First of all, dependabot, renovate etc. can read the relocation from the pom.xml:
Other projects did this as well, see Junit 4 to JUnit Jupiter. I never saw anyone being trapped with this. On the contrary, it was helpful that two major versions could co-exist: Migration does not need to be done at the same time for all files. This could be true for Freemarker. To summarize: With only the changes mentioned in the first post of the PR, users would have a migration release which does not expect a lot of work:
Again, I am only saying "move your 3 branch to 4 and keep Gradle". The idea is that I want to use freemarker with JPMS right now and don't want to wait for the current-3-branch for two more years with so many breaking changes etc. which is way more pain. |
As for backwards compatible binary: We can still do that in a multi-module setup with maven. And I disagree with your opinion that this is less feasible with Maven. We could do that right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR looks reasonably simple, but it still changes things that are not necessary (groupId, JDK runtime prerequisite)
even the removal of 4 classes si questionable: is it necessary to do that now? Or do it in a future different PR?
@@ -33,7 +33,7 @@ | |||
<ivy pattern="${localMaveRepoDir}/[organisation]/[module]/[revision]/[module]-[revision].pom" /> | |||
</filesystem> | |||
--> | |||
<ibiblio name="mavenCentral" m2compatible="true" /> | |||
<ibiblio name="mavenCentral" m2compatible="true" root="https://nexus.intern/repository/central/" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this root="https://nexus.intern/repository/central/"
? it feels like a personal setup: is it really expected to be shared?
<version>30</version> | ||
</parent> | ||
|
||
<groupId>org.apache.freemarker</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change the groupId? it's not necessary nor useful for this step
please focus this PR to the minimal changes: one PR per topic
|
||
|
||
<properties> | ||
<javaVersion>8</javaVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it absolutely necessary top switch to Java 8 in this PR?
again, this PR should have minimal impact on the output vs previous build: changing prerequisite JDK is a future topic
The idea is that this is merged into a new branch, a new 3 branch. Yes, the idea here is to change a few things, see on the mailing list. Intermediate release with just Java 8 But yes, changing the location is not needed here. And the removal of the duplicate classes could be done in another pr, but would need to come first |
To clarify, for anyone else looking at this, FREEMARKER-7 was closed like 5 years ago. That's when the "3" branch switched to Gradle. Then even that was modernized, and there's a similar Gradle PR for 2.3.x: #79 (FREEMARKER-204). I'm not aware of any issue with that. |
oh, I did not know: the only issue is that it's not merged |
Thanks for the clarification. Closed in favour of new PRs. |
Yeah... The reason it's not merged that it makes the source code modular, just like in "3" (but here it still generates a single monolithic jar), so if I merge it, I will break all pending PR-s (or I think so). So I have to review and merge those first... And I couldn't catch up so far. And then merge the Gradle one. And then have time to check if it can go into the release. |
fixes FREEMARKER-7
// Edit: I got tricked by JIRA and mistakenly thought that the issue was still open. Sorry for the confusion.
// There is of course no need to add Maven to a working ANT and Gradle build (branches 2.3-gae and 3 respectively).
This is a PoC for a proposal:
Move the current 3-Branch to 4, and make a new 3.0.0-branch with only the following features:
org.apache.freemarker
(currently:freemarker
).This would be a very slight change for users which would be a good stepping stone towards a 4.0 release (current 3.x branch).