Skip to content

Commit

Permalink
Feature/dependencies update (#2)
Browse files Browse the repository at this point in the history
* Update dependencies versions

* Prepare github action to deploy to OSS

* Prepare release
  • Loading branch information
nilsaellen authored Jan 27, 2023
1 parent 3372ed0 commit 199933c
Show file tree
Hide file tree
Showing 54 changed files with 225 additions and 240 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish release to the Maven Central Repository

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up then Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Publish to OSS with maven
run: mvn --batch-mode clean deploy -Dgpg.passphrase=${{ secrets.CI_GPG_PASSPHRASE }} -Psonatype-oss-release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_OPTS: --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED
165 changes: 126 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,89 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ch.galinet.xml</groupId>
<artifactId>xml-merge</artifactId>
<version>0.2-SNAPSHOT</version>
<version>0.2</version>
<packaging>jar</packaging>

<name>EL4J module XmlMerge common</name>
<description>
Module XmlMerge, common parts of the EL4J framework.
</description>
<description>Module XmlMerge, common parts of the EL4J framework.</description>
<url>https://github.com/nilsaellen/xml-merge</url>

<developers>
<developer>
<name>Nils Aellen</name>
<email>nils@aellen.org</email>
</developer>
</developers>

<licenses>
<license>
<name>GNU General Lesser Public License (LGPL) version 2.1</name>
<url>https://www.gnu.org/licenses/lgpl-2.1.html</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/nilsaellen/xml-merge.git</connection>
<developerConnection>scm:git:ssh://github.com:nilsaellen/xml-merge.git</developerConnection>
<url>http://github.com/nilsaellen/xml-merge/tree/master</url>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jaxen.version>2.0.0</jaxen.version>
<jdom2.version>2.0.6.1</jdom2.version>
<junit-jupiter-engine.version>5.9.2</junit-jupiter-engine.version>
<maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
<slf4j.version>2.0.6</slf4j.version>
<xsd-hierarchy.version>0.2</xsd-hierarchy.version>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>artifactory-releases</id>
<name>artifactory.pnet.ch-releases</name>
<url>http://artifactory.pnet.ch/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>artifactory-snapshots</id>
<name>artifactory.pnet.ch-snapshots</name>
<url>http://artifactory.pnet.ch/artifactory/libs-snapshot-local</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<dependencies>
<!-- Third party tools -->
<dependency>
<groupId>com.wutka</groupId>
<artifactId>dtdparser</artifactId>
<version>1.21</version>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>${jdom2.version}</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.2.0-atlassian-2</version>
<version>${jaxen.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>RELEASE</version>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>RELEASE</version>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter-engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.galinet.xml</groupId>
<artifactId>xsd-hierarchy</artifactId>
<version>0.1</version>
<version>${xsd-hierarchy.version}</version>
</dependency>
</dependencies>
<licenses>
<license>
<name>GNU General Lesser Public License (LGPL) version 2.1</name>
<url>https://www.gnu.org/licenses/lgpl-2.1.html</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>

<profiles>
<profile>
<id>sonatype-oss-release</id>
<build>
<plugins>

<!-- Generate source attachment -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Generate javadoc attachment -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Sign the artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<homedir>${session.executionRootDirectory}</homedir>
<keyname>eb11bc74</keyname>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Binary file added pubring.gpg
Binary file not shown.
Binary file added secring.gpg
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
/**
* Base class for all exceptions thrown by XmlMerge.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/ch/galinet/xml/xmlmerge/Action.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
*/
package ch.galinet.xml.xmlmerge;

import org.jdom.Element;
import org.jdom2.Element;

/**
* Operation on two nodes creating a third node.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
/**
* Thrown when something wrong happens in the XmlMerge configuration.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/ch/galinet/xml/xmlmerge/Configurer.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
/**
* Applies a configuration to an XmlMerge instance.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/ch/galinet/xml/xmlmerge/DocumentException.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
*/
package ch.galinet.xml.xmlmerge;

import org.jdom.Document;
import org.jdom2.Document;

/**
* Thrown when something is wrong with a source or output document.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/ch/galinet/xml/xmlmerge/ElementException.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
*/
package ch.galinet.xml.xmlmerge;

import org.jdom.Element;
import org.jdom2.Element;

/**
* Thrown when there is something wrong with an element.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/ch/galinet/xml/xmlmerge/Mapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
*/
package ch.galinet.xml.xmlmerge;

import org.jdom.Element;
import org.jdom2.Element;

/**
* Transforms an element to another element by changing some nested content or
* attributes.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/ch/galinet/xml/xmlmerge/MatchException.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
*/
package ch.galinet.xml.xmlmerge;

import org.jdom.Element;
import org.jdom2.Element;

/**
* Thrown when something is wrong in the matching process.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/ch/galinet/xml/xmlmerge/Matcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
*/
package ch.galinet.xml.xmlmerge;

import org.jdom.Element;
import org.jdom2.Element;

/**
* Compares two elements to know if they correspond for merging.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/ch/galinet/xml/xmlmerge/MergeAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
* actions to apply to children elements are configurable through this
* interface.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/ch/galinet/xml/xmlmerge/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
* Abstraction for matchers, mappers or actions two be creatable by the same
* factory classes.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/ch/galinet/xml/xmlmerge/OperationFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
*/
package ch.galinet.xml.xmlmerge;

import org.jdom.Element;
import org.jdom2.Element;

/**
* Creates operation (action, mapper and matcher) instances corresponding to a
* pair of elements from the original and patch DOMs.
*
* @svnLink $Revision$;$Date$;$Author$;$URL$
*
* @author Laurent Bovet (LBO)
* @author Alex Mathey (AMA)
*/
Expand Down
Loading

0 comments on commit 199933c

Please sign in to comment.