Skip to content

Commit

Permalink
Java11 (#1580)
Browse files Browse the repository at this point in the history
* JDK11 and JavaDoc fix POC
* Update Maven plugins
* Pom parent 4

Signed-off-by: Geoffroy Jamgotchian <[email protected]>

Co-authored-by: Thomas ADAM <[email protected]>
  • Loading branch information
geofjamg and tadam50 authored Jan 20, 2021
1 parent c73f246 commit 1bfab2e
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 198 deletions.
28 changes: 8 additions & 20 deletions commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
<groupId>com.univocity</groupId>
<artifactId>univocity-parsers</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
Expand All @@ -87,6 +91,10 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down Expand Up @@ -142,25 +150,5 @@
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<!-- jaxb is no longer included in java11+ -->
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

4 changes: 0 additions & 4 deletions dsl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-console</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>powsybl-commons</artifactId>
Expand Down
33 changes: 0 additions & 33 deletions dsl/src/main/java/com/powsybl/dsl/AstUtil.java

This file was deleted.

14 changes: 0 additions & 14 deletions dsl/src/main/java/com/powsybl/dsl/PowsyblDslAstTransformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,17 @@ public class PowsyblDslAstTransformation implements ASTTransformation {

protected static final Logger LOGGER = LoggerFactory.getLogger(PowsyblDslAstTransformation.class);

private static final boolean DEBUG = false;

protected void visit(SourceUnit sourceUnit, ClassCodeExpressionTransformer transformer) {
LOGGER.trace("Apply AST transformation");
ModuleNode ast = sourceUnit.getAST();
BlockStatement blockStatement = ast.getStatementBlock();

if (DEBUG) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(AstUtil.toString(blockStatement));
}
}

List<MethodNode> methods = ast.getMethods();
for (MethodNode methodNode : methods) {
methodNode.getCode().visit(transformer);
}

blockStatement.visit(transformer);

if (DEBUG) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(AstUtil.toString(blockStatement));
}
}
}

public void visit(ASTNode[] nodes, SourceUnit sourceUnit) {
Expand Down
50 changes: 0 additions & 50 deletions dsl/src/test/java/com/powsybl/dsl/AstUtilTest.java

This file was deleted.

24 changes: 16 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-parent</artifactId>
<version>3</version>
<version>4</version>
<relativePath/>
</parent>

Expand Down Expand Up @@ -82,6 +82,8 @@
</modules>

<properties>
<java.version>11</java.version>

<sonar.coverage.jacoco.xmlReportPaths>
../distribution-core/target/site/jacoco-aggregate/jacoco.xml,
../../distribution-core/target/site/jacoco-aggregate/jacoco.xml,
Expand All @@ -96,9 +98,11 @@
<commonsio.version>2.5</commonsio.version>
<commonslang3.version>3.4</commonslang3.version>
<commonsmath3.version>3.6.1</commonsmath3.version>
<findbugs-annotations.version>3.0.1</findbugs-annotations.version>
<findbugs-jsr305.version>3.0.2</findbugs-jsr305.version>
<gdata.version>1.41.1_1</gdata.version>
<graphviz-builder.version>1.0.11</graphviz-builder.version>
<groovy.version>2.5.8</groovy.version>
<groovy.version>3.0.7</groovy.version>
<guava.version>29.0-jre</guava.version>
<jackson.version>2.10.1</jackson.version>
<jama.version>1.0.3</jama.version>
Expand All @@ -107,7 +111,6 @@
<jena.version>3.0.0</jena.version>
<jgrapht.version>1.4.0</jgrapht.version>
<jimfs.version>1.1</jimfs.version>
<jline2.version>3.5.1</jline2.version>
<jodatime.version>2.9.7</jodatime.version>
<junit.version>4.13.1</junit.version>
<logback.version>1.1.8</logback.version>
Expand Down Expand Up @@ -185,6 +188,16 @@
<artifactId>auto-service</artifactId>
<version>${autoservice.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>${findbugs-annotations.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${findbugs-jsr305.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -225,11 +238,6 @@
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
<version>${jline2.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
Expand Down
8 changes: 0 additions & 8 deletions scripting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,10 @@

<dependencies>
<!-- Compilation dependencies -->
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-groovysh</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down

This file was deleted.

29 changes: 9 additions & 20 deletions simulation-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>powsybl-commons</artifactId>
Expand Down Expand Up @@ -94,25 +103,5 @@
<type>test-jar</type>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<!-- jaxb is no longer included in java11+ -->
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

4 changes: 0 additions & 4 deletions time-series/time-series-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-console</artifactId>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threeten-extra</artifactId>
Expand Down

0 comments on commit 1bfab2e

Please sign in to comment.