Code Monkey home page Code Monkey logo

oss-parent's Introduction

Introduction

This project contains shared parent POM for projects in FasterXML repository.

Usage

When starting a new project, please use the already configured _parent pom_ to avoid replicate the same meta inf in every project:

<parent>
  <groupId>com.fasterxml</groupId>
  <artifactId>oss-parent</artifactId>
  <version>49</version>
</parent>

More detailed Usage

Next sections detail release flow for projects that use the shared parent POM. You usually only need to read these once; and only if you handle releasing of new versions

Prerequisites

  • Install/Configure GPG - The artifacts that are deployed to the central maven repositories need to be signed. To do this you will need to have a public and private keypair. There is a very good guide that will walk you though this.
  • Install Maven 3.3.0 or higher.

Configuration

Maven

Maven can encrypt your servers passwords. We highly recommend that you follow this guide to set your master password and use it to encrypt your Sonatype password in the next section.

Sonatype

Using the instructions from the previous step encrypt your Sonatype password and add the following servers to your ~/.m2/settings.xml file. You may already have other servers in this file. If not just create the file.

<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <servers>
    <server>
      <id>sonatype-nexus-snapshots</id>
      <username>cowtowncoder</username>
      <password>{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+9EF1iFQyJQ=}</password>
    </server>

    <server>
      <id>sonatype-nexus-staging</id>
      <username>cowtowncoder</username>
      <password>{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+9EF1iFQyJQ=}</password>
    </server>
  </servers>
</settings>

Release

The release plugin for maven is already configured in the parent pom file so all you need to do is execute the following two steps to complete the release. The first step will create the release tag and update the pom with the correct release and snapshot versions. The second step will sign and deploy the artifacts to the Sonatype open source repository. This repository is synced every hour to the central Maven repositories. If you don't supply the optional gpg.passphrase then you will be prompted for it.

  • Prepare the release mvn release:prepare
  • Perform mvn release:perform -Dgpg.passphrase=thephrase

or just

mvn release:perform

and type the gpg passphrase when prompted

Now you can checkout the new release ( or just use the one left over from the release in target/checkout) and issue the following to build the artifacts for the site.

mvn package

Managing Sonatype's Nexus

The parent pom is configured to work with Sonatype's Nexus to simplify the Staging Repository close and promote operation, without logging in on Nexus using the browser. First of all, add in the ~/.m2/settings.xml the following snippet:

<pluginGroups>
  <pluginGroup>org.sonatype.plugins</pluginGroup>
</pluginGroups>

then in the project dir you can use the nexus goals described on the plugin page

oss-parent's People

Contributors

asomov avatar bhamiltoncx avatar cowtowncoder avatar dependabot[bot] avatar dinomite avatar hboutemy avatar simonetripodi avatar splatch avatar sullis avatar tatu-at-datastax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

oss-parent's Issues

JDK 15 'maven-bundle-plugin' throws ConcurrentModificationException - Upgrade to 5.1.1

Exception building Jackson-databind or any other project that uses maven-bundle-plugin in JDK15 ea:

openjdk version "15-ea" 2020-09-15
OpenJDK Runtime Environment (build 15-ea+32-1525)

[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:4.2.1:bundle (default-bundle) on project jackson-databind: Internal error in maven-bundle-plugin: ConcurrentModificationException -> [Help 1]

[INFO] --- maven-bundle-plugin:4.2.1:bundle (default-bundle) @ jackson-databind ---
[ERROR] An internal error occurred
java.util.ConcurrentModificationException
    at java.util.TreeMap.callMappingFunctionWithCheck (TreeMap.java:742)
    at java.util.TreeMap.computeIfAbsent (TreeMap.java:596)
    at aQute.bnd.osgi.Jar.putResource (Jar.java:288)
    at aQute.bnd.osgi.Jar$1.visitFile (Jar.java:202)
    at aQute.bnd.osgi.Jar$1.visitFile (Jar.java:177)
    at java.nio.file.Files.walkFileTree (Files.java:2804)
    at aQute.bnd.osgi.Jar.buildFromDirectory (Jar.java:176)
    at aQute.bnd.osgi.Jar.<init> (Jar.java:119)
    at aQute.bnd.osgi.Jar.<init> (Jar.java:172)
    at org.apache.felix.bundleplugin.BundlePlugin.getOSGiBuilder (BundlePlugin.java:604)
    at org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle (BundlePlugin.java:936)

Issue was originally found in bnd-maven-plugin, see bndtools/bnd#3903

Fix was applied to biz.aQute.bndlib that both bnd-maven-plugin and maven-bundle-plugin depends on.

To solve this issue, please upgrade maven-bundle-plugin to 5.1.1

The parent pom still lists the LGPL license

The jackson documentation says that the library is now Apache License 2.0 only. But the parent POM license section still lists both Apache and LGPL. Since licenses are inherited by maven submodules, jackson reports itself as dual-licensed even though it isn't anymore.

Update javadoc plugin to 3.0.0-M1 to Java-9 compatible version

The maven-javadoc-plugin needs to be updated to 3.0.0-M1 to build under Java-9. It was working for early Java-9 builds but broke when the Java version changed from "9-ea" to "9" in build 175. Similar underlying reason to the maven-enforcer-plugin that has already been updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.