Skip to content
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

Come up with a module name #171

Open
1 of 2 tasks
ultraq opened this issue Apr 7, 2018 · 1 comment
Open
1 of 2 tasks

Come up with a module name #171

ultraq opened this issue Apr 7, 2018 · 1 comment

Comments

@ultraq
Copy link
Owner

ultraq commented Apr 7, 2018

With Java 9 and now 10 out, it's time to think of a module name for this project, and everything else I have. Stephen Colebourne has some good opinions on things in his blog (eg: http://blog.joda.org/2017/04/java-se-9-jpms-module-naming.html) so I might take some inspiration from there.

So far I've relied on Maven to take care of all of this for me, eg: the artifactId of this project is thymeleaf-layout-dialect, and the packages within are nz.net.ultraq.thymeleaf. Where that falls flat is that I've used the package of nz.net.ultraq.thymeleaf to pretty much every other Thymeleaf-related project I've created. With JPMS, I can't assign nz.net.ultraq.thymeleaf to one project because it then means I can't use it in another.

So maybe something like nz.net.ultraq.thymeleaf.layoutdialect? (You can't use dashes in module names unfortunately 😭 ) And then I move the source code to follow to a similarly-named package structure so I can have nicer exports declarations? And then I have to do the same to every other Thymeleaf-related project under my name?

🤷‍♂️

  • First step: come up with a name and slap that into the Automatic-Module-Name entry in MANIFEST.MF
  • Then, move all of the files around so that I can write a module-info.java file with the appropriate exports/imports
@ultraq ultraq self-assigned this Apr 7, 2018
@ultraq ultraq added this to the Layout Dialect 3 milestone Mar 18, 2019
ultraq added a commit that referenced this issue Aug 15, 2021
@ultraq
Copy link
Owner Author

ultraq commented Aug 15, 2021

I've set Automatic-Module-Name to be nz.net.ultraq.thymeleaf.layoutdialect, and that's as far as I've managed to get. There are a bunch of issues still floating around w/ Gradle subprojects, Java modules, Groovy, and even IntelliJ IDEA that makes working and testing a full Java module build annoyingly difficult 😕

The most I've managed is to get a simple Java 11 project (I tried converting the benchmark subproject from Groovy -> Java) running with a module-info.java file that included the addition above, running it all via the CLI.

So this issue will stay open beyond the 3.0.0 release since going full module just isn't possible right now with my setup. Not sure what else I should be trying? Maybe updating packages so that it can work better with how I understand Java modules should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant