io.paradoxical:json-path-root

A base pom with deployment settings for paradoxical projects

License

License

Categories

Categories

JSON Data
GroupId

GroupId

io.paradoxical
ArtifactId

ArtifactId

json-path-root
Last Version

Last Version

2.3-experimental-1
Release Date

Release Date

Type

Type

pom
Description

Description

A base pom with deployment settings for paradoxical projects

Download json-path-root

How to add to project

<!-- https://jarcasting.com/artifacts/io.paradoxical/json-path-root/ -->
<dependency>
    <groupId>io.paradoxical</groupId>
    <artifactId>json-path-root</artifactId>
    <version>2.3-experimental-1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/io.paradoxical/json-path-root/
implementation 'io.paradoxical:json-path-root:2.3-experimental-1'
// https://jarcasting.com/artifacts/io.paradoxical/json-path-root/
implementation ("io.paradoxical:json-path-root:2.3-experimental-1")
'io.paradoxical:json-path-root:pom:2.3-experimental-1'
<dependency org="io.paradoxical" name="json-path-root" rev="2.3-experimental-1">
  <artifact name="json-path-root" type="pom" />
</dependency>
@Grapes(
@Grab(group='io.paradoxical', module='json-path-root', version='2.3-experimental-1')
)
libraryDependencies += "io.paradoxical" % "json-path-root" % "2.3-experimental-1"
[io.paradoxical/json-path-root "2.3-experimental-1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • json-path

Paradoxical deployments

Deployment submodule for paradoxical repos

Setting up a repo

Add a .deployment folder as a submodule refering to this repo

git submodule add -b master https://github.com/paradoxical-io/deployment.git .deployment

Configure your .travis.yml

Add the following to your travis configuration

git:
  submodules: false
before_install:
  # https://git-scm.com/docs/git-submodule#_options:
  # --remote
  # Instead of using the superproject’s recorded SHA-1 to update the submodule,
  # use the status of the submodule’s remote-tracking (branch.<name>.remote) branch (submodule.<name>.branch).
  # --recursive
  # https://github.com/travis-ci/travis-ci/issues/4099
  - git submodule update --init --remote --recursive
after_success:
- ./.deployment/deploy.sh

Run setup-travs.sh

Travis needs to be setup with all the secure variables we use for deployment. These values should be pre-shared

GPG_PASSWORD='<PASSWORD>' \
SONATYPE_USER='paradoxicalio' \
SONATYPE_PASSWORD='<PASSWORD>' \
GPG_PRIVATE_KEY_ENCRYPTION_KEY=<KEY> \
GPG_PRIVATE_KEY_ENCRYPTION_IV=<IV> \
./.deployment/setup-travis.sh

Generic publication

For language agonstic deployment we expose a hook into the root folder into a file called deploy.sh.

This file should have the following methods defined:

function snapshot() {
   # what to do on snapshots
}

function release() {
   # what to do on release. The $REVISION env var is available
}

You should point your GPG keyring configurations to:

pgpPublicRing := new File(".deployment//gpg/paradoxical-io.pubgpg")
pgpSecretRing := new File(".deployment//gpg/paradoxical-io-private.gpg")

As an example from a scala build project.

Maven Support

Configure your pom.xml

Setup the version

    <version>1.0${revision}</version>

Option 1: Using the parent pom

As of deployment 1.0 we now support a parent pom option for configuring your projects. This makes setting up a new deployment project super easy.

Add the parent pom

<parent>
    <groupId>io.paradoxical</groupId>
    <artifactId>deployment-base-pom</artifactId>
    <version>1.0</version>
</parent>

Make sure you override the parents default settings

The parent POM sets up some default settings required to publish to maven central, however your project will likely have its own values

Configure Project details

Make sure you define your own values for:

<name>Paradoxical deployment base pom</name>
<description>A base pom with deployment settings for paradoxical projects</description>
<url>https://github.com/paradoxical-io</url>

Configure your source control details (SCM)

<scm>
    <url>http://github.com/paradoxical-io/deployment</url>
    <connection>scm:git:[email protected]:paradoxical-io/deployment.git</connection>
    <developerConnection>scm:git:[email protected]:paradoxical-io/deployment.git</developerConnection>
</scm>

Option 2: Manual pom configuration

If you cannot/choose not to go the route of parent pom then you have some manual steps to configure...

Add a revision property default

<revision>-SNAPSHOT</revision>

Ensure you have the repository defined

<distributionManagement>
    <snapshotRepository>
        <id>ossrh</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
        <id>ossrh</id>
        <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
</distributionManagement>

Ensure you have the nexus plugin configured

<plugin>
    <groupId>org.sonatype.plugins</groupId>
    <artifactId>nexus-staging-maven-plugin</artifactId>
    <version>1.6.6</version>
    <extensions>true</extensions>
    <configuration>
        <serverId>ossrh</serverId>
        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
        <autoReleaseAfterClose>true</autoReleaseAfterClose>
    </configuration>
</plugin>

Add a release profile

<profiles>
    <profile>
        <id>release</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9.1</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <defaultKeyring>false</defaultKeyring>
                        <publicKeyring>${project.basedir}/.deployment/gpg/paradoxical-io.pubgpg</publicKeyring>
                        <secretKeyring>${project.basedir}/.deployment/gpg/paradoxical-io-private.gpg</secretKeyring>
                        <keyname>476C78DF</keyname>
                        <passphraseServerId>gpg-key</passphraseServerId>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

Enabling maven caching

If you're adding this to a library then be sure to enable maven caching to improve build speeds

sudo: false
cache:
  directories:
  - $HOME/.m2

More guidance

io.paradoxical

Paradoxical Devs

Libraries and dockerized applications. Pull requests welcome!

Versions

Version
2.3-experimental-1
2.3-experimental