From 5fab312cb2fef0207455ea193899b884d3cd4157 Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Sat, 2 May 2015 18:34:33 +0200 Subject: [PATCH] Moving plugin implementation to root of repo * This is the expected project layout of a Jenkins plugin. Otherwise it wont build in CloudBees. --- README.md | 16 ++++------------ build.sh | 5 ----- clean.sh | 8 -------- plugin/pom.xml => pom.xml | 0 .../org/jenkinsci/plugins/jvcts/JvctsLogger.java | 0 .../jvcts/ViolationsToStashDescriptor.java | 0 .../plugins/jvcts/ViolationsToStashRecorder.java | 0 .../jenkinsci/plugins/jvcts/config/Parser.java | 0 .../plugins/jvcts/config/ParserConfig.java | 0 .../jvcts/config/ViolationsToStashConfig.java | 0 .../config/ViolationsToStashConfigHelper.java | 0 .../jvcts/perform/FullBuildModelWrapper.java | 0 .../plugins/jvcts/perform/JvctsPerformer.java | 0 .../plugins/jvcts/stash/JvctsStashClient.java | 0 .../plugins/jvcts/stash/StashInvoker.java | 0 .../jvcts/ViolationsToStashRecorder/config.jelly | 0 .../jvcts/ViolationsToStashRecorder/help.html | 0 .../jvcts/perform/JvctsPerformerParseTest.java | 0 .../plugins/jvcts/stash/StashClientFaker.java | 0 .../resources/checkstyle_checkstylefile_1.json | 0 .../resources/checkstyle_checkstylefile_2.json | 0 ...checkstyle_checkstylefile_3_relativePath.json | 0 .../resources/checkstyle_pmdandcheckstyle.json | 0 .../test/resources/findbugs_code.json | 0 .../freestyle/checkstyle/checkstyle.xml | 0 .../checkstyle/checkstyle_relativePath.xml | 0 .../resources/freestyle/findbugs/findbugs.xml | 0 .../test/resources/freestyle/pmd/pmd.xml | 0 .../test/resources/pmd_pmdandcheckstyle.json | 0 .../src => src}/test/resources/pmd_pmdfile.json | 0 .../test/resources/pullrequestchanges_1_GET.json | 0 .../test/resources/pullrequestcomments_GET.json | 0 .../resources/pullrequestcomments_GET_none.json | 0 .../resources/test-resources-placeholder.txt | 0 34 files changed, 4 insertions(+), 25 deletions(-) rename plugin/pom.xml => pom.xml (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/JvctsLogger.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashDescriptor.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/config/Parser.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/config/ParserConfig.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfig.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfigHelper.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/perform/FullBuildModelWrapper.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformer.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/stash/JvctsStashClient.java (100%) rename {plugin/src => src}/main/java/org/jenkinsci/plugins/jvcts/stash/StashInvoker.java (100%) rename {plugin/src => src}/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/config.jelly (100%) rename {plugin/src => src}/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/help.html (100%) rename {plugin/src => src}/test/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformerParseTest.java (100%) rename {plugin/src => src}/test/java/org/jenkinsci/plugins/jvcts/stash/StashClientFaker.java (100%) rename {plugin/src => src}/test/resources/checkstyle_checkstylefile_1.json (100%) rename {plugin/src => src}/test/resources/checkstyle_checkstylefile_2.json (100%) rename {plugin/src => src}/test/resources/checkstyle_checkstylefile_3_relativePath.json (100%) rename {plugin/src => src}/test/resources/checkstyle_pmdandcheckstyle.json (100%) rename {plugin/src => src}/test/resources/findbugs_code.json (100%) rename {plugin/src => src}/test/resources/freestyle/checkstyle/checkstyle.xml (100%) rename {plugin/src => src}/test/resources/freestyle/checkstyle/checkstyle_relativePath.xml (100%) rename {plugin/src => src}/test/resources/freestyle/findbugs/findbugs.xml (100%) rename {plugin/src => src}/test/resources/freestyle/pmd/pmd.xml (100%) rename {plugin/src => src}/test/resources/pmd_pmdandcheckstyle.json (100%) rename {plugin/src => src}/test/resources/pmd_pmdfile.json (100%) rename {plugin/src => src}/test/resources/pullrequestchanges_1_GET.json (100%) rename {plugin/src => src}/test/resources/pullrequestcomments_GET.json (100%) rename {plugin/src => src}/test/resources/pullrequestcomments_GET_none.json (100%) rename {plugin/src => src}/test/resources/test-resources-placeholder.txt (100%) diff --git a/README.md b/README.md index 552d904..f0c5b40 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ There is a screenshot of the configuration GUI [here](https://raw.githubusercont Available in Jenkins [here](https://wiki.jenkins-ci.org/display/JENKINS/violation-comments-to-stash-plugin). +Also built in [CloudBees](https://jenkins.ci.cloudbees.com/job/plugins/job/violation-comments-to-stash-plugin/). + #Features * Comment pull requests with code analyzers comments * Supporting: CheckStyle, CSSLint, JSLint, CodeNarc, CPPLint, FindBugs, FxCop, Gendarme, JCEReport, PEP8, PerlCritic, PMD, PyLint, Simian, StyleCop @@ -60,16 +62,8 @@ Instructions for developers. ### Get the code -Clone repo, including submodules. - ``` -git clone --recursive git@github.com:tomasbjerre/jenkins-violation-comments-to-stash-plugin.git -``` - -Or if you already cloned the repo. - -``` -git submodule update --init --recursive +git clone git@github.com:tomasbjerre/jenkins-violation-comments-to-stash-plugin.git ``` ### Plugin development @@ -79,9 +73,7 @@ There is a ```/build.sh``` that will perform a full build and test the plugin. Some tests are implemented in maven project in ```/plugin-test```. This is to avoid classpath issues with the plugin. These are web tests that will start Jenkins with the plugin on localhost and perform some configuration tests. -The actual plugin is implemented in ```/plugin```. - -A release is created like this, in ```plugin```. +A release is created like this. ``` mvn release:prepare release:perform ``` diff --git a/build.sh b/build.sh index a18b454..40049c3 100755 --- a/build.sh +++ b/build.sh @@ -18,7 +18,6 @@ cp sandbox/settings.xml ~/.m2/settings.xml ## Build plugin ## echo Building plugin -cd plugin mvn -q package || exit 1 ## @@ -39,7 +38,6 @@ echo Jenkins started at $JENKINS_URL ## ## Test plugin ## -cd .. cd plugin-test mvn -q test -Djenkins=$JENKINS_URL -Dheadless=true || exit 1 cd .. @@ -48,6 +46,3 @@ cd .. ## Exit ## build_clean - -sleep 5 -echo diff --git a/clean.sh b/clean.sh index a3c93dc..762e963 100755 --- a/clean.sh +++ b/clean.sh @@ -2,15 +2,7 @@ rm -rf target rm -rf work -cd plugin -rm -rf target -rm -rf work -mvn -q clean -cd .. - -cd plugin/violations-plugin mvn -q clean -cd ../.. cd plugin-test mvn -q clean diff --git a/plugin/pom.xml b/pom.xml similarity index 100% rename from plugin/pom.xml rename to pom.xml diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/JvctsLogger.java b/src/main/java/org/jenkinsci/plugins/jvcts/JvctsLogger.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/JvctsLogger.java rename to src/main/java/org/jenkinsci/plugins/jvcts/JvctsLogger.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashDescriptor.java b/src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashDescriptor.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashDescriptor.java rename to src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashDescriptor.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder.java b/src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder.java rename to src/main/java/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/Parser.java b/src/main/java/org/jenkinsci/plugins/jvcts/config/Parser.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/Parser.java rename to src/main/java/org/jenkinsci/plugins/jvcts/config/Parser.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/ParserConfig.java b/src/main/java/org/jenkinsci/plugins/jvcts/config/ParserConfig.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/ParserConfig.java rename to src/main/java/org/jenkinsci/plugins/jvcts/config/ParserConfig.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfig.java b/src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfig.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfig.java rename to src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfig.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfigHelper.java b/src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfigHelper.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfigHelper.java rename to src/main/java/org/jenkinsci/plugins/jvcts/config/ViolationsToStashConfigHelper.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/perform/FullBuildModelWrapper.java b/src/main/java/org/jenkinsci/plugins/jvcts/perform/FullBuildModelWrapper.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/perform/FullBuildModelWrapper.java rename to src/main/java/org/jenkinsci/plugins/jvcts/perform/FullBuildModelWrapper.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformer.java b/src/main/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformer.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformer.java rename to src/main/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformer.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/stash/JvctsStashClient.java b/src/main/java/org/jenkinsci/plugins/jvcts/stash/JvctsStashClient.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/stash/JvctsStashClient.java rename to src/main/java/org/jenkinsci/plugins/jvcts/stash/JvctsStashClient.java diff --git a/plugin/src/main/java/org/jenkinsci/plugins/jvcts/stash/StashInvoker.java b/src/main/java/org/jenkinsci/plugins/jvcts/stash/StashInvoker.java similarity index 100% rename from plugin/src/main/java/org/jenkinsci/plugins/jvcts/stash/StashInvoker.java rename to src/main/java/org/jenkinsci/plugins/jvcts/stash/StashInvoker.java diff --git a/plugin/src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/config.jelly b/src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/config.jelly similarity index 100% rename from plugin/src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/config.jelly rename to src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/config.jelly diff --git a/plugin/src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/help.html b/src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/help.html similarity index 100% rename from plugin/src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/help.html rename to src/main/resources/org/jenkinsci/plugins/jvcts/ViolationsToStashRecorder/help.html diff --git a/plugin/src/test/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformerParseTest.java b/src/test/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformerParseTest.java similarity index 100% rename from plugin/src/test/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformerParseTest.java rename to src/test/java/org/jenkinsci/plugins/jvcts/perform/JvctsPerformerParseTest.java diff --git a/plugin/src/test/java/org/jenkinsci/plugins/jvcts/stash/StashClientFaker.java b/src/test/java/org/jenkinsci/plugins/jvcts/stash/StashClientFaker.java similarity index 100% rename from plugin/src/test/java/org/jenkinsci/plugins/jvcts/stash/StashClientFaker.java rename to src/test/java/org/jenkinsci/plugins/jvcts/stash/StashClientFaker.java diff --git a/plugin/src/test/resources/checkstyle_checkstylefile_1.json b/src/test/resources/checkstyle_checkstylefile_1.json similarity index 100% rename from plugin/src/test/resources/checkstyle_checkstylefile_1.json rename to src/test/resources/checkstyle_checkstylefile_1.json diff --git a/plugin/src/test/resources/checkstyle_checkstylefile_2.json b/src/test/resources/checkstyle_checkstylefile_2.json similarity index 100% rename from plugin/src/test/resources/checkstyle_checkstylefile_2.json rename to src/test/resources/checkstyle_checkstylefile_2.json diff --git a/plugin/src/test/resources/checkstyle_checkstylefile_3_relativePath.json b/src/test/resources/checkstyle_checkstylefile_3_relativePath.json similarity index 100% rename from plugin/src/test/resources/checkstyle_checkstylefile_3_relativePath.json rename to src/test/resources/checkstyle_checkstylefile_3_relativePath.json diff --git a/plugin/src/test/resources/checkstyle_pmdandcheckstyle.json b/src/test/resources/checkstyle_pmdandcheckstyle.json similarity index 100% rename from plugin/src/test/resources/checkstyle_pmdandcheckstyle.json rename to src/test/resources/checkstyle_pmdandcheckstyle.json diff --git a/plugin/src/test/resources/findbugs_code.json b/src/test/resources/findbugs_code.json similarity index 100% rename from plugin/src/test/resources/findbugs_code.json rename to src/test/resources/findbugs_code.json diff --git a/plugin/src/test/resources/freestyle/checkstyle/checkstyle.xml b/src/test/resources/freestyle/checkstyle/checkstyle.xml similarity index 100% rename from plugin/src/test/resources/freestyle/checkstyle/checkstyle.xml rename to src/test/resources/freestyle/checkstyle/checkstyle.xml diff --git a/plugin/src/test/resources/freestyle/checkstyle/checkstyle_relativePath.xml b/src/test/resources/freestyle/checkstyle/checkstyle_relativePath.xml similarity index 100% rename from plugin/src/test/resources/freestyle/checkstyle/checkstyle_relativePath.xml rename to src/test/resources/freestyle/checkstyle/checkstyle_relativePath.xml diff --git a/plugin/src/test/resources/freestyle/findbugs/findbugs.xml b/src/test/resources/freestyle/findbugs/findbugs.xml similarity index 100% rename from plugin/src/test/resources/freestyle/findbugs/findbugs.xml rename to src/test/resources/freestyle/findbugs/findbugs.xml diff --git a/plugin/src/test/resources/freestyle/pmd/pmd.xml b/src/test/resources/freestyle/pmd/pmd.xml similarity index 100% rename from plugin/src/test/resources/freestyle/pmd/pmd.xml rename to src/test/resources/freestyle/pmd/pmd.xml diff --git a/plugin/src/test/resources/pmd_pmdandcheckstyle.json b/src/test/resources/pmd_pmdandcheckstyle.json similarity index 100% rename from plugin/src/test/resources/pmd_pmdandcheckstyle.json rename to src/test/resources/pmd_pmdandcheckstyle.json diff --git a/plugin/src/test/resources/pmd_pmdfile.json b/src/test/resources/pmd_pmdfile.json similarity index 100% rename from plugin/src/test/resources/pmd_pmdfile.json rename to src/test/resources/pmd_pmdfile.json diff --git a/plugin/src/test/resources/pullrequestchanges_1_GET.json b/src/test/resources/pullrequestchanges_1_GET.json similarity index 100% rename from plugin/src/test/resources/pullrequestchanges_1_GET.json rename to src/test/resources/pullrequestchanges_1_GET.json diff --git a/plugin/src/test/resources/pullrequestcomments_GET.json b/src/test/resources/pullrequestcomments_GET.json similarity index 100% rename from plugin/src/test/resources/pullrequestcomments_GET.json rename to src/test/resources/pullrequestcomments_GET.json diff --git a/plugin/src/test/resources/pullrequestcomments_GET_none.json b/src/test/resources/pullrequestcomments_GET_none.json similarity index 100% rename from plugin/src/test/resources/pullrequestcomments_GET_none.json rename to src/test/resources/pullrequestcomments_GET_none.json diff --git a/plugin/src/test/resources/test-resources-placeholder.txt b/src/test/resources/test-resources-placeholder.txt similarity index 100% rename from plugin/src/test/resources/test-resources-placeholder.txt rename to src/test/resources/test-resources-placeholder.txt