Thank you Ullrich and all.
I was able to import and build jenkins as follows:

1) git clone https://github.com/jenkinsci/jenkins.git
2) cd jenkins; mvn install -DskipTests
3) Started inlellij, imported and built the projects, no errors just tons
of warnings.

I now want to debug the jenkins.war. I created a debug configuration
following
https://stackoverflow.com/questions/21114066/attach-intellij-idea-debugger-to-a-running-java-process
.

Then I started the application using the command: mvnDebug jenkins-dev:run
and connected from intellij,
I saw a bunch of info in the terminal windows where I ran mvnDebug and
finally the error:

mvnDebug jenkins-dev:run
Preparing to execute Maven in debug mode
Listening for transport dt_socket at address: 8000
[INFO] Scanning for projects...
[WARNING] The POM for
org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.0 is missing, no
dependency information available
[WARNING] Failed to retrieve plugin descriptor for
org.apache.maven.plugins:maven-checkstyle-plugin:3.0: Plugin
org.apache.maven.plugins:maven-checkstyle-plugin:3.0 or one of its
dependencies could not be resolved: Failure to find
org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.0 in
http://repo.jenkins-ci.org/public/ was cached in the local repository,
resolution will not be reattempted until the update interval of
repo.jenkins-ci.org has elapsed or updates are forced
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is
missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for
org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin
org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could
not be resolved: Failure to find
org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in
http://repo.jenkins-ci.org/public/ was cached in the local repository,
resolution will not be reattempted until the update interval of
repo.jenkins-ci.org has elapsed or updates are forced
Downloading from repo.jenkins-ci.org:
http://repo.jenkins-ci.org/public/org/apache/maven/plugins/maven-metadata.xml
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading from central:
https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading from repo.jenkins-ci.org:
http://repo.jenkins-ci.org/public/org/codehaus/mojo/maven-metadata.xml
Downloaded from repo.jenkins-ci.org:
http://repo.jenkins-ci.org/public/org/apache/maven/plugins/maven-metadata.xml
(9.9 kB at 15 kB/s)
Downloaded from repo.jenkins-ci.org:
http://repo.jenkins-ci.org/public/org/codehaus/mojo/maven-metadata.xml (20
kB at 30 kB/s)
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
(14 kB at 19 kB/s)
Downloaded from central:
https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
(20 kB at 28 kB/s)
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2.402 s
[INFO] Finished at: 2019-01-03T16:34:25-08:00
[INFO]
------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'jenkins-dev' in the current project and
in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]
available from the repositories [local (/home/gerry/.m2/repository),
repo.jenkins-ci.org (http://repo.jenkins-ci.org/public/), central (
https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[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/NoPluginFoundForPrefixException


On Thu, Jan 3, 2019 at 3:23 PM Ullrich Hafner <[email protected]>
wrote:

> Building is quite easy:-) Just importing it into an IDE is complex since
> Jenkins uses a lot of hacks around the maven infrastructure so it does not
> work out of the box.
>
> E.g., the compile error in IntelliJ is due to missing generated resource
> files. These generated sources are not picked up automatically. You need to
> make sure that the folder target/generated-sources/localizer is recognized
> as source folder.
>
> Am 03.01.2019 um 21:19 schrieb Gerry Storm <[email protected]>:
>
> I'm a bit surprised. jenkins is widely used and it looks looks like there
> are tons of contributors. I assumed it would be a breeze to build it from
> the source. I wonder if this is just my bad luck?
>
> On Thu, Jan 3, 2019 at 12:08 PM Gerry Storm <[email protected]> wrote:
>
>> I have tried inlelliji and still got one error when building projects:
>> Error:(26, 25) java: package hudson.cli.client does not exist
>>
>> in cli/src/main/java/hudson/cli/CLI.java at "import
>> hudson.cli.client.Messages;"
>>
>>
>>
>> On Thu, Jan 3, 2019 at 8:56 AM Jan Monterrubio <[email protected]>
>> wrote:
>>
>>> I personally use intellij idea, since it lets you import a project ( and
>>> if it is maven it will wire things up on its own).
>>>
>>> https://blog.jetbrains.com/idea/2008/03/opening-maven-projects-is-easy-as-pie/
>>>
>>>
>>> On Thu, Jan 3, 2019 at 10:55 AM Gerry Storm <[email protected]>
>>> wrote:
>>>
>>>> Thank you all very much. I am not particularly fond of Eclipse per se.
>>>> I have used it in the past and it was my first choice. If you think Apache
>>>> NetBeans or IntelliJ IDEA are better I will switch to one of those. Which
>>>> one would you recommend and are there instructions available I could 
>>>> follow?
>>>>
>>>>
>>>> On Thu, Jan 3, 2019 at 5:17 AM Steffen Elste <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>> after i modified the pom.xml of the *cli* project to include
>>>>>
>>>>>         <plugin>
>>>>>          <groupId>org.codehaus.mojo</groupId>
>>>>>          <artifactId>build-helper-maven-plugin</artifactId>
>>>>>          <version>3.0.0</version>
>>>>>          <executions>
>>>>>              <execution>
>>>>>                  <id>add-source</id>
>>>>>                  <phase>generate-sources</phase>
>>>>>                  <goals>
>>>>>                      <goal>add-source</goal>
>>>>>                  </goals>
>>>>>                  <configuration>
>>>>>                      <sources>
>>>>>
>>>>>  <source>${project.build.directory}/generated-sources/localizer</source>
>>>>>                      </sources>
>>>>>                  </configuration>
>>>>>              </execution>
>>>>>          </executions>
>>>>>       </plugin>
>>>>>
>>>>>
>>>>> and re-imported everything the build path is set up correctly.
>>>>> Cheers,
>>>>>
>>>>> Steffen
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/46b79a6d-78d1-48f5-b1dd-8798eb82a9bc%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/46b79a6d-78d1-48f5-b1dd-8798eb82a9bc%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/jenkinsci-users/CA%2BQZycn1-AO%2BrC5KhRi_QJwfJtxXzZdjrvs9-9kcjf5p2rjbNw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CA%2BQZycn1-AO%2BrC5KhRi_QJwfJtxXzZdjrvs9-9kcjf5p2rjbNw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9LAebb%2B-0tXsf2Vx5uCeKO0c7Rj4Ze8-uNiZCGpDtoS0A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9LAebb%2B-0tXsf2Vx5uCeKO0c7Rj4Ze8-uNiZCGpDtoS0A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CA%2BQZyc%3DOS1WdsNQS-fScq0ukj0r-dfSWSoO3%2BBG1T92aCChKRw%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CA%2BQZyc%3DOS1WdsNQS-fScq0ukj0r-dfSWSoO3%2BBG1T92aCChKRw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/0BCF8480-4FE1-49E1-8B5D-138E2CB8EE0D%40gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/0BCF8480-4FE1-49E1-8B5D-138E2CB8EE0D%40gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BQZycma2mGcFXLr%3DJPHDEyRGEu1O8EJnFR5yurMJqeTKMshkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to