Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
Release:1.0.0.RC1 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
M999JAD authored and M999JAD committed Oct 8, 2021
1 parent 7081eaf commit fb8d4c4
Show file tree
Hide file tree
Showing 114 changed files with 44,732 additions and 173 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,50 @@
[![Maven Central](https://img.shields.io/maven-central/v/dev.jeka/sonarqube-plugin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22dev.jeka22%20AND%20a:%22springboot-plugin%22)

# sonarqube-plugin

A Sonarqube plugin for Jeka

## How to use

### Common usage

Just declare the plugin in your build class.

```java
@JkDefClasspath("dev.jeka.plugins:sonarqube:[version]")
public class Build extends JkClass {

JkPluginJava javaPlugin = getPlugin(JkPluginJava.class);

JkPluginSonarqube sonarqube = getPlugin(JkPluginSonarqube.class);

...
}
```
Execute `run` method from Sonaqube plugin after a build as `jeka clean java#pack sonarqube#run`.

Sonarqube client can be configured programmatically using `sonarqube` instance and/or
using standard system properties from the command line as `-Dsonar.host=...` (see https://docs.sonarqube.org/latest/analysis/analysis-parameters/).

### Programmatically

You can use directly `JkSonarqube` in build code without using `JkPluginSonarqube`class.

### Bind dynamically

You can invoke Sonarqube plugin from command line on a Jeka project that does declare this plugin it.

`jeka java#pack @dev.jeka.plugins:sonarqube:[version] sonarqube#run`

To get help and options :
`jeka sonarqube#help`

### Example

See example [here](dev.jeka.plugins.sonarqube-sample)


## How to build this project

This project uses Jeka wrapper, you don't need to have Jeka installed on your machine. simply execute `./jekaw cleanPack`
from the root of this project.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Empty file.
Binary file not shown.
60 changes: 60 additions & 0 deletions dev.jeka.plugins.sonarqube-sample/jeka/def/Build.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import dev.jeka.core.api.java.JkJavaVersion;
import dev.jeka.core.api.java.project.JkJavaProject;
import dev.jeka.core.api.system.JkProcess;
import dev.jeka.core.tool.JkClass;
import dev.jeka.core.tool.JkDefClasspath;
import dev.jeka.core.tool.JkDoc;
import dev.jeka.core.tool.JkInit;
import dev.jeka.core.tool.builtins.git.JkPluginGit;
import dev.jeka.core.tool.builtins.jacoco.JkPluginJacoco;
import dev.jeka.plugins.sonarqube.JkPluginSonarqube;
import dev.jeka.plugins.springboot.JkPluginSpringboot;

@JkDefClasspath("dev.jeka:springboot-plugin:3.0.0.RC10")
@JkDefClasspath("../dev.jeka.plugins.sonarqube/jeka/output/dev.jeka.sonarqube-plugin.jar")
class Build extends JkClass {

private final JkPluginSpringboot springboot = getPlugin(JkPluginSpringboot.class);

private final JkPluginGit git = getPlugin(JkPluginGit.class);

private final JkPluginSonarqube sonarqube = getPlugin(JkPluginSonarqube.class);

private final JkPluginJacoco jacoco = getPlugin(JkPluginJacoco.class);

@Override
protected void setup() {
springboot.setSpringbootVersion("2.5.5");
JkJavaProject javaProject = springboot.javaPlugin().getProject();
javaProject.simpleFacade().setJavaVersion(JkJavaVersion.V11);
javaProject.simpleFacade()
.setCompileDependencies(deps -> deps
.and("org.springframework.boot:spring-boot-starter-web")
)
.setTestDependencies(deps -> deps
.and("org.springframework.boot:spring-boot-starter-test")
);
javaProject
.getConstruction()
.getCompiler()
.setForkedWithDefaultProcess()
.__
.__
.getPublication()
.getMaven()
.setVersion(git.getWrapper().getVersionFromTag());
sonarqube.provideTestLibs = true;
}

@JkDoc("Cleans, tests and creates bootable jar.")
public void cleanPack() {
clean(); springboot.javaPlugin().pack();
sonarqube.run();
}

// Clean, compile, test and generate springboot application jar
public static void main(String[] args) {
JkInit.instanceOf(Build.class, args).cleanPack();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Manifest-Version: 1.0
Spring-Boot-Version: 2.5.5
Implementation-Version: main-SNAPSHOT

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.8) on Thu Sep 30 20:55:33 CEST 2021 -->
<title>All Classes</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2021-09-30">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="All Classes";
}
}
catch(err) {
}
//-->
var pathtoroot = "./";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="your/basepackage/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="your/basepackage/package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<main role="main">
<div class="header">
<h1 title="All&amp;nbsp;Classes" class="title">All&nbsp;Classes</h1>
</div>
<div class="allClassesContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><a href="your/basepackage/Application.html" title="class in your.basepackage">Application</a></td>
<th class="colLast" scope="row">&nbsp;</th>
</tr>
</table>
</li>
</ul>
</div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="your/basepackage/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="your/basepackage/package-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.8) on Thu Sep 30 20:55:33 CEST 2021 -->
<title>All Classes</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2021-09-30">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.js"></script>
</head>
<body>
<h1 class="bar">All&nbsp;Classes</h1>
<main role="main" class="indexContainer">
<ul>
<li><a href="your/basepackage/Application.html" title="class in your.basepackage">Application</a></li>
</ul>
</main>
</body>
</html>
Loading

0 comments on commit fb8d4c4

Please sign in to comment.