diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
new file mode 100644
index 00000000..63ca7bc8
--- /dev/null
+++ b/.github/dependabot.yaml
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+version: 2
+updates:
+ - package-ecosystem: "maven" # See documentation for possible values
+ directory: "/" # Location of package manifests
+ schedule:
+ interval: "weekly"
+
+ - package-ecosystem: "github-actions" # Also update Github actions
+ directory: "/"
+ schedule:
+ # Check for updates to GitHub Actions every week
+ interval: "weekly"
diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml
new file mode 100644
index 00000000..0f950c11
--- /dev/null
+++ b/.github/workflows/maven-build.yml
@@ -0,0 +1,67 @@
+#
+# Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: build on maven
+
+on:
+ watch:
+ types: [started]
+ pull_request:
+ types: [opened, reopened, edited, synchronize, ready_for_review]
+ push:
+ branches:
+ - main
+ - master
+
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: Build with maven
+ runs-on: ubuntu-latest
+ env:
+ MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Set up JDK 11 for x64
+ uses: actions/setup-java@v5
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ architecture: x64
+
+ - uses: s4u/maven-settings-action@v4.0.0
+ with:
+ sonatypeSnapshots: true
+
+ - name: Build the Maven verify phase
+ run: mvn -B -V clean verify -Prun-its -Pci
+
+
+ - uses: s4u/maven-settings-action@v4.0.0
+ if: ${{ github.event_name == 'push' }}
+ with:
+ servers: |
+ [{
+ "id": "central-portal-snapshots",
+ "username": "${{ secrets.SONATYPE_BOT_USERNAME }}",
+ "password": "${{ secrets.SONATYPE_BOT_TOKEN }}"
+ }]
+
+ - name: Deploy the artifact
+ if: ${{ github.event_name == 'push' }}
+ run: mvn help:effective-settings -B -V clean deploy -e
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..5db1c859
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+# build
+target
+
+# eclipse
+.classpath
+.project
+.settings
+
+# idea
+.idea
+*.iml
+*.iws
+*.ipr
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..735c2031
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,4 @@
+language: java
+install: '/bin/true'
+script: '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && mvn deploy -s ./travis-settings.xml -V -Prun-its -q -B -e|| mvn install -s ./travis-settings.xml -V -Prun-its -q -B -e'
+
diff --git a/Jenkinsfile.bak b/Jenkinsfile.bak
new file mode 100644
index 00000000..61c4af3d
--- /dev/null
+++ b/Jenkinsfile.bak
@@ -0,0 +1,25 @@
+pipeline {
+ agent { label 'maven-36-jdk11' }
+ stages {
+ stage('Prepare') {
+ steps {
+ sh 'printenv'
+ }
+ }
+ stage('Build') {
+ when {
+ expression { env.CHANGE_ID != null } // Pull request
+ }
+ steps {
+ sh 'mvn -B -V clean verify -Prun-its -Pci'
+ }
+ }
+ stage('Deploy') {
+ when { branch 'master' }
+ steps {
+ echo "Deploy"
+ sh 'mvn help:effective-settings -B -V clean deploy -e'
+ }
+ }
+ }
+}
diff --git a/LICENSE.txt b/LICENSE.txt
index 82ad83d5..8f49face 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,3 +1,19 @@
+====
+ Copyright (C) 2012 Red Hat, Inc. (jdcasey@commonjava.org)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+====
+
#-------------------------------------------------------------------------------
# Copyright (c) 2014 Red Hat, Inc..
# All rights reserved. This program and the accompanying materials
diff --git a/bindings/jackson-identities/pom.xml b/bindings/jackson-identities/pom.xml
new file mode 100644
index 00000000..721b6af3
--- /dev/null
+++ b/bindings/jackson-identities/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+ 4.0.0
+
+
+ org.commonjava.atlas
+ atlas-bindings-parent
+ 1.2.3-SNAPSHOT
+
+
+ atlas-bindings-jackson-identities
+
+ Atlas :: Maven Project-Graph :: Jackson Identities API Bindings
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
+
+
diff --git a/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefDeserializer.java b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefDeserializer.java
new file mode 100644
index 00000000..206a8965
--- /dev/null
+++ b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefDeserializer.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.commonjava.atlas.maven.ident.jackson;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import org.commonjava.atlas.maven.ident.ref.ProjectRef;
+
+import java.io.IOException;
+
+/**
+ * Created by jdcasey on 8/26/15.
+ */
+public class ProjectRefDeserializer
+ extends StdDeserializer
+{
+ private static final long serialVersionUID = 1L;
+
+ private final Class refCls;
+
+ public ProjectRefDeserializer( final Class refCls )
+ {
+ super( refCls );
+ this.refCls = refCls;
+ }
+
+ @Override
+ public T deserialize( final JsonParser jp, final DeserializationContext ctxt )
+ throws IOException, JsonProcessingException
+ {
+ return SerializerIdentityUtils.parse( jp.getText(), refCls );
+ }
+}
diff --git a/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefKeyDeserializer.java b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefKeyDeserializer.java
new file mode 100644
index 00000000..f9b78230
--- /dev/null
+++ b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefKeyDeserializer.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.commonjava.atlas.maven.ident.jackson;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.KeyDeserializer;
+import org.commonjava.atlas.maven.ident.ref.ProjectRef;
+
+import java.io.IOException;
+
+/**
+ * Created by jdcasey on 8/26/15.
+ */
+public class ProjectRefKeyDeserializer
+ extends KeyDeserializer
+{
+ private static final long serialVersionUID = 1L;
+
+ private final Class refCls;
+
+ public ProjectRefKeyDeserializer( final Class type )
+ {
+ this.refCls = type;
+ }
+
+ @Override
+ public Object deserializeKey( String key, DeserializationContext ctxt )
+ throws IOException, JsonProcessingException
+ {
+ return SerializerIdentityUtils.parse( key, refCls );
+ }
+}
diff --git a/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefSerializer.java b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefSerializer.java
new file mode 100644
index 00000000..048d80bf
--- /dev/null
+++ b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectRefSerializer.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.commonjava.atlas.maven.ident.jackson;
+
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import org.commonjava.atlas.maven.ident.ref.ProjectRef;
+
+import java.io.IOException;
+
+/**
+ * Created by jdcasey on 8/26/15.
+ */
+public final class ProjectRefSerializer
+ extends StdSerializer
+{
+ private boolean keySer;
+
+ public ProjectRefSerializer( final Class refCls, boolean keySer )
+ {
+ super( refCls );
+ this.keySer = keySer;
+ }
+
+ @Override
+ public void serialize( final T src, final JsonGenerator generator, final SerializerProvider provider )
+ throws IOException, JsonGenerationException
+ {
+ if ( keySer )
+ {
+ generator.writeFieldName( src.toString() );
+ }
+ else
+ {
+ generator.writeString( src.toString() );
+ }
+ }
+}
diff --git a/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectVersionRefSerializerModule.java b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectVersionRefSerializerModule.java
new file mode 100644
index 00000000..9df68d85
--- /dev/null
+++ b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/ProjectVersionRefSerializerModule.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.commonjava.atlas.maven.ident.jackson;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.commonjava.atlas.maven.ident.ref.ArtifactRef;
+import org.commonjava.atlas.maven.ident.ref.ProjectRef;
+import org.commonjava.atlas.maven.ident.ref.ProjectVersionRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleArtifactRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleProjectRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleProjectVersionRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleVersionlessArtifactRef;
+import org.commonjava.atlas.maven.ident.ref.VersionlessArtifactRef;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.module.SimpleModule;
+
+public class ProjectVersionRefSerializerModule
+ extends SimpleModule
+{
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Set> REF_CLASSES;
+
+ static
+ {
+ REF_CLASSES = Collections.unmodifiableSet( new HashSet>(
+ Arrays.asList( ProjectRef.class, ProjectVersionRef.class, ArtifactRef.class,
+ VersionlessArtifactRef.class, SimpleProjectRef.class, SimpleProjectVersionRef.class,
+ SimpleArtifactRef.class, SimpleVersionlessArtifactRef.class ) ) );
+ }
+
+ public static final ProjectVersionRefSerializerModule INSTANCE = new ProjectVersionRefSerializerModule();
+
+ public ProjectVersionRefSerializerModule()
+ {
+ super( "ProjectRef (with variants) Serializer" );
+
+ for ( Class extends ProjectRef> cls: REF_CLASSES )
+ {
+ register( cls );
+ }
+ }
+
+ private void register( Class cls )
+ {
+ Logger logger = LoggerFactory.getLogger( getClass() );
+ logger.debug( "Registering {} serializers/deserialers", cls.getSimpleName() );
+
+ addSerializer( cls, new ProjectRefSerializer( cls, false ) );
+ addKeySerializer( cls, new ProjectRefSerializer( cls, true ) );
+
+ addDeserializer( cls, new ProjectRefDeserializer( cls ) );
+ addKeyDeserializer( cls, new ProjectRefKeyDeserializer( cls ) );
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return getClass().getSimpleName().hashCode() + 17;
+ }
+
+ @Override
+ public boolean equals( final Object other )
+ {
+ return getClass().equals( other.getClass() );
+ }
+
+}
diff --git a/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/SerializerIdentityUtils.java b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/SerializerIdentityUtils.java
new file mode 100644
index 00000000..b7242bc6
--- /dev/null
+++ b/bindings/jackson-identities/src/main/java/org/commonjava/atlas/maven/ident/jackson/SerializerIdentityUtils.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.commonjava.atlas.maven.ident.jackson;
+
+import org.commonjava.atlas.maven.ident.ref.ArtifactRef;
+import org.commonjava.atlas.maven.ident.ref.ProjectRef;
+import org.commonjava.atlas.maven.ident.ref.ProjectVersionRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleArtifactRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleProjectRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleProjectVersionRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleVersionlessArtifactRef;
+import org.commonjava.atlas.maven.ident.ref.VersionlessArtifactRef;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+/**
+ * Created by jdcasey on 8/26/15.
+ */
+public final class SerializerIdentityUtils
+{
+ private SerializerIdentityUtils(){}
+
+ public static T parse( final String value, final Class type )
+ throws IOException
+ {
+ Class> realType = null;
+ if ( ArtifactRef.class.isAssignableFrom( type ) )
+ {
+ realType = SimpleArtifactRef.class;
+ }
+ else if ( VersionlessArtifactRef.class.isAssignableFrom( type ) )
+ {
+ realType = SimpleVersionlessArtifactRef.class;
+ }
+ else if ( ProjectVersionRef.class.isAssignableFrom( type ) )
+ {
+ realType = SimpleProjectVersionRef.class;
+ }
+ else if ( ProjectRef.class.isAssignableFrom( type ) )
+ {
+ realType = SimpleProjectRef.class;
+ }
+ else
+ {
+ throw new IOException( "Cannot find acceptable deserialization target class to parse: " + type.getSimpleName() );
+ }
+
+ try
+ {
+ final Method parseMethod = realType.getMethod( "parse", String.class );
+ return type.cast( parseMethod.invoke( null, value ) );
+ }
+ catch ( final NoSuchMethodException e )
+ {
+ throw new IOException( "Failed to lookup/invoke parse() method on " + type.getSimpleName(), e );
+ }
+ catch ( final IllegalAccessException e )
+ {
+ throw new IOException( "Failed to lookup/invoke parse() method on " + type.getSimpleName(), e );
+ }
+ catch ( final InvocationTargetException e )
+ {
+ throw new IOException( "Failed to lookup/invoke parse() method on " + type.getSimpleName(), e );
+ }
+ }
+
+}
diff --git a/bindings/jackson-identities/src/test/java/org/commonjava/atlas/maven/ident/jackson/ProjectVersionRefSerializerModuleTest.java b/bindings/jackson-identities/src/test/java/org/commonjava/atlas/maven/ident/jackson/ProjectVersionRefSerializerModuleTest.java
new file mode 100644
index 00000000..fc29e031
--- /dev/null
+++ b/bindings/jackson-identities/src/test/java/org/commonjava/atlas/maven/ident/jackson/ProjectVersionRefSerializerModuleTest.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (C) 2012-2022 Red Hat, Inc. (nos-devel@redhat.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.commonjava.atlas.maven.ident.jackson;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.commonjava.atlas.maven.ident.ref.ProjectRef;
+import org.commonjava.atlas.maven.ident.ref.SimpleProjectRef;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class ProjectVersionRefSerializerModuleTest
+{
+
+ private ObjectMapper mapper;
+
+ @Before
+ public void setup()
+ {
+ mapper = new ObjectMapper();
+ mapper.registerModule( new ProjectVersionRefSerializerModule() );
+ }
+
+ @Test
+ public void projectRefRoundTrip()
+ throws Exception
+ {
+ final ProjectRef pr = new SimpleProjectRef( "org.foo", "bar" );
+ final String json = mapper.writeValueAsString( pr );
+
+ final ProjectRef result = mapper.readValue( json, ProjectRef.class );
+
+ assertThat( result, equalTo( pr ) );
+ }
+
+ @Test
+ public void mapWithProjectRefKeyRoundTrip()
+ throws Exception
+ {
+ final ProjectRef pr = new SimpleProjectRef( "org.foo", "bar" );
+ final String value = "this is the value";
+
+ final Map map = new HashMap();
+ map.put( pr, value );
+
+ final String json = mapper.writeValueAsString( map );
+
+ final Map result = mapper.readValue( json, new TypeReference