aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorDavid Rautureau <david.rautureau@sonarsource.com>2018-03-14 16:18:20 +0100
committerGitHub <noreply@github.com>2018-03-14 16:18:20 +0100
commitb7497deb41ba42c4b9c626de66108d0fed216a07 (patch)
tree7007204e592f94c5c4436fa149632949653997f1 /server
parentacabda0cc1514ad1d1913dd0729600c71852f59d (diff)
downloadsonarqube-b7497deb41ba42c4b9c626de66108d0fed216a07.tar.gz
sonarqube-b7497deb41ba42c4b9c626de66108d0fed216a07.zip
Fix incremental build of sonar web
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/.gitignore7
-rw-r--r--server/sonar-web/build.gradle41
-rw-r--r--server/sonar-web/config/paths.js8
-rw-r--r--server/sonar-web/public/.htaccess (renamed from server/sonar-web/src/main/webapp/.htaccess)0
-rw-r--r--server/sonar-web/public/WEB-INF/web.xml (renamed from server/sonar-web/src/main/webapp/WEB-INF/web.xml)0
-rw-r--r--server/sonar-web/public/apple-touch-icon-114x114.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-114x114.png)bin4043 -> 4043 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-120x120.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-120x120.png)bin4232 -> 4232 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-144x144.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-144x144.png)bin5028 -> 5028 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-152x152.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-152x152.png)bin5200 -> 5200 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-180x180.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-180x180.png)bin6087 -> 6087 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-57x57.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-57x57.png)bin2356 -> 2356 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-60x60.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-60x60.png)bin2470 -> 2470 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-72x72.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-72x72.png)bin2843 -> 2843 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-76x76.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-76x76.png)bin2933 -> 2933 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon-precomposed.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon-precomposed.png)bin4232 -> 4232 bytes
-rw-r--r--server/sonar-web/public/apple-touch-icon.png (renamed from server/sonar-web/src/main/webapp/apple-touch-icon.png)bin4232 -> 4232 bytes
-rw-r--r--server/sonar-web/public/favicon.ico (renamed from server/sonar-web/src/main/webapp/favicon.ico)bin5430 -> 5430 bytes
-rwxr-xr-xserver/sonar-web/public/fonts/sonar-5.2.eot (renamed from server/sonar-web/src/main/webapp/fonts/sonar-5.2.eot)bin17992 -> 17992 bytes
-rwxr-xr-xserver/sonar-web/public/fonts/sonar-5.2.svg (renamed from server/sonar-web/src/main/webapp/fonts/sonar-5.2.svg)0
-rwxr-xr-xserver/sonar-web/public/fonts/sonar-5.2.ttf (renamed from server/sonar-web/src/main/webapp/fonts/sonar-5.2.ttf)bin17828 -> 17828 bytes
-rwxr-xr-xserver/sonar-web/public/fonts/sonar-5.2.woff (renamed from server/sonar-web/src/main/webapp/fonts/sonar-5.2.woff)bin17904 -> 17904 bytes
-rw-r--r--server/sonar-web/public/images/loading.gif (renamed from server/sonar-web/src/main/webapp/images/loading.gif)bin3048 -> 3048 bytes
-rw-r--r--server/sonar-web/public/images/logo.svg (renamed from server/sonar-web/src/main/webapp/images/logo.svg)0
-rw-r--r--server/sonar-web/public/images/project_badges/sonarcloud-black.svg (renamed from server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-black.svg)0
-rw-r--r--server/sonar-web/public/images/project_badges/sonarcloud-orange.svg (renamed from server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-orange.svg)0
-rw-r--r--server/sonar-web/public/images/project_badges/sonarcloud-white.svg (renamed from server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-white.svg)0
-rw-r--r--server/sonar-web/public/images/scanner-logos/ant.svg (renamed from server/sonar-web/src/main/webapp/images/scanner-logos/ant.svg)0
-rw-r--r--server/sonar-web/public/images/scanner-logos/gradle.svg (renamed from server/sonar-web/src/main/webapp/images/scanner-logos/gradle.svg)0
-rw-r--r--server/sonar-web/public/images/scanner-logos/jenkins.svg (renamed from server/sonar-web/src/main/webapp/images/scanner-logos/jenkins.svg)0
-rw-r--r--server/sonar-web/public/images/scanner-logos/maven.svg (renamed from server/sonar-web/src/main/webapp/images/scanner-logos/maven.svg)0
-rw-r--r--server/sonar-web/public/images/scanner-logos/msbuild.svg (renamed from server/sonar-web/src/main/webapp/images/scanner-logos/msbuild.svg)0
-rw-r--r--server/sonar-web/public/images/scanner-logos/sonarqube.svg (renamed from server/sonar-web/src/main/webapp/images/scanner-logos/sonarqube.svg)0
-rwxr-xr-xserver/sonar-web/public/images/select2.png (renamed from server/sonar-web/src/main/webapp/images/select2.png)bin613 -> 613 bytes
-rwxr-xr-xserver/sonar-web/public/images/select2x2.png (renamed from server/sonar-web/src/main/webapp/images/select2x2.png)bin845 -> 845 bytes
-rw-r--r--server/sonar-web/public/mstile-512x512.png (renamed from server/sonar-web/src/main/webapp/mstile-512x512.png)bin17911 -> 17911 bytes
-rw-r--r--server/sonar-web/public/robots.txt (renamed from server/sonar-web/src/main/webapp/robots.txt)0
-rw-r--r--server/sonar-web/scripts/build.js10
37 files changed, 40 insertions, 26 deletions
diff --git a/server/sonar-web/.gitignore b/server/sonar-web/.gitignore
index 54edd2e381a..bc02f6cecbc 100644
--- a/server/sonar-web/.gitignore
+++ b/server/sonar-web/.gitignore
@@ -16,13 +16,6 @@ yarn-error.log
#webpack
.awcache/
-# build
-build/
-src/main/webapp/js/
-src/main/webapp/css/
-src/main/webapp/index.html
-src/main/webapp/WEB-INF/lib/*.jar
-
# tests
src/test/json/**/*.png
lcov.info
diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle
index ee71411cf03..131b5fb406b 100644
--- a/server/sonar-web/build.gradle
+++ b/server/sonar-web/build.gradle
@@ -9,7 +9,6 @@ sonarqube {
}
apply plugin: 'com.moowork.node'
-apply plugin: 'war'
configurations {
branding
@@ -17,13 +16,37 @@ configurations {
dependencies {
branding 'com.sonarsource:sonarsource-branding:1.3.0.307@war'
}
+
+def webappDir = "${buildDir}/webapp"
+def brandingDir = "${buildDir}/branding"
+
task unzipBranding(type: Copy) {
- into projectDir
from { zipTree(configurations.branding.singleFile) }
+ into brandingDir
+}
+task copyBrandingSrc(type: Copy, dependsOn: unzipBranding) {
+ into projectDir
+ from file(brandingDir)
include '**/*.js'
+ includeEmptyDirs = false
+}
+task copyBrandingWebapp(type: Copy, dependsOn: unzipBranding) {
+ into "${projectDir}/public"
+ from file("${brandingDir}/src/main/webapp")
include '**/*.svg'
includeEmptyDirs = false
}
+task copyBrandingFile(type: Copy, dependsOn: unzipBranding) {
+ into "${projectDir}/public"
+ from file(brandingDir)
+ include '**/branding'
+ includeEmptyDirs = false
+}
+task copyBranding() {
+ dependsOn copyBrandingSrc
+ dependsOn copyBrandingWebapp
+ dependsOn copyBrandingFile
+}
node {
version = '8.5.0'
@@ -32,13 +55,17 @@ node {
}
yarn_run {
- if (release) { dependsOn unzipBranding }
+ if (release) { dependsOn copyBranding }
+ inputs.dir('config')
+ inputs.dir('public')
inputs.dir('scripts')
- inputs.dir('src/main/js')
+ inputs.dir('src')
+ inputs.file('.babelrc')
inputs.file('build.gradle')
- outputs.dir('src/main/webapp')
+ inputs.file('package.json')
+ inputs.file('tsconfig.json')
+ inputs.file('yarn.lock')
+ outputs.dir(webappDir)
args = ['build']
}
-
-war.dependsOn yarn_run
diff --git a/server/sonar-web/config/paths.js b/server/sonar-web/config/paths.js
index 5b380588750..9bb3c591122 100644
--- a/server/sonar-web/config/paths.js
+++ b/server/sonar-web/config/paths.js
@@ -45,14 +45,14 @@ const nodePaths = (process.env.NODE_PATH || '')
// config after eject: we're in ./config/
module.exports = {
- appBuild: resolveApp('src/main/webapp'),
+ appBuild: resolveApp('build/webapp'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src/main/js'),
- jsBuild: resolveApp('src/main/webapp/js'),
- cssBuild: resolveApp('src/main/webapp/css'),
- htmlBuild: resolveApp('src/main/webapp/index.html'),
+ jsBuild: resolveApp('build/webapp/js'),
+ cssBuild: resolveApp('build/webapp/css'),
+ htmlBuild: resolveApp('build/webapp/index.html'),
appNodeModules: resolveApp('node_modules'),
ownNodeModules: resolveApp('node_modules'),
nodePaths
diff --git a/server/sonar-web/src/main/webapp/.htaccess b/server/sonar-web/public/.htaccess
index d3c9983451f..d3c9983451f 100644
--- a/server/sonar-web/src/main/webapp/.htaccess
+++ b/server/sonar-web/public/.htaccess
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/web.xml b/server/sonar-web/public/WEB-INF/web.xml
index 0079ac0ed10..0079ac0ed10 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/web.xml
+++ b/server/sonar-web/public/WEB-INF/web.xml
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-114x114.png b/server/sonar-web/public/apple-touch-icon-114x114.png
index d3bf726f9a2..d3bf726f9a2 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-114x114.png
+++ b/server/sonar-web/public/apple-touch-icon-114x114.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-120x120.png b/server/sonar-web/public/apple-touch-icon-120x120.png
index 21dd9adace9..21dd9adace9 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-120x120.png
+++ b/server/sonar-web/public/apple-touch-icon-120x120.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-144x144.png b/server/sonar-web/public/apple-touch-icon-144x144.png
index a8859d94fc0..a8859d94fc0 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-144x144.png
+++ b/server/sonar-web/public/apple-touch-icon-144x144.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-152x152.png b/server/sonar-web/public/apple-touch-icon-152x152.png
index ed12b023481..ed12b023481 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-152x152.png
+++ b/server/sonar-web/public/apple-touch-icon-152x152.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-180x180.png b/server/sonar-web/public/apple-touch-icon-180x180.png
index 167bb46f082..167bb46f082 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-180x180.png
+++ b/server/sonar-web/public/apple-touch-icon-180x180.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-57x57.png b/server/sonar-web/public/apple-touch-icon-57x57.png
index 821e1e4cce7..821e1e4cce7 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-57x57.png
+++ b/server/sonar-web/public/apple-touch-icon-57x57.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-60x60.png b/server/sonar-web/public/apple-touch-icon-60x60.png
index 1f10bb20da1..1f10bb20da1 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-60x60.png
+++ b/server/sonar-web/public/apple-touch-icon-60x60.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-72x72.png b/server/sonar-web/public/apple-touch-icon-72x72.png
index 371814b6a03..371814b6a03 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-72x72.png
+++ b/server/sonar-web/public/apple-touch-icon-72x72.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-76x76.png b/server/sonar-web/public/apple-touch-icon-76x76.png
index 9dfb1e66de4..9dfb1e66de4 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-76x76.png
+++ b/server/sonar-web/public/apple-touch-icon-76x76.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon-precomposed.png b/server/sonar-web/public/apple-touch-icon-precomposed.png
index 21dd9adace9..21dd9adace9 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon-precomposed.png
+++ b/server/sonar-web/public/apple-touch-icon-precomposed.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/apple-touch-icon.png b/server/sonar-web/public/apple-touch-icon.png
index 21dd9adace9..21dd9adace9 100644
--- a/server/sonar-web/src/main/webapp/apple-touch-icon.png
+++ b/server/sonar-web/public/apple-touch-icon.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/favicon.ico b/server/sonar-web/public/favicon.ico
index 15b647af1c2..15b647af1c2 100644
--- a/server/sonar-web/src/main/webapp/favicon.ico
+++ b/server/sonar-web/public/favicon.ico
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.eot b/server/sonar-web/public/fonts/sonar-5.2.eot
index fbc4d06cfa3..fbc4d06cfa3 100755
--- a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.eot
+++ b/server/sonar-web/public/fonts/sonar-5.2.eot
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.svg b/server/sonar-web/public/fonts/sonar-5.2.svg
index 1d648b7b456..1d648b7b456 100755
--- a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.svg
+++ b/server/sonar-web/public/fonts/sonar-5.2.svg
diff --git a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.ttf b/server/sonar-web/public/fonts/sonar-5.2.ttf
index fa26fd2b826..fa26fd2b826 100755
--- a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.ttf
+++ b/server/sonar-web/public/fonts/sonar-5.2.ttf
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.woff b/server/sonar-web/public/fonts/sonar-5.2.woff
index 1e9e0d823fc..1e9e0d823fc 100755
--- a/server/sonar-web/src/main/webapp/fonts/sonar-5.2.woff
+++ b/server/sonar-web/public/fonts/sonar-5.2.woff
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/images/loading.gif b/server/sonar-web/public/images/loading.gif
index 60834b831fa..60834b831fa 100644
--- a/server/sonar-web/src/main/webapp/images/loading.gif
+++ b/server/sonar-web/public/images/loading.gif
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/images/logo.svg b/server/sonar-web/public/images/logo.svg
index 2f200d9d8e2..2f200d9d8e2 100644
--- a/server/sonar-web/src/main/webapp/images/logo.svg
+++ b/server/sonar-web/public/images/logo.svg
diff --git a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-black.svg b/server/sonar-web/public/images/project_badges/sonarcloud-black.svg
index 1ff05edc822..1ff05edc822 100644
--- a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-black.svg
+++ b/server/sonar-web/public/images/project_badges/sonarcloud-black.svg
diff --git a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-orange.svg b/server/sonar-web/public/images/project_badges/sonarcloud-orange.svg
index 1a53be8e449..1a53be8e449 100644
--- a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-orange.svg
+++ b/server/sonar-web/public/images/project_badges/sonarcloud-orange.svg
diff --git a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-white.svg b/server/sonar-web/public/images/project_badges/sonarcloud-white.svg
index 475ef13f68e..475ef13f68e 100644
--- a/server/sonar-web/src/main/webapp/images/project_badges/sonarcloud-white.svg
+++ b/server/sonar-web/public/images/project_badges/sonarcloud-white.svg
diff --git a/server/sonar-web/src/main/webapp/images/scanner-logos/ant.svg b/server/sonar-web/public/images/scanner-logos/ant.svg
index 697ae4dc56a..697ae4dc56a 100644
--- a/server/sonar-web/src/main/webapp/images/scanner-logos/ant.svg
+++ b/server/sonar-web/public/images/scanner-logos/ant.svg
diff --git a/server/sonar-web/src/main/webapp/images/scanner-logos/gradle.svg b/server/sonar-web/public/images/scanner-logos/gradle.svg
index 0d178e1acc3..0d178e1acc3 100644
--- a/server/sonar-web/src/main/webapp/images/scanner-logos/gradle.svg
+++ b/server/sonar-web/public/images/scanner-logos/gradle.svg
diff --git a/server/sonar-web/src/main/webapp/images/scanner-logos/jenkins.svg b/server/sonar-web/public/images/scanner-logos/jenkins.svg
index 284455cf12a..284455cf12a 100644
--- a/server/sonar-web/src/main/webapp/images/scanner-logos/jenkins.svg
+++ b/server/sonar-web/public/images/scanner-logos/jenkins.svg
diff --git a/server/sonar-web/src/main/webapp/images/scanner-logos/maven.svg b/server/sonar-web/public/images/scanner-logos/maven.svg
index 9f7fcaa9f76..9f7fcaa9f76 100644
--- a/server/sonar-web/src/main/webapp/images/scanner-logos/maven.svg
+++ b/server/sonar-web/public/images/scanner-logos/maven.svg
diff --git a/server/sonar-web/src/main/webapp/images/scanner-logos/msbuild.svg b/server/sonar-web/public/images/scanner-logos/msbuild.svg
index 811245afe89..811245afe89 100644
--- a/server/sonar-web/src/main/webapp/images/scanner-logos/msbuild.svg
+++ b/server/sonar-web/public/images/scanner-logos/msbuild.svg
diff --git a/server/sonar-web/src/main/webapp/images/scanner-logos/sonarqube.svg b/server/sonar-web/public/images/scanner-logos/sonarqube.svg
index ad6cebddc28..ad6cebddc28 100644
--- a/server/sonar-web/src/main/webapp/images/scanner-logos/sonarqube.svg
+++ b/server/sonar-web/public/images/scanner-logos/sonarqube.svg
diff --git a/server/sonar-web/src/main/webapp/images/select2.png b/server/sonar-web/public/images/select2.png
index 1d804ffb996..1d804ffb996 100755
--- a/server/sonar-web/src/main/webapp/images/select2.png
+++ b/server/sonar-web/public/images/select2.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/images/select2x2.png b/server/sonar-web/public/images/select2x2.png
index 4bdd5c961d4..4bdd5c961d4 100755
--- a/server/sonar-web/src/main/webapp/images/select2x2.png
+++ b/server/sonar-web/public/images/select2x2.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/mstile-512x512.png b/server/sonar-web/public/mstile-512x512.png
index b644063292d..b644063292d 100644
--- a/server/sonar-web/src/main/webapp/mstile-512x512.png
+++ b/server/sonar-web/public/mstile-512x512.png
Binary files differ
diff --git a/server/sonar-web/src/main/webapp/robots.txt b/server/sonar-web/public/robots.txt
index 06fde6d0680..06fde6d0680 100644
--- a/server/sonar-web/src/main/webapp/robots.txt
+++ b/server/sonar-web/public/robots.txt
diff --git a/server/sonar-web/scripts/build.js b/server/sonar-web/scripts/build.js
index 321cb71c30c..c3469f538c3 100644
--- a/server/sonar-web/scripts/build.js
+++ b/server/sonar-web/scripts/build.js
@@ -37,14 +37,8 @@ function clean() {
// if you're in it, you don't end up in Trash
console.log(chalk.cyan.bold('Cleaning output directories and files...'));
- console.log(paths.jsBuild + '/*');
- rimrafSync(paths.jsBuild + '/*');
-
- console.log(paths.cssBuild + '/*');
- rimrafSync(paths.cssBuild + '/*');
-
- console.log(paths.htmlBuild);
- rimrafSync(paths.htmlBuild);
+ console.log(paths.appBuild + '/*');
+ rimrafSync(paths.appBuild + '/*');
console.log();
}