Code Monkey home page Code Monkey logo

warnings-ng-plugin-devenv's Introduction

Development Environment for Jenkins Quality Assurance Plugins

This docker-based development environment is for new contributors of the Warnings Next Generation and Coverage Plugins to reduce the initial ramp-up time. It consists of the following parts:

  • Scripts to check out all modules of these Jenkins plugins from GitHub. Depending on the part where you want to contribute to, you usually work with just one of these modules. However, it simplifies the development if all modules are already part of the workspace. Then you can switch at any time to one of the other modules.
  • Docker-based Jenkins controller that has all required plugins installed to see these plugins in action. This Jenkins controller is already configured properly using JCasC to build Java modules on a Linux based agent (also provided as docker container). It already contains some jobs that use all of these plugins (tests, coverage, static analysis).
  • IntelliJ project that configures these plugins as Maven modules. This project contains presets of my coding style and some other helpful configurations. Especially, it has runners configured to debug Jenkins plugins either on the controller or agent.

I presented this development environment in a recorded Jenkins Online Meetup in January 2022.

Supported operating systems

The development environment has been tested on macOS, Ubuntu Linux (in a virtual machine running on macOS), and Windows. Pull requests are always welcome.

TLDR

Installation Requirements

Main Development

Latest version of the following tools:

  • Docker and Docker Compose (for Windows and macOS: install Docker Desktop)
  • IntelliJ Ultimate (or Community)
  • Maven
  • JDK 11
  • Git

UI Testing

Latest version of the following tools:

  • firefox and gecko-driver
  • chrome and chrome-driver

Installation Steps

If errors occur, note the troubleshooting hints below.

For Windows users: In order to execute the Shell scripts, use the Git Bash.

  1. Clone and build the plugin modules using the script clone-repos.sh. You must wait until the build succeeds before opening IntelliJ, otherwise IntelliJ will not find all generated classes. First time Maven users need to wait a couple of minutes until all dependencies have been downloaded from Maven central.
  2. Import the project into Intellij:
    1. Start IntelliJ
    2. Select Open...
    3. Select the folder warnings-ng-plugin-devenv
    4. When IntelliJ asks : Maven projects need to be imported select Enable Auto-Import.
    5. When IntelliJ asks : Trust And Open Maven project select Trust Project (see IntelliJ Online Help)
  3. Run the Test Launchers in IntelliJ for analysis-model, code-covarege-api, forensics-api, git-forensics, and warnings-ng.
  4. For Windows users: start Docker Desktop
  5. Start Jenkins with jenkins.sh. This command builds the Jenkins Docker image, downloads all registered plugins and initializes the Jenkins workspace with some jobs. This requires some minutes as well (see Step 9).
  6. Login to Jenkins at: http://localhost:8080/
  7. Use the following credentials:
    • User: admin
    • Password: admin
  8. Start the provided Jenkins jobs that show the analysis results for the modules analysis-model and warnings-ng.
  9. Due to a severe performance problem in Jenkins' Job DSL Plugin the configuration of the jobs requires a lot of time during startup of Jenkins. So we need to remove that section after all jobs have been successfully created: simply delete the jobs section from the JCasC configuration file
    docker/volumes/jenkins-home/jenkins.yml (see original file jenkins.yaml)
  10. Deploy the current HEAD of the plugins to the Jenkins instance using the Launchers in IntelliJ.

Installation - Troubleshooting

Step 1 - Installation failed

If all downloads have succeeded, but the installation failed due to errors, fix them and execute mvn -V -U -e install –DskipTests to retry only the installation.

Step 3 - "Command line is too long."

If the error "Command line is too long." occurs, execute following steps:

  1. Click Edit Configuration and select the failed run configuration (or click on the Test Launcher's name within the error message)
  2. Click Build and run > Modify options > Shorten command line
  3. Within the appeared field Shorten command line, select @argfile (Java9+)
  4. Click Apply and OK and execute the Test Launcher again
  5. (Possibly, IntelliJ has to be restarted if no tests has been found)

Step 3 - Jenkins test timeout

If tests fail due to a Jenkins test timeout, execute following steps:

  1. Click Edit Configuration and select the failed run configuration
  2. Add to VM options: -Djenkins.test.timeout=1000. This increases the timeout limit to 1000 seconds.

Cloning the modules

You can use a simple shell script (clone-repos.sh) to clone the modules of the Warnings plugin in a single step. The script checks out the following modules using the git SSH protocol. This requires that you have registered your public key in GitHub. If you have no keys in GitHub you can alternatively use the script clone-repos-https.sh that uses the HTTPS protocol.

  • analysis-model: A library to read static analysis reports into a Java object model. This module is not depending on Jenkins.
  • analysis-model-api-plugin: A simple wrapper for the analysis model library. It provides the analysis-model classes as a Jenkins plugin. This overhead is required to simplify upgrades of the analysis-model module in Jenkins.
  • code-coverage-api-plugin: A plugin to read code coverage reports and show the corresponding results in Jenkins.
  • forensics-api-plugin: A Jenkins plug-in that defines an API to mine and analyze data from a source control repository.
  • git-forensics-plugin: A Jenkins plugin that mines and analyzes data from a Git repository. It implements all extension points of the forensics-api-plugin.
  • warnings-ng-plugin: The main plugin that contains all steps and UI classes.

Forking some modules

When you are planning to provide a pull request for one of the plugins you need to create a fork of the repository and make all changes in this fork. I created a GitHub collaboration documentation in my coding style project. Currently, this guide is only available in German.

Modifying and debugging code with IntelliJ

IntelliJ (Ultimate) is the main supported development environment for the Warnings plugin. A predefined project is stored in the folder .idea that references all modules of the Warnings plugin. This project contains presets of my coding style and some other helpful configurations.

It should be possible to use other IDEs (Eclipse, Netbeans) as well. The analysis-model library has configuration files (coding style, analysis configuration) for Eclipse. However, these files are not yet available for the other modules.

Running unit and integration tests

Use the provided IntelliJ Run Configurations All in [module-name] to run the unit and integrations tests of the corrsponding module. These configurations are already configured to record the branch coverage of the corresponding module packages (use the Run with Coverage action).

Debugging

Before you can debug your changes you first need to find out where your code is running: on the controller or on the agent? If you are unsure, then run both remote debuggers, set some breakpoints and wait for the corresponding debugger to stop.

Debugging Jenkins controller

The docker compose configuration starts the Jenkins controller automatically in 'Debug' mode, i.e., it is listening to remote debug requests. If your code runs in the controller then you simply need to attach a remote debugger at localhost:8000 (mapped to the same port in the docker container). Use the provided Jenkins Controller (Remote Debugger) Debug configuration to connect a debugger in IntelliJ.

Debugging Jenkins agent

The docker compose configuration also starts the Jenkins agent automatically in 'Debug' mode, i.e., it is listening to remote debug requests. In order to debug your changes you simply need to attach a remote debugger at localhost:8001 (mapped to the same port in the docker container). Use the provided Jenkins Agent (Remote Debugger) Debug configuration to connect a debugger in IntelliJ.

Running UI tests

UI tests can be started using the corresponding launchers UI Tests [module] (Firefox) or UI Tests [module] (Chrome). Note that both launchers require an installation of the corresponding Selenium drivers. If these drivers are not installed in /opt/bin on your local machine then you need to adapt the launcher configurations to match your setup.

All UI tests require to run within a given subject under test (i.e, Jenkins under test, JUT), see Acceptance Test Harness project for more details.

Starting Jenkins

This development environment contains a customized Jenkins installation where you can deploy your modified plugins to, so you can see your changes directly in some preconfigured jobs that use these plugins.

Start the provided Jenkins controller in this project (you need to install docker and docker-compose). Open a terminal and run ./jenkins.sh in the top level folder. This command is a wrapper to docker-compose up: it uses the right user and group settings so that the permissions of the docker volume for the Jenkins home folder are correctly set. This command creates a docker container for the Jenkins controller and one for the Java agent. This will require some time when called the first time since the docker images will be composed. After the images have been created the following two containers will be started:

You can then open Jenkins at the URL http://localhost:8080/. Use the following credentials to log in as administrator:

  • User: admin
  • Password: admin

Volume for JENKINS_HOME

The home directory of the Jenkins controller (JENKINS_HOME) is mounted as a docker volume. I.e., it is visible on the host as a normal directory at ./docker/volumes/jenkins-controller. It will survive sessions and can be changed directly on the host, see official documentation for details. This helps to inspect the files that have been created by the Jenkins controller.

Due to a performance problem in Jenkins' Job DSL plugin, setting up the new Jenkins instance is very slow. Therefore, it makes sense to remove the job's configuration part of your jenkins.yaml file after the Jobs have been created. You can overwrite the content of the file ./docker/volumes/jenkins-home/jenkins.yaml in your newly created Jenkins instance with the content in jenkins-no-jobs.yaml.

Volumes under macOS are quite slow. On my MacBook running the provided Jenkins job of the analysis-model in the docker container is slower than running the same Jenkins job in a docker container that is running in a linux virtual machine on the same MacBook (sounds kind of absurd 😲).

Deploying changed plugins to Jenkins

Once you finished your local development changes (i.e., the unit tests are all green) you should test your changes in Jenkins. This also helps to prepare an integration test or UI test for your change.

Changing analysis model without adding new API methods

If you have only changes in the analysis-model module (and you added no new API methods) then you need to rebuild and install the maven module analysis-model.jar and afterwards rebuild the associated Jenkins wrapper plugin analysis-model-api-plugin. This plugin then needs to be deployed to Jenkins.

This process is simplified by running the script ./bin/go.sh in the analysis-model module, it will install the module analysis-model.jar in your local maven repository. Then this script will build the actual plugin and deploy it to Jenkins.

Changing the warnings plugin

If you have only changes in the warnings-ng plugin then you need to rebuild the Jenkins plugin warnings-ng.jpi and deploy it to Jenkins. You can use one of the following shell scripts for this task:

  • ./bin/clean.sh: Builds the plugin using mvn clean install and deploys it on success into the Jenkins instance.
  • ./bin/go.sh: Builds the plugin using mvn clean install -DskipITs (skips the integration tests) and deploys it on success into the Jenkins instace.
  • ./bin/skip.sh: Builds the plugin using mvn clean install -DskipTests (skips all tests and static analysis) and deploys it on success into the Jenkins instance.

Changing analysis model by adding new API methods

TODO

Changing forensics-api-plugin and git-forensics-plugin

If you have changes in one of the Foresics Plugins (API or Git implementation) then you need to rebuild these Jenkins plugins and deploy them into the Jenkins instance.

To simplify this process run the script ./go.sh in the corresponding plugin folder, it will build the plugin and deploy it on success to Jenkins.

Changing a module with breaking API changes

Before making breaking changes please get in touch with me. Typically, it is possible to make changes backward compatible.

IntelliJ Launchers to deploy the plugins

The build scripts from the last section can also be started using one of the IntelliJ launchers Build and Deploy [module-name]. These launchers build the corresponding plugin and deploy it into Jenkins.

Acceptance Test Harness

UI tests can be started using an IntelliJ launcher configuration or using a command line script. As already mentioned, all UI tests require to run within a given subject under test. In our case we use the latest available Jenkins LTS version and the predefined set of plugins from our docker image.

Running UI tests in IntelliJ

UI tests can be started using the corresponding launchers UI Tests Warnings (Firefox) or UI Warnings Tests (Chrome). Note that both launchers require an installation of the corresponding Selenium drivers. If these drivers are not installed in /opt/bin on your local machine then you need to adapt the launcher configurations to match your setup.

Running UI tests from the console

You can also start the UI tests using the provided shell scrips testFirefox.sh or testChrome.sh. Note that you might need to adapt these scripts as well (see previous section).

warnings-ng-plugin-devenv's People

Contributors

derpzz avatar fo-code avatar kasperheyndrickx avatar simonsymhoven avatar uhafner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

warnings-ng-plugin-devenv's Issues

Some classes not resolved.

I tried setting up the dev environment to take a look at this issue https://issues.jenkins.io/browse/JENKINS-64657.

IntelliJ cannot find import static edu.hm.hafner.analysis.assertions.Assertions.*; in IssueFilterTest.java and also the Messages class in
public String getDisplayName() { return Messages.Warnings_Doxygen_ParserName(); } in Doxygen.java is not being found.

Could you help me out here?
Thanks

Failing benchmarks when running from intellij

In both 'all in warnings-ng' and 'all in analysis-model', there failures on some benchmarks, all with the same error:

No benchmarks to run; check the include/exclude regexps.
at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:265)
at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
at io.jenkins.plugins.analysis.warnings.tasks.TaskScannerBenchmark.benchmark(TaskScannerBenchmark.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

"TaskScannerBenchmark_jmhType_B3", "TaskScannerBenchmark_jmhType_B1", "TaskScannerBenchmark_jmhType_B2", "TaskScannerBenchmark_jmhType"

These tests are skipped in maven, but not in intellij

Linux/Arm devenv Errors

This devenv doesn't work for linux out of the box, as there is no arm/linux image for docker.io/jenkins/jenkins:alpine

Could not start the provided jobs

I have successfully set up the environment following the Installation Step and everything looks fine. After I login in the Jenkins, there are 5 five jobs listing, but I just cannot start any job or trigger a build action using the 'build now' bottom as I do before using Jenkins, because there is no such a bottom in the side-panel. It just shows me a no workspace error like this:

2020-02-15 12-45-56 的屏幕截图

I don't know what's the problem, maybe it didn't successfully connect to the remote repositories? Or are there any other ways to start the jobs?

Also, I found that there some missing plugins like boostrap4-api-plugin or plugin-util-api-plugin in _clone.sh. These plugins are in go.sh and I have to manually clone the plugins in order to deploy the warnings-ng-plugin and analysis-model-plugin successfully, or it will trigger the Jenkins missing instance exception. Are they necessary to the whole project, I can make a PR to help complete them in _clone.sh.

Processing provided DSL script takes so long

the Processing provided DSL script step in the docker image takes around 20 Mins to complete. is this normal ?? what can I do to mitigate this effect as it hinders the development tremendously.

here is an example from the logs
`jenkins-controller_1 | 2022-02-20 21:26:24.916+0000 [id=47] WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration#metaClass: type is abstract but not Describable.
jenkins-controller_1 | Processing provided DSL script

jenkins-controller_1 | 2022-02-20 21:43:01.714+0000 [id=47] INFO j.j.plugin.JenkinsJobManagement#createOrUpdateConfig: createOrUpdateConfig for pipeline-codingstyle`

Could not install java code after git clone in _clone.sh

I am trying to setup the dev environment for warnings-ng-plugin and got some trouble at installation step 1.
Git clone worked well inside the clone script, but I got an error message during the build phase of the packages

Run commands in following order:

  1. $ git clone https://github.com/uhafner/warnings-ng-plugin-deven.git
  2. $ cd warnings-ng-plugin-deven
  3. $ bash clone-repos-https.sh
Clone of Jenkins plugins using HTTPS
Press any key to continue...

[...SKIPPING LOG OF GIT CLONE...]

Done cloning. Note that you need to change the remotes for each
of the repositories you want to contribute to.
Press any key to compile the projects...
Apache Maven 3.0.5 (Red Hat 3.0.5-17)
Maven home: /usr/share/maven
Java version: 1.8.0_242, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.9.184-linuxkit", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.ArrayIndexOutOfBoundsException: 31759 -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.ArrayIndexOutOfBoundsException: 31759
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 31759
        at org.codehaus.plexus.util.xml.pull.MXParser.parsePI(MXParser.java:2470)
        at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1257)
        at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1105)
        at org.codehaus.plexus.util.xml.pull.MXParser.nextTag(MXParser.java:1090)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parsePluginExecution(MavenXpp3ReaderEx.java:3541)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parsePlugin(MavenXpp3ReaderEx.java:3336)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parseBuildBase(MavenXpp3ReaderEx.java:1398)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parseProfile(MavenXpp3ReaderEx.java:3751)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parseModel(MavenXpp3ReaderEx.java:2809)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:4627)
        at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:837)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:118)
        at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:91)
        at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:77)
        at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:456)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:261)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:410)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:379)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:495)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:379)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:343)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
        at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        ... 11 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException

Java Version:
$ java -version

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

Operation System
CentOS Linux release 7.6.1810 (Core)

Maven Version
mvn --version

Apache Maven 3.0.5 (Red Hat 3.0.5-17)
Maven home: /usr/share/maven
Java version: 1.8.0_242, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.9.184-linuxkit", arch: "amd64", family: "unix"

The ~/.m2/repository/ is empty.

Does exist some advice to fix it?

Thanks.

Error when running jenkins.sh script

Trying to setup dev environment and I am getting below error when running jenkins.sh script,

jenkins-master_1 | touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
jenkins-master_1 | Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
jenkins-master_1 | touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
jenkins-master_1 | Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
warnings-ng-plugin-devenv_jenkins-master_1 exited with code 1
jenkins-master_1 | touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
jenkins-master_1 | Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?

Please help me fix this error.
Thanks!

'dependencies.dependency.version' for org.jenkins-ci.plugins:antisamy-markup-formatter:jar is missing.

following the installation steps I get the following error,

PS C:\Users\hussenhes\self-learn\jenkins\warnings-ng-plugin-devenv> mvn -V -U -e install -DskipTests
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: C:\Program Files\apache-maven-3.8.4
Java version: 11.0.10, vendor: AdoptOpenJDK, runtime: C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] The artifact xml-apis:xml-apis:jar:2.0.2 has been relocated to xml-apis:xml-apis:jar:1.0.b2
Downloading from central: https://repo.maven.apache.org/maven2/org/jenkins-ci/tools/maven-hpi-plugin/3.22/maven-hpi-plugin-3.22.pom
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:3.22 is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/org/jenkins-ci/tools/maven-hpi-plugin/3.22/maven-hpi-plugin-3.22.jar
[WARNING] Failed to build parent project for org.jvnet.hudson.plugins:analysis-pom:pom:5.18.0
[WARNING] Failed to build parent project for io.jenkins.plugins:analysis-model-api:hpi:10.10.0-SNAPSHOT
[WARNING] Failed to build parent project for org.jvnet.hudson.plugins:analysis-pom:pom:5.18.0
[WARNING] Failed to build parent project for io.jenkins.plugins:code-coverage-api:hpi:3.0.0-SNAPSHOT
[WARNING] Failed to build parent project for org.jvnet.hudson.plugins:analysis-pom:pom:5.18.0
[WARNING] Failed to build parent project for io.jenkins.plugins:forensics-api:hpi:1.8.0-SNAPSHOT
[WARNING] Failed to build parent project for org.jvnet.hudson.plugins:analysis-pom:pom:5.18.0
[WARNING] Failed to build parent project for io.jenkins.plugins:git-forensics:hpi:1.4.0-SNAPSHOT
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.plugins:antisamy-markup-formatter:jar is missing. @ io.jenkins.plugins:warnings-ng:${revision}${changelist}, C:\Users\hussenhes\self-learn\jenkins\warnings-ng-plugin-devenv\warnings-ng-plugin\plugin\pom.xml, line 169, column 17
 @
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.jenkins-ci.plugins:antisamy-markup-formatter:jar is missing. @ io.jenkins.plugins:warnings-ng:${revision}${changelist}, C:\Users\hussenhes\self-learn\jenkins\warnings-ng-plugin-devenv\warnings-ng-plugin\plugin\pom.xml, line 169, column 17

adding an explicit 2.5 tag to the aforementioned dependency solves the problem. So I am wondering is this a know problem or it is related to my setup.

Iam using maven 3.8.4 on windows 10

Cannot resolve edu.hm.hafner:analysis-model:test-jar

I just added some more keywords to the pattern in NagFortranParser.java.
warnings-ng-plugin-devenv/analysis-model/src/main/java/edu/hm/hafner/analysis/parser/NagFortranParser.java

I wanted to test them, so I've only done the steps with first steps of README.md file. (Cloning the repositories and isntalling IntelliJ) I did not install Docker, Jenkins, since I did not want to test the UI or anything further. What I wanted to test was the file
warnings-ng-plugin-devenv/analysis-model/src/test/java/edu/hm/hafner/analysis/parser/NagFortranParserTest.java

I created a JUnit Run Configuration to just run this test file, but I get this error message.
java: package edu.hm.hafner.analysis.assertions does not exist

I am guessing that package should have come from Maven, but Maven has this error message
Cannot resolve edu.hm.hafner:analysis-model:test-jar

I am on Windows.

Can you please help me? If you need any more information please let me know.

wrote new parser, but I get "java.lang.NoSuchMethodError: No such DSL method"

Hello,
I added a new parser. But when testing it with jenkins

recordIssues tool:codeChecker(pattern: 'b/static_analysis_report.txt', name: 'Codechecker')

I get:

java.lang.NoSuchMethodError: No such DSL method 'codeChecker' found among steps [archive, bat, build, catchError, checkout, 

in the attached screenshot you can see it is listed in symbols.
I feel I am so close. But maybe I made a beginner mistake.

I did setup the jenkins pipeline in another jenkins instance, where I manually uploaded 'warnings-ng.hpi' and 'analysis-model-api.hpi' to. I did not use the docker instance from this devenv.
My repositories are:
https://github.com/ferkulat/analysis-model/tree/add_parser_for_codechecker
https://github.com/ferkulat/warnings-ng-plugin/tree/add_parser_for_codechecker

I did not want to make a pull request, because its not done yet.
But I could do that anyway, if that is better for discussion.

Screenshot from 2021-10-31 21-15-00
.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.