Skip to content

Commit

Permalink
Update to CloudSim Plus 7.1.0 with Java 17
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
manoelcampos committed Oct 10, 2021
1 parent f648b01 commit 684060f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ jobs:
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '17'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
cache: 'maven'
- id: install-secret-key
name: Install gpg secret key
run: cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
- name: Publish package
run: mvn --no-transfer-progress -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode -Psonatype deploy
run: |
# Set some environment variables needed by Nexus Staging Maven plugin on JDK 17,
# until https://issues.sonatype.org/browse/OSSRH-66257 is resolved
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"
mvn --no-transfer-progress -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode -Psonatype deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
18 changes: 9 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Maven Build
name: Build

on:
push:
branches: [ master, main ]
Expand All @@ -7,16 +8,15 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '8', '15' ]
name: Java ${{ matrix.Java }} Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Java
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- run: mvn clean verify -B -V
java-version: 17
cache: 'maven'
- name: Build with Maven
run: mvn -B package
15 changes: 7 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.cloudsimplus</groupId>
<artifactId>cloudsim-plus-automation</artifactId>
<version>6.4.3</version>
<version>7.1.0</version>
<packaging>jar</packaging>

<name>CloudSim Plus Automation</name>
Expand Down Expand Up @@ -60,7 +60,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -74,7 +74,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -143,18 +143,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.8.1</version>
<configuration>
<showDeprecation>true</showDeprecation>
<source>1.8</source>
<target>1.8</target>
<release>17</release>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
Expand All @@ -180,7 +179,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ public void run() {
}

final double finishTimeSecs = (System.currentTimeMillis() - startTime) / 1000;
System.out.println();
printFinalResults(finishTimeSecs);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.cloudsimplus.automation.examples;

import com.esotericsoftware.yamlbeans.YamlException;
import org.cloudbus.cloudsim.core.CloudSim;
import org.cloudbus.cloudsim.util.ResourceLoader;
import org.cloudsimplus.automation.CloudSimulation;
import org.cloudsimplus.automation.YamlCloudScenario;
Expand All @@ -18,6 +19,8 @@
*/
public class Example1 {
private Example1(){
System.out.printf("Starting %s on %s%n", getClass().getSimpleName(), CloudSim.VERSION);

//Gets the path to the YAML file inside the resource directory.
final String yamlFilePath = ResourceLoader.getResourcePath(getClass(), "CloudEnvironment1.yml");
try {
Expand Down

0 comments on commit 684060f

Please sign in to comment.