Skip to content

Commit

Permalink
Feature/PODAAC-5877: Upgrade to Java 11 and CMA 2.0.3 (#208)
Browse files Browse the repository at this point in the history
* upgrade to Java17, added Sonar and Jacoco reporting capabilities

* java11 instead of 17

* upgrade java to 11

* more clarification of java11 and ticket number

* java11 instead of java17

---------

Co-authored-by: Yen, David (398B-Affiliate) <[email protected]>
  • Loading branch information
yenes56 and Yen, David (398B-Affiliate) committed Oct 13, 2023
1 parent 8bd5d85 commit faf844d
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8.0.232'
java-version: '11.0.6'
- uses: gradle/gradle-build-action@v1
with:
gradle-version: 8.0.1
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
### Changed
- **PODAAC-5877**
- Support java 11
- SonarQube and Jacoco report
### Deprecated
### Removed
### Fixed
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

## Installation

To build the Lambda code:

To build the Lambda code, Refer to following Confluence page:
https://wiki.jpl.nasa.gov/pages/viewpage.action?spaceKey=PD&title=SonarQube%2C+Jacoco+and+Java+17+upgrade
```shell
* Build with sonarQube and Jacoco report
mvn clean verify sonar:sonar \
-Dsonar.projectKey=cnm2cma-opensource \
-Dsonar.projectName='cnm2cma-opensource' \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.token=sqp_6dc05b1aa1f622b45112927d2a0510f209776860

* Makde sure using java 11 and gradle 8.3
mvn clean dependency:copy-dependencies
gradle build
```
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.11
targetCompatibility = 1.11

dependencies {
implementation fileTree(dir: 'target/dependency/', include: '*.jar')
Expand Down
89 changes: 85 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@
<id>clojars.org</id>
<url>https://repo.clojars.org</url>
</repository>
<repository>
<id>central</id>
<name>Maven Central</name>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>


<dependencies>

<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
Expand All @@ -32,12 +42,12 @@
<dependency>
<groupId>gov.nasa.earthdata</groupId>
<artifactId>cumulus-message-adapter</artifactId>
<version>1.3.9</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.12.215</version>
<version>1.12.565</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
Expand All @@ -53,7 +63,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-core</artifactId>
<version>1.2.1</version>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -67,5 +77,76 @@
<artifactId>jackson-databind</artifactId>
<version>2.13.4.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.wordinator.xml2docx.MakeDocx</mainClass>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.10.0.2594</version>
</plugin>
</plugins>
</build>
</project>

0 comments on commit faf844d

Please sign in to comment.