diff --git a/.github/workflows/main-5.3.yml b/.github/workflows/main-5.3.yml deleted file mode 100644 index 2a845d86..00000000 --- a/.github/workflows/main-5.3.yml +++ /dev/null @@ -1,60 +0,0 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant - -name: Java CI 5.3 - -on: [push, pull_request,workflow_dispatch] - -jobs: - build: - - runs-on: ubuntu-latest - env: - luceeVersion: light-5.3.10.120 - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'adopt' - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2 - key: lucee-script-runner-maven-cache - - name: Cache Lucee files - uses: actions/cache@v3 - with: - path: _actions/lucee/script-runner/main/lucee-download-cache - key: lucee-downloads-${{ env.luceeVersion }} - restore-keys: | - lucee-downloads - - name: Build with Ant - run: ant -noinput -verbose -buildfile build.xml - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: hibernate-lex - path: dist/*.lex - - name: Checkout Lucee - uses: actions/checkout@v3 - with: - repository: lucee/lucee - path: lucee - - name: Run Lucee Test Suite (testLabels="orm") - uses: lucee/script-runner@main - with: - webroot: ${{ github.workspace }}/lucee/test - execute: /bootstrap-tests.cfm - luceeVersion: ${{ env.luceeVersion }} - extensionDir: ${{ github.workspace }}/dist - env: - testLabels: orm - testAdditional: ${{ github.workspace }}/tests - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - if: always() - with: - files: ${{ github.workspace }}/lucee/test/reports/junit-test-results.xml - check_name: "Test Results" diff --git a/.github/workflows/main-5.4.yml b/.github/workflows/main-5.4.yml deleted file mode 100644 index a6ec9bb9..00000000 --- a/.github/workflows/main-5.4.yml +++ /dev/null @@ -1,75 +0,0 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant - -name: Java CI - Lucee 5.4 - -on: [push, pull_request,workflow_dispatch] - -jobs: - build: - - runs-on: ubuntu-latest - env: - luceeVersionQuery: 5.4/all/light - - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'adopt' - - name: Set up MySQL (local) - run: | - sudo systemctl start mysql - mysql -e 'CREATE DATABASE lucee' -uroot -proot - mysql -e 'CREATE USER "lucee"@"localhost" IDENTIFIED WITH mysql_native_password BY "lucee";' -uroot -proot - mysql -e 'GRANT ALL PRIVILEGES ON lucee.* TO "lucee"@"localhost"' -uroot -proot - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2 - key: lucee-script-runner-maven-cache - enableCrossOsArchive: true - - name: Cache Lucee files - uses: actions/cache@v3 - with: - path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache - key: lucee-downloads - enableCrossOsArchive: true - - name: Build with Ant - run: ant -noinput -verbose -buildfile build.xml - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: hibernate-lex - path: dist/*.lex - - name: Checkout Lucee - uses: actions/checkout@v3 - with: - repository: lucee/lucee - path: lucee - - name: Run Lucee Test Suite (testFilter="orm") - uses: lucee/script-runner@main - with: - webroot: ${{ github.workspace }}/lucee/test - execute: /bootstrap-tests.cfm - luceeVersion: ${{ env.luceeVersion }} - luceeVersionQuery: ${{ env.luceeVersionQuery }} - extensionDir: ${{ github.workspace }}/dist - extensions: - env: - testLabels: orm - testAdditional: ${{ github.workspace }}/tests - MYSQL_SERVER: localhost - MYSQL_USERNAME: lucee - MYSQL_PASSWORD: lucee - MYSQL_PORT: 3306 - MYSQL_DATABASE: lucee - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - if: always() - with: - files: ${{ github.workspace }}/lucee/test/reports/junit-test-results.xml - check_name: "Test Results" - diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c1fb893..35bc9089 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,61 +1,156 @@ -# This workflow will build a Java project with Ant -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant +name: Java CI Combined -name: Java CI - -on: [push, pull_request,workflow_dispatch] +on: [push, pull_request, workflow_dispatch] jobs: - build: + setup: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.extract-version.outputs.VERSION }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + - name: Set up MySQL (local) + run: | + sudo systemctl start mysql + mysql -e 'CREATE DATABASE lucee' -uroot -proot + mysql -e 'CREATE USER "lucee"@"localhost" IDENTIFIED WITH mysql_native_password BY "lucee";' -uroot -proot + mysql -e 'GRANT ALL PRIVILEGES ON lucee.* TO "lucee"@"localhost"' -uroot -proot + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2 + key: lucee-script-runner-maven-cache + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Extract version number + id: extract-version + run: | + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "::set-output name=VERSION::$VERSION" + - name: Cache Lucee files + uses: actions/cache@v4 + with: + path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache + key: lucee-downloads + + - name: Import GPG key + run: | + echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + + build-and-test: runs-on: ubuntu-latest + needs: setup env: - luceeVersionQuery: 0/all/light + testLabels: orm + testAdditional: ${{ github.workspace }}/tests + MYSQL_SERVER: localhost + MYSQL_USERNAME: lucee + MYSQL_PASSWORD: lucee + MYSQL_PORT: 3306 + MYSQL_DATABASE: lucee + strategy: + matrix: + lucee: + - { version: 'light-5.4.6.9', query: '5/all/light' } + - { version: 'light-6.0.3.1', query: '6.0/all/light' } + - { version: 'light-6.1.0.206-SNAPSHOT', query: '6.1/all/light' } + services: + minio: + image: fclairamb/minio-github-actions + ports: + - 9000:9000 steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'adopt' - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2 - key: lucee-script-runner-maven-cache - enableCrossOsArchive: true - - name: Cache Lucee files - uses: actions/cache@v3 - with: - path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache - key: lucee-downloads - enableCrossOsArchive: true - - name: Build with Ant - run: ant -noinput -verbose -buildfile build.xml - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: hibernate-lex - path: dist/*.lex - - name: Checkout Lucee - uses: actions/checkout@v3 - with: - repository: lucee/lucee - path: lucee - - name: Run Lucee Test Suite, testLabels="orm" - uses: lucee/script-runner@main - with: - webroot: ${{ github.workspace }}/lucee/test - execute: /bootstrap-tests.cfm - luceeVersion: ${{ env.luceeVersion }} - luceeVersionQuery: ${{ env.luceeVersionQuery }} - extensionDir: ${{ github.workspace }}/dist - env: - testLabels: orm - testAdditional: ${{ github.workspace }}/tests - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - if: always() - with: - files: ${{ github.workspace }}/lucee/test/reports/junit-test-results.xml - check_name: "Test Results" + - uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'adopt' + + - name: Build and Install with Maven + run: | + echo "------- Maven Install -------"; + mvn -B -e -f pom.xml clean install + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: hibernate-lex-${{ matrix.lucee.version }} + path: target/*.lex + + - name: Checkout Lucee + uses: actions/checkout@v4 + with: + repository: lucee/lucee + path: lucee + + - name: Run Lucee Test Suite + uses: lucee/script-runner@main + with: + webroot: ${{ github.workspace }}/lucee/test + execute: /bootstrap-tests.cfm + luceeVersion: ${{ matrix.lucee.version }} + luceeVersionQuery: ${{ matrix.lucee.query }} + extensionDir: ${{ github.workspace }}/target + env: + testLabels: s3 + testAdditional: ${{ github.workspace }}/tests + + deploy: + runs-on: ubuntu-latest + needs: [build-and-test] + if: always() && needs.build-and-test.result == 'success' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Import GPG key + run: | + echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + + - name: Build and Deploy with Maven + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: | + if [[ "${{ needs.setup.outputs.version }}" == *-SNAPSHOT ]]; then + echo "------- Maven Deploy snapshot on ${{ github.event_name }} -------"; + mvn -B -e -f pom.xml clean deploy --settings maven-settings.xml + else + echo "------- Maven Deploy release on ${{ github.event_name }} -------"; + mvn -B -e -f pom.xml clean deploy -DperformRelease=true --settings maven-settings.xml + fi diff --git a/build.xml b/build.xml index 3361de9a..de365c50 100644 --- a/build.xml +++ b/build.xml @@ -4,18 +4,15 @@ Build Hibernate Extension - - + - + - - @@ -55,13 +52,13 @@ Manifest-Version: 1.0 Built-Date: ${NOW} -version: "${bundleversion}${build.number}${versionAppendix}" +version: "${bundleversion}" id: "FAD1E8CB-4F45-4184-86359145767C29DE" name: ${label} description: ${description} start-bundles: false release-type: ${releaseType} -orm: "[{'class':'${class}','name':'${bundlename}','version':'${bundleversion}${build.number}${versionAppendix}'}]" +orm: "[{'class':'${class}','name':'${bundlename}','version':'${bundleversion}'}]" lucee-core-version: "${luceeCoreVersion}" @@ -74,7 +71,7 @@ lucee-core-version: "${luceeCoreVersion}" - + @@ -85,9 +82,9 @@ lucee-core-version: "${luceeCoreVersion}" + jarfile="${dist}/extension/jars/${bundlename}-${bundleversion}.jar" basedir="${build}" manifest="${src}/META-INF/MANIFEST.MF"> - + @@ -102,7 +99,7 @@ lucee-core-version: "${luceeCoreVersion}" - + @@ -115,7 +112,7 @@ lucee-core-version: "${luceeCoreVersion}" - + diff --git a/maven-settings.xml b/maven-settings.xml new file mode 100755 index 00000000..36475394 --- /dev/null +++ b/maven-settings.xml @@ -0,0 +1,27 @@ + + + + + + + ossrh + ${env.MAVEN_USERNAME} + ${env.MAVEN_PASSWORD} + + + + + + ossrh + + true + + + gpg2 + ${env.GPG_PASSPHRASE} + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9fe61c53..41bcc283 100644 --- a/pom.xml +++ b/pom.xml @@ -1,945 +1,257 @@ - - 4.0.0 - - org.lucee - extension.hibernate - 5.0.0.99-SNAPSHOT - jar - - Extension Hibernate - Lucee Extension for Hibernate ORM Engine. - http://maven.lucee.org/extension/hibernate - - - - hibernate.extension - FAD1E8CB-4F45-4184-86359145767C29DE - Hibernate ORM (Hibernate in short) is an object-relational mapping library for the Java language, + + 4.0.0 + org.lucee + hibernate-extension + 3.5.6.0-SNAPSHOT + pom + Hibernate Extension + + + UTF-8 + 11 + 11 + FAD1E8CB-4F45-4184-86359145767C29DE + org.lucee.hibernate.extension + 5.0.0.157 + server + + org.lucee.extension.orm.hibernate.HibernateORMEngine + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + https://oss.sonatype.org/content/repositories/snapshots/ + + + + https://github.com/lucee/extension-hibernate + scm:git:git://github.com/lucee/extension-hibernate.git + scm:git:git@github.com:lucee/extension-hibernate.git + ${project.version} + + + + + ossrh + ${release.url} + + + ossrh + ${snapshot.url} + + + + + + The GNU Lesser General Public License, Version 2.1 + http://www.gnu.org/licenses/lgpl-2.1.txt + repo + + + + + + micstriit + Michael Offner + michael@lucee.org + Lucee Association Switzerland + http://lucee.org + + Project-Administrator + Developer + + +1 + + + + Hibernate ORM (Hibernate in short) is an object-relational mapping library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves object-relational impedance mismatch problems by replacing direct persistence-related - database accesses with high-level object handling functions. - org.lucee.extension.orm.hibernate.HibernateORMEngine - - - - - The GNU Lesser General Public License, Version 2.1 - http://www.gnu.org/licenses/lgpl-2.1.txt - repo - - - - - - micstriit - Michael Offner - michael@lucee.org - Lucee Association Switzerland - http://lucee.org - - Project-Administrator - Developer - - +1 - - - - - - - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - true - - - - .* - - - src/main/java/META-INF/MANIFEST.MF - - ${main.class} - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.3 - - 1.7 - 1.7 - - - - - - - - - - - - - - - - junit - junit - 4.12 - - - - - - org.lucee - lucee - - - org.lucee - lucee - 3.1.0 - - - - - compile - org.apache.felix - org.apache.felix.framework - 4.2.1 - - - javax.servlet - javax.servlet-api - 3.1.0 - - - javax.servlet.jsp - jsp-api - 2.2 - - - javax.el - javax.el-api - 3.0.0 - - - - org.apache.ant - ant - 1.9.5 - - - - org.apache.tika - tika-core - 1.10 - - - - - - org.apache.sanselan - sanselan - 0.97-incubator - - - - - - org.apache.commons - codec - 1.6.0 - - - - - - - - - - org.apache.commons - commons-collections4 - 4.0 - - - - - - - - org.apache.commons - commons-compress - 1.9 - - - - - commons-discovery - commons-discovery - 0.5 - - - - - org.apache.commons - commons-email - 1.2 - - - - - org.apache.commons - fileupload - 1.2.1 - - - - - org.lucee - commons-httpclient - 3.1 - - - - - commons-io - commons-io - 2.4 - - - - - commons-lang - commons-lang - 2.6 - - - - - - - - org.apache.commons.logging - adapters - 1.1.1 - - - - - org.apache.commons.logging - api - jar - 1.1.1 - - - - - org.apache.commons - logging - jar - 1.1.1 - - - - - commons-net - commons-net - 3.3 - - - - - org.apache - oro - jar - 2.0.8 - - - - - log4j - log4j - 1.2.17 - - - - - apache.poi.ooxml - schemas - jar - 3.8.0 - - - - org.apache.poi - ooxml - jar - 3.8.0 - - - - apache.poi.tm - extractors - jar - 3.8.0 - - - - org.apache - poi - jar - 3.8.0 - - - - apache.ws.axis - ant - jar - 1.4.0 - - - - apache.ws - axis - jar - 1.4.0.L004 - - - - apache.xml - xalan - jar - 2.7.1 - - - - apache.xml - xerces - jar - 2.11.0 - - - - backport.util - concurrent - jar - 2.2.0 - - - - bcprov - jdk14 - jar - 1.36.0 - - - - - edu.oswego.cs.gee - concurrent - jar - 1.3.3 - - - - - net.sf.ehcache - ehcache - 2.10.0 - - - - - - ESAPI - ESAPI - jar - 2.1.0 - - - - - flex.messaging - common - jar - 3.3.0.22497 - - - - flex.messaging - core - jar - 3.3.0.22497 - - - - flex.messaging - opt - jar - 3.3.0.22497 - - - - flex.messaging - proxy - jar - 3.3.0.22497 - - - - flex.messaging - remoting - jar - 3.3.0.22497 - - - - fusiondebug.api - server - jar - 1.0.20 - - - - apache.http.components - client - jar - 4.5.0.0001L - - - - apache.http.components - core - jar - 4.4.1 - - - - apache.http.components - mime - jar - 4.5.0 - - - - hsqldb - hsqldb - jar - 1.8.0 - - - - icepdf - core - jar - 3.1.0.3 - - - - jacob - jacob - jar - 1.16.1 - - - - javaparser - javaparser - jar - 1.0.8 - - - - javasysmon - javasysmon - jar - 0.3.3 - - - - - org.samba - jcifs - jar - 1.3.17 - - - - jcommon - jcommon - jar - 1.0.10 - - - - jencrypt - jencrypt - jar - 1.4.2.04 - - - - jffmpeg - jffmpeg - jar - 1.4.2.09 - - - - jfreechart - patch - jar - 1.0.12 - - - - jfreechart - jfreechart - jar - 1.0.12 - - - - - org.joda - time - jar - 2.1.0 - - - - jpedal - gpl - jar - 3.51.12 - - - - - - lowagie - itext - jar - 2.1.2.1 - - - - metadata - extractor - jar - 2.6.4 - - - - - org.ow2.asm - asm-all - 4.2 - - - - - ojdbc14 - ojdbc14 - jar - 0.0.0 - - - - - openamf - astranslator - jar - 1.5.8 - - - - openamf - openamf - jar - 1.5.8 - - - - org.apache.pdfbox - pdfbox - 1.8.9 - - - - - - org.apache.pdfbox - fontbox - 1.8.9 - - - - - org.apache.pdfbox - jempbox - 1.8.9 - - - - - PDFRenderer - PDFRenderer - jar - 1.0.5 - - - - resolver - resolver - jar - 1.2.0 - - - - serializer - serializer - jar - 2.7.1 - - - - - org.slf4j - slf4j-api - 1.7.12 - - - - - org.slf4j - slf4j-nop - 1.7.12 - - - - - ss - css2 - jar - 0.9.4 - - - - stax - api - jar - 1.0.1 - - - - sun - activation - jar - 1.1.0 - - - - sun.jai - codec - jar - 1.1.2 - - - - sun.jai - core - jar - 1.2.1 - - - - sun.jndi - ldap - jar - 1.2.4 - - - - sun.jndi - ldapbp - jar - 1.2.4 - - - - sun.jndi - ldapsec - jar - 1.2.4 - - - - sun.jndi - providerutil - jar - 1.2.4 - - - - sun - mail - jar - 1.3.3.01 - - - - sun.security - jaas - jar - 1.2.4 - - - - sun.xml - jaxrpc - jar - 1.2.1 - - - - sun.xml - wsdl4j - jar - 1.5.1 - - - - sun.xml - saaj - jar - 1.2.1 - - - - tagsoup - tagsoup - jar - 1.2.1 - - - - w3c - dom - jar - 1.1.0 - - - - xdb - xdb - jar - 1.0.0 - - - - xml - apis - jar - 1.3.2 - - - - xmlbeans - xmlbeans - jar - 2.3.0.r540734 - - - - xmlparserv2 - xmlparserv2 - jar - 1.2.2 - - - - - - - - repo - https://raw.githubusercontent.com/lucee/mvn/master/releases - - - snapi - https://oss.sonatype.org/content/repositories/snapshots - - - - - https://github.com/lucee/Lucee - scm:git:git://github.com/lucee/Lucee.git - scm:git:git@github.com:lucee/Lucee.git - ${project.version} - - - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - - \ No newline at end of file + database accesses with high-level object handling functions. + https://github.com/lucee/extension-hibernate + + + + release-sign-artifacts + + + performRelease + true + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + ${project.build.directory}/${project.artifactId}-${project.version}.lex + + + + + + + org.apache.maven.plugins + maven-release-plugin + 3.0.0 + + true + false + release + deploy + + + + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.2.0 + + + attach-artifacts + package + + attach-artifact + + + + + ${project.build.directory}/${project.artifactId}-${project.version}.lex + lex + + + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + cleanup + post-package + + clean + + + + + ${project.build.directory}/antrun + + **/* + + + + ${project.build.directory}/archive-tmp + + **/* + + + + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.0.0-M1 + + + default-deploy + deploy + + deploy-file + + + ${project.build.directory}/${project.artifactId}-${project.version}.lex + ${project.groupId} + ${project.artifactId} + ${project.version} + ossrh + ${deploy.url} + lex + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ossrh + https://oss.sonatype.org/ + true + + + + +