Skip to content

Commit

Permalink
Merge branch 'opensagres:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
VladFlorinIlie authored Jan 16, 2025
2 parents efb936d + 02ca6b5 commit 2e32bc7
Show file tree
Hide file tree
Showing 136 changed files with 1,125 additions and 667 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,24 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'java', 'javascript' ]
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +60,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +74,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/release-to-maven-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release to maven central
on:
workflow_dispatch:
inputs:
releaseversion:
description: 'Release version'
required: true
default: '2.0.7'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- run: echo "Will start a Maven Central upload with version ${{ github.event.inputs.releaseversion }}"

- uses: actions/checkout@v3

- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Set projects Maven version to GitHub Action GUI set version
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}"

- name: Publish package
run: mvn --batch-mode clean deploy -P central-deploy -DskipTests=true
env:
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<parent>
<artifactId>converter</artifactId>
<groupId>fr.opensagres.xdocreport</groupId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>
<artifactId>fr.opensagres.xdocreport.converter.docx.docx4j</artifactId>
<dependencies>

<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.converter</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.docx4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
<parent>
<artifactId>converter</artifactId>
<groupId>fr.opensagres.xdocreport</groupId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>
<artifactId>fr.opensagres.xdocreport.converter.docx.xwpf</artifactId>
<dependencies>

<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.converter</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.poi.xwpf.converter.pdf</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.poi.xwpf.converter.xhtml</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>converter</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.converter</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.odfdom.converter.pdf</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.odfdom.converter.xhtml</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions converter/fr.opensagres.xdocreport.converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>converter</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.core</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>xdocreport-parent</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion core/fr.opensagres.xdocreport.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>core</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>
<artifactId>fr.opensagres.xdocreport.core</artifactId>
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>xdocreport-parent</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<packaging>pom</packaging>
Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.10</version>
<version>1.2.13</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions document/fr.opensagres.xdocreport.document.docx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>
<artifactId>fr.opensagres.xdocreport.document.docx</artifactId>
<dependencies>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>easymock</groupId>
Expand Down
4 changes: 2 additions & 2 deletions document/fr.opensagres.xdocreport.document.odp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions document/fr.opensagres.xdocreport.document.ods/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
6 changes: 3 additions & 3 deletions document/fr.opensagres.xdocreport.document.odt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
<parent>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.document</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-core</artifactId>
<version>2.2.1</version>
<version>2.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,6 @@
*/
package fr.opensagres.xdocreport.document.odt.styling;

import static org.junit.Assert.assertThat;

import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.junit.Assert;
import org.junit.Test;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import org.xmlunit.matchers.CompareMatcher;

import com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory;

import fr.opensagres.xdocreport.document.odt.preprocessor.ODTBufferedDocumentContentHandler;
import fr.opensagres.xdocreport.document.odt.preprocessor.ODTStyleContentHandler;
import fr.opensagres.xdocreport.document.odt.textstyling.MockContext;
Expand All @@ -59,6 +33,28 @@
import fr.opensagres.xdocreport.document.textstyling.IDocumentHandler;
import fr.opensagres.xdocreport.document.textstyling.ITextStylingTransformer;
import fr.opensagres.xdocreport.document.textstyling.html.HTMLTextStylingTransformer;
import org.junit.Assert;
import org.junit.Test;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import org.xmlunit.matchers.CompareMatcher;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;

import static org.junit.Assert.assertThat;

/**
* Check ODT Styling generation by comparing generated result against the expected XML
Expand Down Expand Up @@ -106,7 +102,7 @@ public String formatXML( String unformattedXml )
Transformer serializer = tfactory.newTransformer();

serializer.setOutputProperty( OutputKeys.INDENT, "yes" );
serializer.setOutputProperty( OutputPropertiesFactory.S_KEY_INDENT_AMOUNT, "2" );
serializer.setOutputProperty( "{http:// xml. apache. org/ xalan}indent-amount", "2" );
serializer.setOutputProperty( OutputKeys.STANDALONE, "no" );

Writer out = new StringWriter();
Expand Down
Loading

0 comments on commit 2e32bc7

Please sign in to comment.