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

Manifest entry added to POM file for Modular compatibility #52

Merged
merged 10 commits into from
May 12, 2022
Merged

Manifest entry added to POM file for Modular compatibility #52

merged 10 commits into from
May 12, 2022

Conversation

EasyG0ing1
Copy link
Contributor

When building a modular project, there is a file that is central to the project that manages the inclusion and scope of dependencies in the project. There is a mandate that requires module names to follow the domain naming schema, so when developers use a library that cannot be identified by a proper name, it becomes difficult to use the library.

Adding Automatic-Module-Name to the manifest file solves this problem, by giving the library a proper name that can be used in a module-info.java file within a modular project.

I added the manifest entry to the maven-source-plugin.

I also updated all of the plugin versions in the POM file.

And I wasn't quite sure why you have this line under your maven-release-plugin

<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>

In my IDE it throws an error ... this is how I usually have my release plugin configured and then when I deploy, I get prompted for my gpg password, which has a long timeout set so that if I have to deploy again (because of some problem), I don't get prompted again.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>3.0.0-M5</version>
    <configuration>
        <localCheckout>true</localCheckout>
        <pushChanges>false</pushChanges>
        <mavenExecutorId>forked-path</mavenExecutorId>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>2.0.0-M1</version>
        </dependency>
    </dependencies>
</plugin>

@dustinkredmond
Copy link
Owner

The ${gpg.passphrase} takes the passphrase from the Maven config in the user's home directory. I'm not against having to prompt for this, but in the early stages of the project, this was simply a matter of convenience. Merging this PR.

@dustinkredmond dustinkredmond merged commit 5e35037 into dustinkredmond:main May 12, 2022
@EasyG0ing1 EasyG0ing1 deleted the manifest branch May 12, 2022 11:33
@EasyG0ing1
Copy link
Contributor Author

@dustinkredmond - I checked an old archive of Switcher, and saw that I had ${gpg-passphrase} in that POM file as well... But, I had not pushed any repository builds in many months, so with a different project, I went to the loss help site to re-learn how to set up a POM file for repository pushing and they implemented quite a few changes in the methods but I think most of those are related to the new servers they brought online - but apparently you're locked into whichever server you originally signed up with ... none of that, of course has anything to do with the gpg-passphrase, except that apparently they no longer include it in their example tutorials.

I also learned how to use Maven toolchains which are great for hard defining which JDK is used to compile your Maven goals, regardless of which JDK you currently have enabled for the project in your IDE ... it's been a nice thing to use for me at least as it keeps things consistent and predictable when compiling and distributing with Maven.

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

Successfully merging this pull request may close these issues.

None yet

2 participants