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

Java Modules v1.3.x #204

Closed
nhojpatrick opened this issue May 26, 2018 · 7 comments
Closed

Java Modules v1.3.x #204

nhojpatrick opened this issue May 26, 2018 · 7 comments
Labels
Hamcrest future Where do we want to take hamcrest?

Comments

@nhojpatrick
Copy link
Member

Hamcrest future

Java modules was massive change, rolling out a patch on 1.3 which supports modules I feel would be useful for downstream projects that build upon, use or incorporate hamcrest into their libraries.

I'm specifically talking about "Automatic-Module-Name" being added into the MANIFEST.MF.

@sf105
Copy link
Member

sf105 commented Jun 1, 2018

It sounds useful. What do we need to do in this space?

@sf105 sf105 added the Hamcrest future Where do we want to take hamcrest? label Jun 1, 2018
@nhojpatrick
Copy link
Member Author

  • checkout the 1.3 tag
  • alter build so it added appropriate Automatic-Module-Name to each jar generated
  • optionally alter build so if any dependencies/plugins have updates, change the build to use them
  • publish those jar's/pom's to maven central

For more information about how to determine what module name to use please refer to this site http://blog.joda.org/2017/04/java-se-9-jpms-module-naming.html

@nhojpatrick
Copy link
Member Author

@sf105 got delayed but finally got time to get a 1.3.1 proposed release.

https://github.com/nhojpatrick/JavaHamcrest/tree/bugfix/204_1.3.x_jpms

All it does it add a Automatic-Module-Name into the MANIFEST.MF.

This is purely so those depending upon hamcrest don't need to use jar name generated module names. i.e. hamcrest-alpha-bravo-1.2.3.jar would become module name hamcrest.alpha.bravo

The current BUILDING.TXT talks about Java 1.5 and Ant 1.6. The oldest Java I've got access to is Java 1.7.0_80 and I downloaded Ant 1.6.5. But the tests with the following but I couldn't work out how to fix that quickly.

    [junit] Testcase: warning(junit.framework.TestSuite$1):	FAILED
    [junit] No tests found in org.hamcrest.core.CombinableTest
    [junit] junit.framework.AssertionFailedError: No tests found in org.hamcrest.core.CombinableTest

Don't merge this branch into master, I would create hamcrest-java-1.3.1 branch and tag, the do ant clean all -Dversion=1.3.1 then upload into maven central.

If you happy with the proposed module names and format, I'll start looking into sorting out similar for master branch.

@sf105
Copy link
Member

sf105 commented Sep 8, 2018

The building.txt is out of date as we moved to Groovy (see another issue about moving back to maven). I start working on updating it to a more recent version that actually support uploading to maven central, but lost steam in the process.

@sf105
Copy link
Member

sf105 commented Sep 23, 2018

I've made you a committer if you want to start work on this.

@xenoterracide
Copy link

found this looking at a problem which just turned out to be a wrong requires name... does this still need to be open? looks like this is all in Manifest.MF now.

It would be useful to have it in a real module-info.java for jlink if you're depending on java 11+ now (I think that it can also be put into a java9 directory but I don't know exactly how that needs to be set up, and whether it works with jlink.

note: it's org.hamcrest if anyone gets their IDE trying hamcrest.core

@tumbarumba
Copy link
Member

Thanks for the prompt @xenoterracide. This is a redundant issue, as it was addressed in a different issue and PR (see #185 and #186). I'm closing this issue now, although we may revisit this in future as we start to natively support more recent versions of Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hamcrest future Where do we want to take hamcrest?
Projects
None yet
Development

No branches or pull requests

4 participants