Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade versions and disable mongo #50

Merged
merged 5 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,20 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 21
distribution: 'temurin'
- name: Get current version
id: version
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)"
- run: echo ${{steps.version.outputs.prop}}
- name: Get lunatic-model version
id: lunatic
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=lunatic.model.version -q -DforceStdout)"
- name: Install lunatic-model
run: mvn install:install-file -Dfile=lib/lunatic-model-${{steps.lunatic.outputs.prop}}.jar -DgroupId=fr.insee.lunatic -DartifactId=lunatic-model -Dversion=${{steps.lunatic.outputs.prop}} -Dpackaging=jar
- name: Build with Maven
run: mvn install --file pom.xml
run: mvn install --no-transfer-progress
- name: Upload jar
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: jar
path: target/*.jar
18 changes: 7 additions & 11 deletions .github/workflows/develop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ jobs:
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 11
- name: Get lunatic-model version
id: lunatic
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=lunatic.model.version -q -DforceStdout)"
- name: Install lunatic-model
run: mvn install:install-file -Dfile=lib/lunatic-model-${{steps.lunatic.outputs.prop}}.jar -DgroupId=fr.insee.lunatic -DartifactId=lunatic-model -Dversion=${{steps.lunatic.outputs.prop}} -Dpackaging=jar
java-version: 21
distribution: 'temurin'
- name: Build with Maven
run: mvn install --file pom.xml
run: mvn install --no-transfer-progress
- name: Get current version
id: version
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)"
Expand All @@ -39,7 +35,7 @@ jobs:
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
uses: actions/upload-release-asset@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ jobs:
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 11
- name: Get lunatic-model version
id: lunatic
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=lunatic.model.version -q -DforceStdout)"
- name: Install lunatic-model
run: mvn install:install-file -Dfile=lib/lunatic-model-${{steps.lunatic.outputs.prop}}.jar -DgroupId=fr.insee.lunatic -DartifactId=lunatic-model -Dversion=${{steps.lunatic.outputs.prop}} -Dpackaging=jar
java-version: 21
distribution: 'temurin'
- name: Build with Maven
run: mvn install --file pom.xml
run: mvn install --no-transfer-progress
- name: Get current version
id: version
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)"
Expand All @@ -39,7 +35,7 @@ jobs:
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
uses: actions/upload-release-asset@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ Batch using to implement QUEEN DB from xml files.

## Requirements
For building and running the application you need:
- [JDK 1.11](https://jdk.java.net/archive/)
- Maven 3

# Add lunatic librairy to project
``` shell
mvn install:install-file -Dfile=lib/lunatic-model-2.2.3.jar -DgroupId=fr.insee.lunatic -DartifactId=lunatic-model -Dversion=2.2.3 -Dpackaging=jar
```
- JDK 21
- Maven 3

## Install and excute unit tests and ent-to-end tests
Use the maven clean and maven install
Expand All @@ -19,7 +14,7 @@ mvn clean install
```

## Running batch
Use the folowing cmd :
Use the following cmd :
``` shell
echo $@
java8 -Xms64m -Xmx512m -classpath '/path/to/lib/*' -Dlog4j.configurationFile=file:/path/to/log4j2/config/log4j2.xml -Dproperties.path=/path/to/properties -DcheminLog=/path/to/log fr.insee.queen.batch.Lanceur $@
Expand All @@ -38,7 +33,6 @@ fr.insee.queen.persistence.database.schema = XXXXXXX
fr.insee.queen.persistence.database.user = XXXXXXX
fr.insee.queen.persistence.database.password = XXXXXXX
fr.insee.queen.persistence.database.driver = org.postgresql.Driver
fr.insee.queen.application.persistenceType = (JPA or MONGODB)
fr.insee.queen.folder.in=path/to/in
fr.insee.queen.folder.out=path/to/out
fr.insee.queen.paradata.id=idSu
Expand All @@ -58,7 +52,6 @@ Before committing code please ensure,
- spring-data-jpa
- commons-lang3
- postgresql
- mongoDb
- liquibase
- spring-test
- test-containers
Expand Down
73 changes: 33 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.insee.queen</groupId>
<artifactId>queen-batch</artifactId>
<version>4.2.2</version>
<version>4.3.0</version>
<packaging>jar</packaging>
<name>QueenBatch</name>
<description>Queen Batch</description>

<properties>
<jdk.version>11.0.2</jdk.version>
<jdk.version>1.11</jdk.version>
<java.version>1.11</java.version>
<spring.version>5.2.1.RELEASE</spring.version>
<log4j.version>2.17.1</log4j.version>
<testcontainers.version>1.15.2</testcontainers.version>
<java.version>21</java.version>
<spring.version>6.1.3</spring.version>
<log4j.version>2.22.1</log4j.version>
<testcontainers.version>1.19.7</testcontainers.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.release>11</maven.compiler.release>
<saxon.version>9.7.0-8</saxon.version>
<lunatic.model.version>2.2.3</lunatic.model.version>
<saxon.version>11.5</saxon.version>
<lunatic.model.version>2.5.1</lunatic.model.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -49,68 +46,64 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>2.2.3.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>2.2.3.RELEASE</version>
<version>3.1.2</version>
</dependency>

<!-- Apache commons -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<version>2.15.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.10</version>
<version>3.12.0</version>
</dependency>

<!-- PostgreSQL database driver -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.8</version>
<version>42.7.3</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.8.9</version>
<version>4.25.1</version>
</dependency>


<!-- For testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.4.0</version>
<version>5.10.1</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>

<!-- For JSON format -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mongodb</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>

<!-- For JSON format -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>

<!-- For the Logger -->
Expand All @@ -119,6 +112,7 @@
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
Expand All @@ -140,12 +134,12 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
<version>2.5.0</version>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.6.0</version>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
Expand All @@ -160,7 +154,7 @@
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.6</version>
<version>2.0.6.1</version>
</dependency>
</dependencies>

Expand All @@ -170,16 +164,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<version>3.1.2</version>
<configuration>
<runOrder>alphabetical</runOrder>
<includes>
<include>UnitTests.java</include>
<include>TestEndToEndJpa.java</include>
<include>TestEndToEndMongo.java</include>
</includes>
<forkedProcessExitTimeoutInSeconds>500</forkedProcessExitTimeoutInSeconds>
<argLine>-Xmx2048m -Xmx1G -XX:PermSize=1024m</argLine>
<argLine>-Xmx2048m -Xmx1G</argLine>
<environmentVariables>
<TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
</environmentVariables>
Expand All @@ -188,7 +181,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<version>2.10</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
Expand Down Expand Up @@ -243,7 +236,7 @@
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<version>3.3.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
Expand Down
Loading
Loading