Java

Java is life

java, gradle

4 posts in this saga
Updated at Nov 14 2019 at 08:45 UTC
  • Building Java 9 and 10 Modules with Gradle

    1 of 4 |
    Updated at

    Introduction

    Java 9 introduced the Java Platform Module System a.k.a. JMS, JPMS and Project Jigsaw. With JMS, classloading and visibility are much different than before with modules being the way to import and export classes and resources. There are articles out that that explain the changes. Mark Reinhold made a post about JMS. What are the benefits? Segmentation, smaller build sizes. Let's talk bout Gradle.

    Gradle is a step above Maven as a build system. With incremental parallel builds, it is super quick...

  • C5Store: The Best Runtime Configuration Store for Applications

    2 of 4 |
    Updated at

    Yes, another application configuration library, but I assure you this is way better than any one of them out there. This is the Provider section of the Config Triad (Provision, Management, Provider).

    C5Store is a comprehensive answer to the "what config library should I use for dynamic runtime configuration" question. Library is available here: https://github.com/normano/c5store

    Why?

    I've scoured around for configuration libraries in multiple languages and find them to be lacking in how they are defined, integ...

  • Fixing Gradle Javadoc task failure when using Java Modules

    3 of 4 |
    Updated at

    You may be familiar with this shitty error probably using Gradle 6.7:

    Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.List (java.lang.String and java.util.List are in module java.base of loader 'bootstrap')

    You likely have this in your afterEvaluate block:

    javadoc {
      inputs.property("moduleName", moduleName)
      doFirst {
        options.addStringOption('-module-path', classpath.asPath)
      }
    }

    You can fix it with:

    javadoc {
    inputs.property("moduleName", moduleName)
    o...
  • How to Cheaply Self Host your Maven/Gradle artifacts without Nexus or Artifactory

    4 of 4 |
    Updated at

    Disclaimer: This is more proof of concept than anything else.

    I was setting up Sonatype's Nexus yesterday and was very annoyed at the setup ceremony associated with it. I got it working with SystemD's dynamic user, but the way it needs to be setup is insane to me. Why is it so expensive to set up?

    I set the DataDir to /var/lib/private/...etc... the state directory for a Dynamic User. Karaf has some java -D options, I tried to move the config and Nexus would not start. I'd get errors like status=254/n/a or 255...