Skip to content

Commit

Permalink
Update README and pom.xml for CRaC
Browse files Browse the repository at this point in the history
  • Loading branch information
rvansa committed Sep 5, 2024
1 parent 3cde889 commit 73871fc
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 14 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Fork information

This is a forked version of the Agroal project intended to be used before the support for CRaC lands in the official version. The artifact should be published on these Maven coordinates:

<dependency>
<groupId>io.github.crac.io.agroal</groupId>
<artifactId>agroal-pool</artifactId>
<version>[version].CRAC.[number]</version>
</dependency>

where [version] matches a released Agroal version and [number] is an increasing numeric identifier representing version of CRaC-related updates.

# Agroal

![agroal-logo](https://design.jboss.org/agroal/logo/final/PNG/agroal_logo_horizontal_default_600px.png)

[![Agroal CI](https://github.com/agroal/agroal/actions/workflows/maven-action.yml/badge.svg)](https://github.com/agroal/agroal/actions/workflows/maven-action.yml)
Expand All @@ -10,4 +24,4 @@ This project is licensed according to the terms of the [Apache License 2.0](http

## Releases

Artifacts are released through the [JBoss Public Repository](https://repository.jboss.org/nexus/content/groups/public/io/agroal/) and synced to maven central.
Artifacts are released through the [JBoss Public Repository](https://repository.jboss.org/nexus/content/groups/public/io/agroal/) and synced to maven central.
4 changes: 2 additions & 2 deletions agroal-pool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.agroal</groupId>
<groupId>io.github.crac.io.agroal</groupId>
<artifactId>agroal-parent</artifactId>
<version>2.6-SNAPSHOT</version>
</parent>
Expand All @@ -13,7 +13,7 @@
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-api</artifactId>
<version>${project.version}</version>
<version>${forked.version}</version>
</dependency>
</dependencies>
<build>
Expand Down
28 changes: 28 additions & 0 deletions enhance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
set -e
VERSION=$1
UPDATE=${2:-0}
MINOR=${3:-master}

if [ -z "$VERSION" ]; then
echo "No version set"
exit 1
fi

rm .git/hooks/post-commit || true

if [ -z "$ENHANCE_CONTINUE" ]; then
git -c advice.detachedHead=false checkout $VERSION
if ! git cherry-pick ${MINOR}..${MINOR}_crac; then
NCOMMITS=$(git log --format=oneline ${MINOR}..${MINOR}_crac | wc -l)
echo '[ $(git log --format=oneline '$VERSION'..HEAD | wc -l) = '$NCOMMITS' ] && ENHANCE_CONTINUE=true '$(pwd)'/enhance.sh '$VERSION $UPDATE $MINOR > .git/hooks/post-commit
chmod a+x .git/hooks/post-commit
exit 1
fi
fi
mvn versions:set -DnewVersion=${VERSION}.CRAC.${UPDATE} -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=forked.version -DnewVersion=$VERSION -DgenerateBackupPoms=false
git commit -a -m "CRaC-enhanced release ${VERSION}.CRAC.${UPDATE}"
git tag ${VERSION}.CRAC.${UPDATE}
set +x
echo "Now type:"
echo -e "\tgit push crac ${VERSION}.CRAC.${UPDATE}"
40 changes: 29 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>jboss-parent</artifactId>
<version>46</version>
</parent>
<groupId>io.agroal</groupId>
<groupId>io.github.crac.io.agroal</groupId>
<artifactId>agroal-parent</artifactId>
<version>2.6-SNAPSHOT</version>
<packaging>pom</packaging>
Expand All @@ -19,25 +19,25 @@
<url>https://issues.jboss.org/projects/AG</url>
</issueManagement>
<modules>
<module>agroal-api</module>
<module>agroal-hikari</module>
<module>agroal-narayana</module>
<!-- <module>agroal-api</module>-->
<!-- <module>agroal-hikari</module>-->
<!-- <module>agroal-narayana</module>-->
<module>agroal-pool</module>
<module>agroal-spring-boot-starter</module>
<module>agroal-test</module>
<!-- <module>agroal-spring-boot-starter</module>-->
<!-- <module>agroal-test</module>-->
</modules>
<licenses>
<license>
<name>Apache License 2.0</name>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/agroal/agroal.git</connection>
<developerConnection>scm:git:ssh://[email protected]/agroal/agroal.git</developerConnection>
<url>https://github.com/agroal/agroal</url>
<tag>2.4</tag>
<connection>scm:git:git://github.com/CRaC/agroal.git</connection>
<developerConnection>scm:git:ssh://[email protected]/CRaC/agroal.git</developerConnection>
<url>https://github.com/CRaC/agroal</url>
<tag>${project.version}</tag>
</scm>
<developers>
<developer>
Expand All @@ -46,7 +46,14 @@
<organization>Red Hat</organization>
</developer>
</developers>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<forked.version>2.6-SNAPSHOT</forked.version>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.release>11</maven.compiler.release>
Expand Down Expand Up @@ -131,6 +138,17 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 73871fc

Please sign in to comment.