Skip to content

Commit c4bf739

Browse files
committed
UI based implementation using spring-boot and thymeleaf
1 parent b239a76 commit c4bf739

36 files changed

Lines changed: 414 additions & 570 deletions

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,12 @@
1-
# sonar-qube-exporter
2-
###### v1.1.0.0
3-
Command line tool for exporting results of SonarQube Analysis into excel
1+
# SonarQube Issue API Exporter
2+
A Spring Boot application to export SonarQube's issue API
43

5-
### Pre-requisite
6-
- Before running the tool make sure that SonarQube is running
7-
- Apache Maven to run project from command-prompt/terminal
4+
## How to run
85

9-
### Tested on
10-
- jdk-11.0.8
11-
- sonarqube-8.5.1.38104 Community Edition
12-
- sonar-scanner-4.4.0.2170
13-
14-
## How to use
6+
Start the application in dev mode
157

16-
### 1) Export excel using source code
17-
18-
- Extract project
19-
- Open command-prompt/terminal and mount root of project
20-
- Clean & package the application: mvn clean install
21-
- Run following maven command as described below :
22-
- Command Format:
23-
- mvn exec:java -Dexec.mainClass="in.flyspark.sonarqube.exporter.Exporter" -Dexec.args="*SonarQubeURL* *SonarToken* *ProjectKey* *ProjectName*"
24-
25-
- Command Example:
26-
- mvn exec:java -Dexec.mainClass="in.flyspark.sonarqube.exporter.Exporter" -Dexec.args="http://localhost:9000/ da5ad9e667faf116e42a8aadfb33d0b64f45bd99 EmployeeTracking EmployeeTracking_Demo_Code"
27-
28-
- On success, check root directory of project for generated excel file.
29-
30-
### 2) Export excel using executable jar
31-
32-
- Executable jar is available inside release directory
33-
- java -jar executable.jar SonarQubeURL SonarToken ProjectKey ProjectName
34-
- java -jar SonarQubeExporter.jar http://localhost:9000/ da5ad9e667faf116e42a8aadfb33d0b64f45bd99 EmployeeTracking EmployeeTracking_Demo_Code
35-
36-
37-
## Credits:
38-
39-
I want to thank [ThinkingStudio](https://github.com/ThinkingStudio) for SonarQube's REST API parsing logic
8+
```
9+
mvn spring-boot:run
10+
```
4011

12+
Open browser at `http://127.0.0.1:8080/` to view the home page and click on `Export` button

application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
logging.config: logback.xml
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<configuration>
2-
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3-
<encoder>
4-
<pattern>%d{yyyy-MM-dd} | %d{HH:mm:ss.SSS} | %-20.20thread | %5p | %-25.25logger{25} | %L | %m%n</pattern>
5-
</encoder>
6-
</appender>
7-
8-
<root level="debug">
9-
<appender-ref ref="STDOUT" />
10-
</root>
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{yyyy-MM-dd} | %d{HH:mm:ss.SSS} | %-20.20thread | %5p | %-25.25logger{25} | %L | %m%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="debug">
9+
<appender-ref ref="STDOUT" />
10+
</root>
1111
</configuration>

pom.xml

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,81 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
3+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
24
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>org.springframework.boot</groupId>
8+
<artifactId>spring-boot-starter-parent</artifactId>
9+
<version>2.4.1</version>
10+
<relativePath /> <!-- lookup parent from repository -->
11+
</parent>
12+
313
<groupId>in.flyspark</groupId>
4-
<artifactId>sonar-qube-exporter</artifactId>
5-
<version>1.1.0.0</version>
6-
<name>sonar-qube-exporter</name>
14+
<artifactId>sonarqube-issue-api-exporter</artifactId>
15+
<version>2.0</version>
16+
<packaging>jar</packaging>
17+
<name>sonarqube-issue-api-exporter</name>
718
<description>Command line tool for exporting SonarQube's analysis into an excel</description>
19+
820
<properties>
921
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1022
<maven.compiler.source>1.8</maven.compiler.source>
1123
<maven.compiler.target>1.8</maven.compiler.target>
24+
<java.version>1.8</java.version>
1225
</properties>
26+
1327
<dependencies>
28+
29+
<dependency>
30+
<groupId>org.springframework.boot</groupId>
31+
<artifactId>spring-boot-starter</artifactId>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>org.springframework.boot</groupId>
36+
<artifactId>spring-boot-starter-web</artifactId>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.springframework.boot</groupId>
41+
<artifactId>spring-boot-starter-thymeleaf</artifactId>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>org.springframework.boot</groupId>
46+
<artifactId>spring-boot-devtools</artifactId>
47+
<scope>runtime</scope>
48+
<optional>true</optional>
49+
</dependency>
50+
1451
<dependency>
1552
<groupId>org.apache.poi</groupId>
1653
<artifactId>poi</artifactId>
1754
<version>4.0.1</version>
1855
</dependency>
56+
1957
<dependency>
2058
<groupId>org.apache.poi</groupId>
2159
<artifactId>poi-ooxml</artifactId>
2260
<version>4.0.1</version>
2361
</dependency>
62+
2463
<dependency>
2564
<groupId>com.alibaba</groupId>
2665
<artifactId>fastjson</artifactId>
2766
<version>1.2.47</version>
2867
</dependency>
2968

30-
<dependency>
31-
<groupId>ch.qos.logback</groupId>
32-
<artifactId>logback-core</artifactId>
33-
<version>1.2.3</version>
34-
</dependency>
35-
<dependency>
36-
<groupId>ch.qos.logback</groupId>
37-
<artifactId>logback-classic</artifactId>
38-
<version>1.2.3</version>
39-
</dependency>
40-
<dependency>
41-
<groupId>org.slf4j</groupId>
42-
<artifactId>slf4j-api</artifactId>
43-
<version>1.7.30</version>
44-
</dependency>
4569
</dependencies>
4670
<build>
47-
<finalName>sonar-qube-exporter</finalName>
4871
<plugins>
4972
<plugin>
50-
<artifactId>maven-assembly-plugin</artifactId>
73+
<groupId>org.springframework.boot</groupId>
74+
<artifactId>spring-boot-maven-plugin</artifactId>
5175
<configuration>
52-
<archive>
53-
<manifest>
54-
<mainClass>in.flyspark.sonarqube.exporter.Exporter</mainClass>
55-
</manifest>
56-
</archive>
57-
<descriptorRefs>
58-
<descriptorRef>jar-with-dependencies</descriptorRef>
59-
</descriptorRefs>
76+
<source>1.8</source>
77+
<target>1.8</target>
6078
</configuration>
61-
<executions>
62-
<execution>
63-
<id>make-assembly</id>
64-
<phase>package</phase>
65-
<goals>
66-
<goal>single</goal>
67-
</goals>
68-
</execution>
69-
</executions>
7079
</plugin>
7180
</plugins>
7281
</build>
Binary file not shown.
-21.1 MB
Binary file not shown.
-20.3 MB
Binary file not shown.

0 commit comments

Comments
 (0)