Skip to content

Commit

Permalink
Update java17 and deleting cassandra implementation (#137 #138 #141)
Browse files Browse the repository at this point in the history
* deleting cassandra implementation

Signed-off-by: Nicolas Rol <[email protected]>

* Update java17 and dependencies (including Powsybl-core 6.1.0) (#138)

* update springboot to v2.7.18

Signed-off-by: Nicolas Rol <[email protected]>

* update jackson to 2.15.2

Signed-off-by: Nicolas Rol <[email protected]>

* update guava to 32.1.2-jre

Signed-off-by: Nicolas Rol <[email protected]>

* update autoservice to 1.1.1

Signed-off-by: Nicolas Rol <[email protected]>

* update assertj to 3.24.2

Signed-off-by: Nicolas Rol <[email protected]>

* update jimfs to 1.3.0

Signed-off-by: Nicolas Rol <[email protected]>

* update maven core to 3.8.5

Signed-off-by: Nicolas Rol <[email protected]>

* update slf4j to 2.0.9

Signed-off-by: Nicolas Rol <[email protected]>

* update groovy to 4.0.14

Signed-off-by: Nicolas Rol <[email protected]>

* update arquillianbom to 1.5.0.Final

Signed-off-by: Nicolas Rol <[email protected]>

* upgrade junit to 5.10.0

Signed-off-by: Nicolas Rol <[email protected]>

* test arquillian, resteasy and wildfly update

Signed-off-by: Nicolas Rol <[email protected]>

* javaee to jakarta update

Signed-off-by: Nicolas Rol <[email protected]>

* javaee to jakarta update continued

Signed-off-by: Nicolas Rol <[email protected]>

* javaee to jakarta update continued

Signed-off-by: Nicolas Rol <[email protected]>

* some dependencies update

Signed-off-by: Nicolas Rol <[email protected]>

* shrinkwrap + beans.xml + arquillian.xml update

Signed-off-by: Nicolas Rol <[email protected]>

* shrinkwrap + beans.xml + arquillian.xml update

Signed-off-by: Nicolas Rol <[email protected]>

* powsybl-parent update to v15

Signed-off-by: Nicolas Rol <[email protected]>

* maven tests

Signed-off-by: Nicolas Rol <[email protected]>

* update

Signed-off-by: Nicolas Rol <[email protected]>

* AppStorageServerTest commented and disabled

Signed-off-by: Nicolas Rol <[email protected]>

* CI update

Signed-off-by: Nicolas Rol <[email protected]>

* CI update 2

Signed-off-by: Nicolas Rol <[email protected]>

* test commented

Signed-off-by: Nicolas Rol <[email protected]>

* try with resources

Signed-off-by: Nicolas Rol <[email protected]>

* code cleaning

Signed-off-by: Nicolas Rol <[email protected]>

* code cleaning instanceof

Signed-off-by: Nicolas Rol <[email protected]>

* removed public identifiers

Signed-off-by: Nicolas Rol <[email protected]>

* new switch format

Signed-off-by: Nicolas Rol <[email protected]>

* replace generic types

Signed-off-by: Nicolas Rol <[email protected]>

* mvnw file added

Signed-off-by: Nicolas Rol <[email protected]>

* mvnw.cmd file added

Signed-off-by: Nicolas Rol <[email protected]>

* add test

Signed-off-by: Nicolas Rol <[email protected]>

* DoubleDataChunkSerializer coverage

Signed-off-by: Nicolas Rol <[email protected]>

* StringDataChunkSerializer coverage

Signed-off-by: Nicolas Rol <[email protected]>

* modify assertions

Signed-off-by: Nicolas Rol <[email protected]>

* coverage on data source

Signed-off-by: Nicolas Rol <[email protected]>

* add SocketsUtilsTest

Signed-off-by: Nicolas Rol <[email protected]>

* RemoteTaskMonitor coverage

Signed-off-by: Nicolas Rol <[email protected]>

* SoutTaskListener coverage

Signed-off-by: Nicolas Rol <[email protected]>

* issue

Signed-off-by: Nicolas Rol <[email protected]>

* AppDataWrapperTest tests now with Junit assertions

Signed-off-by: Nicolas Rol <[email protected]>

* README update with Maven Wrapper information

Signed-off-by: Nicolas Rol <[email protected]>

* param descriptions

Signed-off-by: Nicolas Rol <[email protected]>

* param descriptions

Signed-off-by: Nicolas Rol <[email protected]>

* param descriptions

Signed-off-by: Nicolas Rol <[email protected]>

* Update Powsybl-core dependency to 6.1.2 (#141)

* powsybl-core 6.1

Signed-off-by: Nicolas Rol <[email protected]>

* solve issues

Signed-off-by: Nicolas Rol <[email protected]>

* SECURITY_PATTERN

Signed-off-by: Nicolas Rol <[email protected]>

* taskmonitor coverage

Signed-off-by: Nicolas Rol <[email protected]>

* remove test on different types

Signed-off-by: Nicolas Rol <[email protected]>

---------

Signed-off-by: Nicolas Rol <[email protected]>

---------

Signed-off-by: Nicolas Rol <[email protected]>

* upgrade powsybl-core to 6.1.2

Signed-off-by: Nicolas Rol <[email protected]>

---------

Signed-off-by: Nicolas Rol <[email protected]>
  • Loading branch information
rolnico authored Feb 13, 2024
1 parent 30bc06e commit 25f78bd
Show file tree
Hide file tree
Showing 200 changed files with 2,216 additions and 4,908 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'main'
- 'release-v**'
- 'full-sonar-analysis-**'
pull_request:

jobs:
Expand All @@ -17,27 +18,31 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
distribution: 'zulu'
java-version: '11.0.14' # arquillian tests fail on 11.0.15+, should probably upgrade there instead
cache: 'maven'
distribution: 'temurin'
java-version: '17' # arquillian tests fail on 11.0.15+, should probably upgrade there instead

- name: Build with Maven
- name: Build with Maven (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: mvn --batch-mode -Pjacoco install
run: ./mvnw --batch-mode -Pjacoco install

- name: Build with Maven
if: matrix.os != 'ubuntu-latest'
run: mvn --batch-mode install
- name: Build with Maven (Windows)
if: matrix.os == 'windows-latest'
run: mvnw.cmd --batch-mode install
shell: cmd

- name: Build with Maven (MacOS)
if: matrix.os == 'macos-latest'
run: ./mvnw --batch-mode install

- name: Run SonarCloud analysis
if: matrix.os == 'ubuntu-latest'
run: >
mvn --batch-mode -DskipTests sonar:sonar
./mvnw --batch-mode -DskipTests sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=powsybl-ci-github
-Dsonar.projectKey=com.powsybl:powsybl-afs
Expand Down
24 changes: 24 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
distributionSha256Sum=80b3b63df0e40ca8cde902bb1a40e4488ede24b3f282bd7bd6fba8eb5a7e055c

# Beware: wrapperUrl must not be set! It prevents the "MVNW_REPOURL" envvar to work when downloading maven-wrapper
# SHA-256 of maven-wrapper-3.2.0.jar:
wrapperSha256Sum=e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,61 @@ myFooFile.runSomeCoolComputation()
### 2.2 Adding your own storage implementation

TODO

## Using Maven Wrapper
If you don't have a proper Maven installed, you could use the [Apache Maven Wrapper](https://maven.apache.org/wrapper/)
scripts provided. They will download a compatible maven distribution and use it automatically.

### Configuration
#### Configure the access to the maven distributions
In order to work properly, Maven Wrapper needs to download 2 artifacts: the maven distribution and the maven wrapper
distribution. By default, these are downloaded from the online Maven repository, but you could use an internal repository instead.

##### Using a Maven Repository Manager
If you prefer to use an internal Maven Repository Manager instead of retrieving the artefacts from the internet, you should define the following variable in your environment:
- `MVNW_REPOURL`: the URL to your repository manager (for instance `https://my_server/repository/maven-public`)

Note that if you need to use this variable, it must be set for **each maven command**. Else, the Maven Wrapper will try to
retrieve the maven distribution from the online Maven repository (even if one was already downloaded from another location).

##### Using a proxy to access the Internet
If you don't use an internal Maven Repository, and need to use a proxy to access the Internet, you should:
1. configure the proxy in your terminal (on Linux/MacOS, you can do it via the `http_proxy` and `https_proxy` environment variables).
This is needed to download the Maven Wrapper distribution ;

2. execute **at least once** the following command:
```shell
./mvnw -DproxyHost=XXX -DproxyPort=XXX -Dhttp.proxyUser=XXX -Dhttp.proxyPassword=XXX -Djdk.http.auth.tunneling.disabledSchemes= clean
```
Notes:
- The 4 `XXX` occurrences should be replaced with your configuration;
- The `-Djdk.http.auth.tunneling.disabledSchemes=` option should be left empty;
- Windows users should use `mvnw.cmd` instead of `./mwn`.

This second step is required to download the Maven distribution.

Once both distributions are retrieved, the proxy configuration isn't needed anymore to use `./mvnw` or `mvnw.cmd` commands.


##### Checking your access configuration
You could check your configuration with the following command:
```shell
./mvnw -version
```

If you encounter any problem, you could specify `MVNW_VERBOSE=true` and relaunch the command to have
further information.

#### Configuring `install.sh` to use maven wrapper
To indicate `install.sh` to use Maven Wrapper, you need to configure it with the `--mvn` option:
```shell
./install.sh clean --mvn ./mvnw
```

You can revert this configuration with the following command:
```shell
./install.sh clean --mvn mvn
```

### Usage
Once the configuration is done, you just need to use `./mvnw` instead of `mvn` in your commands.
6 changes: 3 additions & 3 deletions afs-action-dsl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-afs</artifactId>
<version>5.2.0-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -54,8 +54,8 @@

<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.powsybl.iidm.network.Line;
import com.powsybl.iidm.network.Network;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import java.util.Collections;
Expand All @@ -27,7 +27,7 @@
/**
* @author Geoffroy Jamgotchian {@literal <geoffroy.jamgotchian at rte-france.com>}
*/
public class ActionScriptTest extends AbstractProjectFileTest {
class ActionScriptTest extends AbstractProjectFileTest {

@Override
protected AppStorage createStorage() {
Expand All @@ -40,7 +40,7 @@ protected List<ProjectFileExtension> getProjectFileExtensions() {
}

@Test
public void test() {
void test() {
// create project in the root folder
Project project = afs.getRootFolder().createProject("project");

Expand Down
71 changes: 0 additions & 71 deletions afs-cassandra/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 25f78bd

Please sign in to comment.