diff --git a/.gitignore b/.gitignore index 4d09ac527..db87237c5 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ generated .bundle node_modules + +!job-dsl-plugin/src/main/webapp/api-viewer/config.json +job-dsl-plugin/src/main/webapp/api-viewer diff --git a/job-dsl-plugin/build.gradle b/job-dsl-plugin/build.gradle index a6ad4e3a3..994ca7d32 100644 --- a/job-dsl-plugin/build.gradle +++ b/job-dsl-plugin/build.gradle @@ -12,7 +12,6 @@ buildscript { plugins { id 'org.jenkins-ci.jpi' version '0.43.0' - id 'war' } java { @@ -91,16 +90,22 @@ test { systemProperty 'jenkins.test.noSpaceInTmpDirs', 'true' } -war { - into('api-viewer') { - from(project(':job-dsl-api-viewer').projectDir) { - include 'index.html' - include 'build/dist/**' - } +task copyApiViewer { + copy { + from(project(':job-dsl-api-viewer').projectDir) + include 'index.html' + into 'src/main/webapp/api-viewer' + } + copy { + from(project(':job-dsl-api-viewer').buildDir) + include 'dist/**' + into 'src/main/webapp/api-viewer/build' } - dependsOn tasks.getByPath(':job-dsl-api-viewer:build') } +copyApiViewer.dependsOn ':job-dsl-api-viewer:build' +jpi.dependsOn 'copyApiViewer' + dependencies { annotationProcessor 'net.java.sezpoz:sezpoz:1.13' annotationProcessor 'org.jenkins-ci:annotation-indexer:1.12'