diff --git a/demos/warnings/README.md b/demos/warnings/README.md deleted file mode 100644 index c41e020de0..0000000000 --- a/demos/warnings/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Configure Warnings Next Generation Plugin - -The available parsers of the [Warnings Next Generation Plugin](https://plugins.jenkins.io/warnings-ng) -can be specified using the following sample configuration. Afterwards, -these parsers are shown in the `Groovy Based Warnings Parsers` section of the system configuration. - -## Sample configuration (parsers) - -Required plugin version: 5.0.0 or newer. - -```yaml -unclassified: - warningsParsers: - parsers: - - name: "Example parser" - id: example-id - regexp: "^\\s*(.*):(\\d+):(.*):\\s*(.*)$" - script: | - import edu.hm.hafner.analysis.Severity - builder.setFileName(matcher.group(1)) - .setLineStart(Integer.parseInt(matcher.group(2))) - .setSeverity(Severity.WARNING_NORMAL) - .setCategory(matcher.group(3)) - .setMessage(matcher.group(4)) - return builder.buildOptional(); - example: "somefile.txt:2:SeriousWarnings:SomethingWentWrong" -``` - -This `Example Parser` parser will parse the following warning from the console log: -```text -somefile.txt:2:SeriousWarnings:SomethingWentWrong -``` - -It will produce a warning with the following properties: - -| property | value | -|-------------|--------------------| -| file name | somefile.txt | -| line number | 2 | -| severity | NORMAL | -| category | SeriousWarnings | -| type | - | -| message | SomethingWentWrong | - -See [documentation](https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md) of the -Warnings Next Generation Plugin for more details about the parsers. diff --git a/integrations/pom.xml b/integrations/pom.xml index 6f2d018196..28d5ff3839 100644 --- a/integrations/pom.xml +++ b/integrations/pom.xml @@ -15,6 +15,7 @@ true 2.11.3 4.1.52.Final + 2.263.1 @@ -193,6 +194,12 @@ commons-validator commons-validator 1.7 + + + commons-beanutils + commons-beanutils + + @@ -360,13 +367,6 @@ - - org.jvnet.hudson.plugins - warnings - 5.0.2 - test - - @@ -708,15 +708,10 @@ commons-compress 1.20 - - org.slf4j - slf4j-api - 1.7.28 - io.jenkins.tools.bom - bom-2.222.x - 13 + bom-2.263.x + 20 import pom diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/WarningsTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/WarningsTest.java deleted file mode 100644 index 49af038bfb..0000000000 --- a/integrations/src/test/java/io/jenkins/plugins/casc/WarningsTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package io.jenkins.plugins.casc; - -import io.jenkins.plugins.analysis.warnings.groovy.GroovyParser; -import io.jenkins.plugins.analysis.warnings.groovy.ParserConfiguration; -import io.jenkins.plugins.casc.misc.ConfiguredWithReadme; -import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule; -import org.junit.Rule; -import org.junit.Test; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsCollectionWithSize.hasSize; -import static org.junit.Assert.assertNotNull; - - -/** - * @author v1v (Victor Martinez) - */ -public class WarningsTest { - - @Rule - public JenkinsConfiguredWithReadmeRule j = new JenkinsConfiguredWithReadmeRule(); - - @Test - @ConfiguredWithReadme("warnings/README.md") - public void configure_warnings() throws Exception { - final ParserConfiguration configuration = ParserConfiguration.getInstance(); - assertNotNull(configuration); - assertThat(configuration.getParsers(), hasSize(1)); - GroovyParser parser = configuration.getParsers().get(0); - assertThat(parser.getId(), is("example-id")); - assertThat(parser.getName(), is("Example parser")); - assertThat(parser.getRegexp(), is("^\\s*(.*):(\\d+):(.*):\\s*(.*)$")); - assertThat(parser.getScript(), containsString("import edu.hm.hafner.analysis.Severity")); - assertThat(parser.getExample(), is("somefile.txt:2:SeriousWarnings:SomethingWentWrong")); - } -}