Skip to content

Commit

Permalink
Issue #LR-739 chore: Upgraded the scala major version from 2.11 to 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
AmiableAnil committed Feb 16, 2024
1 parent 0d513be commit 002f9b0
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 136 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.Build
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ ENV M2_HOME /opt/apache-maven-3.3.9
ENV PATH ${M2_HOME}/bin:${PATH}
COPY userorg /opt/userorg/
WORKDIR /opt/userorg/services
RUN mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk -DCLOUD_STORE_VERSION=1.4.6
RUN mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk_2.12 -DCLOUD_STORE_VERSION=1.4.6
WORKDIR /opt/userorg/services/userorg-service
CMD ["mvn", "play2:dist"]
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ node('build-slave') {
}

stage('Unit Tests') {
sh "mvn clean install '-Dtest=!%regex[io.opensaber.registry.client.*]' -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk -DCLOUD_STORE_VERSION=1.4.6"
sh "mvn clean install '-Dtest=!%regex[io.opensaber.registry.client.*]' -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk_2.12 -DCLOUD_STORE_VERSION=1.4.6"
}
stage('Package') {
dir('controller') {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ git clone https://github.com/Sunbird-Lern/sunbird-lms-service.git

3. Build the application using the following maven command in the path `<project-base-path>/sunbird-lms-service`:
```shell
mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk -DCLOUD_STORE_VERSION=1.4.6
mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk_2.12 -DCLOUD_STORE_VERSION=1.4.6
```
Make sure the build is successful before proceeding to the next step. If the build is not successful,
fix any configuration issues and rebuild the application.
Expand Down
28 changes: 10 additions & 18 deletions controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<play2.version>2.7.2</play2.version>
<play2.plugin.version>1.0.0-rc5</play2.plugin.version>
<sbt-compiler.plugin.version>1.0.0</sbt-compiler.plugin.version>
<scala.major.version>2.11</scala.major.version>
<scala.version>2.11.12</scala.version>
<learner.akka.version>2.5.19</learner.akka.version>
<scala.major.version>2.12</scala.major.version>
<scala.version>2.12.11</scala.version>
<typesafe.akka.version>2.5.22</typesafe.akka.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -83,7 +83,7 @@
</dependency>
<dependency>
<groupId>com.typesafe.play</groupId>
<artifactId>play-logback_2.11</artifactId>
<artifactId>play-logback_${scala.major.version}</artifactId>
<version>${play2.version}</version>
<scope>runtime</scope>
<exclusions>
Expand All @@ -95,7 +95,7 @@
</dependency>
<dependency>
<groupId>com.typesafe.play</groupId>
<artifactId>play-netty-server_2.11</artifactId>
<artifactId>play-netty-server_${scala.major.version}</artifactId>
<version>${play2.version}</version>
<scope>runtime</scope>
<exclusions>
Expand Down Expand Up @@ -144,15 +144,7 @@
</exclusion>
<exclusion>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-protobuf_2.11</artifactId>
</exclusion>
<exclusion>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-stream_2.11</artifactId>
</exclusion>
<exclusion>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<artifactId>akka-actor_${scala.maj.version}</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down Expand Up @@ -183,18 +175,18 @@
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_${scala.major.version}</artifactId>
<version>${learner.akka.version}</version>
<version>${typesafe.akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_${scala.major.version}</artifactId>
<version>${learner.akka.version}</version>
<version>${typesafe.akka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>2.0.2</version>
<version>2.0.9</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -206,7 +198,7 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>2.0.2</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
13 changes: 7 additions & 6 deletions core/actor-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<name>actor-core</name>

<properties>
<scala.major.version>2.12</scala.major.version>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand All @@ -23,7 +24,7 @@
<scoverage.plugin.version>1.1.1</scoverage.plugin.version>
<slf4j.version>1.6.1</slf4j.version>
<logback.version>1.0.7</logback.version>
<learner.akka.version>2.5.19</learner.akka.version>
<typesafe.akka.version>2.5.22</typesafe.akka.version>
</properties>
<dependencies>
<dependency>
Expand All @@ -33,18 +34,18 @@
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>${learner.akka.version}</version>
<artifactId>akka-actor_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.11</artifactId>
<version>${learner.akka.version}</version>
<artifactId>akka-slf4j_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote_2.11</artifactId>
<version>${learner.akka.version}</version>
<version>${typesafe.akka.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
Expand Down
96 changes: 0 additions & 96 deletions core/notification-utils/dependency-reduced-pom.xml

This file was deleted.

4 changes: 2 additions & 2 deletions core/notification-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>2.0.2</version>
<version>2.0.9</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -47,7 +47,7 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>2.0.2</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
13 changes: 7 additions & 6 deletions core/platform-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
<name>platform-common</name>

<properties>
<scala.major.version>2.12</scala.major.version>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<learner.akka.version>2.5.19</learner.akka.version>
<typesafe.akka.version>2.5.22</typesafe.akka.version>
<play2.version>2.7.2</play2.version>
<CLOUD_STORE_GROUP_ID>org.sunbird</CLOUD_STORE_GROUP_ID>
<CLOUD_STORE_ARTIFACT_ID>cloud-store-sdk</CLOUD_STORE_ARTIFACT_ID>
<CLOUD_STORE_ARTIFACT_ID>cloud-store-sdk_2.12</CLOUD_STORE_ARTIFACT_ID>
<CLOUD_STORE_VERSION>1.4.6</CLOUD_STORE_VERSION>
</properties>

Expand Down Expand Up @@ -65,8 +66,8 @@
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.11</artifactId>
<version>${learner.akka.version}</version>
<artifactId>akka-slf4j_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
Expand Down Expand Up @@ -94,14 +95,14 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>2.0.2</version>
<version>2.0.9</version>
<!--<scope>test</scope> -->
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>2.0.2</version>
<version>2.0.9</version>
<!--<scope>test</scope> -->
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.8</version>
<configuration>
<destFile>${basedir}/target/jacoco-unit.exec</destFile>
<dataFile>${basedir}/target/jacoco-unit.exec</dataFile>
Expand Down
7 changes: 4 additions & 3 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<artifactId>service</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<learner.akka.version>2.5.19</learner.akka.version>
<scala.major.version>2.12</scala.major.version>
<typesafe.akka.version>2.5.22</typesafe.akka.version>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand All @@ -36,8 +37,8 @@
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.11</artifactId>
<version>${learner.akka.version}</version>
<artifactId>akka-testkit_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

## Build
1. Run "git submodule foreach git pull origin master" to pull the latest sunbird-common submodule.
2. Run "mvn clean install -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk -DCLOUD_STORE_VERSION=1.4.6" to build the services.
2. Run "mvn clean install -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk_2.12 -DCLOUD_STORE_VERSION=1.4.6" to build the services.
2. Go to "controller" and run the command "mvn play2:dist" to generate the dist file for controller.
3. The build file "controller-1.0-SNAPSHOT-dist.zip" is generated in "userorg-service/controller/target" folder.

Expand Down

0 comments on commit 002f9b0

Please sign in to comment.