Skip to content

Commit 684060f

Browse files
committed
Update to CloudSim Plus 7.1.0 with Java 17
- Update dependencies Signed-off-by: Manoel Campos <[email protected]> Print empty line in CloudSimulation Signed-off-by: Manoel Campos <[email protected]> Update GitHub CI workflows for Java 17 Signed-off-by: Manoel Campos <[email protected]>
1 parent f648b01 commit 684060f

File tree

5 files changed

+27
-19
lines changed

5 files changed

+27
-19
lines changed

β€Ž.github/workflows/deploy.ymlβ€Ž

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@ jobs:
1111
- name: Set up Maven Central Repository
1212
uses: actions/setup-java@v2
1313
with:
14-
java-version: '8'
14+
java-version: '17'
1515
distribution: 'adopt'
1616
server-id: ossrh
1717
server-username: MAVEN_USERNAME
1818
server-password: MAVEN_PASSWORD
19+
cache: 'maven'
1920
- id: install-secret-key
2021
name: Install gpg secret key
2122
run: cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
2223
- name: Publish package
23-
run: mvn --no-transfer-progress -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode -Psonatype deploy
24+
run: |
25+
# Set some environment variables needed by Nexus Staging Maven plugin on JDK 17,
26+
# until https://issues.sonatype.org/browse/OSSRH-66257 is resolved
27+
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
28+
mvn --no-transfer-progress -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode -Psonatype deploy
2429
env:
2530
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
2631
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

β€Ž.github/workflows/maven.ymlβ€Ž

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Maven Build
1+
name: Build
2+
23
on:
34
push:
45
branches: [ master, main ]
@@ -7,16 +8,15 @@ on:
78

89
jobs:
910
build:
10-
runs-on: ubuntu-20.04
11-
strategy:
12-
matrix:
13-
java: [ '8', '15' ]
14-
name: Java ${{ matrix.Java }} Build
11+
runs-on: ubuntu-latest
12+
1513
steps:
1614
- uses: actions/checkout@v2
17-
- name: Setup Java
15+
- name: Set up JDK 17
1816
uses: actions/setup-java@v2
1917
with:
2018
distribution: 'adopt'
21-
java-version: ${{ matrix.java }}
22-
- run: mvn clean verify -B -V
19+
java-version: 17
20+
cache: 'maven'
21+
- name: Build with Maven
22+
run: mvn -B package

β€Žpom.xmlβ€Ž

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>org.cloudsimplus</groupId>
66
<artifactId>cloudsim-plus-automation</artifactId>
7-
<version>6.4.3</version>
7+
<version>7.1.0</version>
88
<packaging>jar</packaging>
99

1010
<name>CloudSim Plus Automation</name>
@@ -60,7 +60,7 @@
6060
<plugin>
6161
<groupId>org.apache.maven.plugins</groupId>
6262
<artifactId>maven-source-plugin</artifactId>
63-
<version>3.0.1</version>
63+
<version>3.2.1</version>
6464
<executions>
6565
<execution>
6666
<id>attach-sources</id>
@@ -74,7 +74,7 @@
7474
<plugin>
7575
<groupId>org.apache.maven.plugins</groupId>
7676
<artifactId>maven-javadoc-plugin</artifactId>
77-
<version>3.0.1</version>
77+
<version>3.2.0</version>
7878
<executions>
7979
<execution>
8080
<id>attach-javadocs</id>
@@ -143,18 +143,17 @@
143143
<plugin>
144144
<groupId>org.apache.maven.plugins</groupId>
145145
<artifactId>maven-compiler-plugin</artifactId>
146-
<version>3.8.0</version>
146+
<version>3.8.1</version>
147147
<configuration>
148148
<showDeprecation>true</showDeprecation>
149-
<source>1.8</source>
150-
<target>1.8</target>
149+
<release>17</release>
151150
</configuration>
152151
</plugin>
153152

154153
<plugin>
155154
<groupId>org.apache.maven.plugins</groupId>
156155
<artifactId>maven-jar-plugin</artifactId>
157-
<version>3.0.2</version>
156+
<version>3.2.0</version>
158157
<configuration>
159158
<archive>
160159
<manifest>
@@ -180,7 +179,7 @@
180179
<plugin>
181180
<groupId>org.apache.maven.plugins</groupId>
182181
<artifactId>maven-shade-plugin</artifactId>
183-
<version>3.0.0</version>
182+
<version>3.2.4</version>
184183
<executions>
185184
<execution>
186185
<phase>package</phase>

β€Žsrc/main/java/org/cloudsimplus/automation/CloudSimulation.javaβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ public void run() {
455455
}
456456

457457
final double finishTimeSecs = (System.currentTimeMillis() - startTime) / 1000;
458+
System.out.println();
458459
printFinalResults(finishTimeSecs);
459460
}
460461

β€Žsrc/main/java/org/cloudsimplus/automation/examples/Example1.javaβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.cloudsimplus.automation.examples;
22

33
import com.esotericsoftware.yamlbeans.YamlException;
4+
import org.cloudbus.cloudsim.core.CloudSim;
45
import org.cloudbus.cloudsim.util.ResourceLoader;
56
import org.cloudsimplus.automation.CloudSimulation;
67
import org.cloudsimplus.automation.YamlCloudScenario;
@@ -18,6 +19,8 @@
1819
*/
1920
public class Example1 {
2021
private Example1(){
22+
System.out.printf("Starting %s on %s%n", getClass().getSimpleName(), CloudSim.VERSION);
23+
2124
//Gets the path to the YAML file inside the resource directory.
2225
final String yamlFilePath = ResourceLoader.getResourcePath(getClass(), "CloudEnvironment1.yml");
2326
try {

0 commit comments

Comments
Β (0)