Skip to content

Instantly share code, notes, and snippets.

View cyrille-leclerc's full-sized avatar

Cyrille Le Clerc cyrille-leclerc

View GitHub Profile
@cyrille-leclerc
cyrille-leclerc / maven-settings.xml
Last active August 27, 2023 13:57
Maven's default settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
file-system-maven-settings
-->
<!--
| This is the configuration file for Maven. It can be specified at two levels:
|
| 1. User Level. This settings.xml file provides configuration for a single user,
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
at org.jacoco.core.internal.flow.ClassProbesVisitor.<init>(ClassProbesVisitor.java:37)
at org.jacoco.core.internal.flow.ClassProbesVisitor.<init>(ClassProbesVisitor.java:27)
at org.jacoco.core.internal.analysis.ClassAnalyzer.<init>(ClassAnalyzer.java:49)
at org.jacoco.core.analysis.Analyzer$1.<init>(Analyzer.java:96)
at org.jacoco.core.analysis.Analyzer.createAnalyzingVisitor(Analyzer.java:93)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:122)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:140)
Caused: java.io.IOException: Error while analyzing /var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins7200712938350270590test/jobs/jar-with-jacoco/builds/1/jacoco/classes/com/example/MonoModuleMavenApp.class.
@cyrille-leclerc
cyrille-leclerc / 1-script.sh
Created September 21, 2018 16:36
docker inspect
docker inspect openjdk:10-jre-slim
@cyrille-leclerc
cyrille-leclerc / dockerhub-webhook.json
Created September 21, 2018 16:30
dockerhub-webhook.json
{
"callback_url": "https://registry.hub.docker.com/u/svendowideit/testhook/hook/2141b5bi5i5b02bec211i4eeih0242eg11000a/",
"push_data": {
"images": [
"27d47432a69bca5f2700e4dff7de0388ed65f9d3fb1ec645e2bc24c223dc1cc3",
"51a9c7c1f8bb2fa19bcd09789a34e63f35abb80044bc10196e304f6634cc582c",
"..."
],
"pushed_at": 1.417566161e+09,
"pusher": "trustedbuilder",
<mavenExecution _time="2018-04-13 13:42:31.856">
<context _time="2018-04-13 13:42:31.877">
<systemProperties/>
<versionProperties/>
<workingDirectory/>
<userProperties/>
<plexus/>
</context>
<DefaultSettingsBuildingRequest class="org.apache.maven.settings.building.DefaultSettingsBuildingRequest" _time="2018-04-13 13:42:32.008">
<userSettingsFile>/Users/cyrilleleclerc/.m2/settings.xml</userSettingsFile>

Success

node {
    // withMaven (maven: "maven-3.5.3") {
        git "https://github.com/cyrille-leclerc/maven-compiler-plugin.git"
        sh "mvn -U -Prun-its  clean verify"
 //}

https://issues.jenkins-ci.org/browse/JENKINS-50099

The list of dependencies did NOT catch the my-war dependency. Maybe because it is a "runtime" dependency.

<DependencyResolutionResult 
   class="org.apache.maven.project.DefaultDependencyResolutionResult" 
   _time="2018-03-15 19:33:54.275">
 
@cyrille-leclerc
cyrille-leclerc / Jenkinsfile.groovy
Created March 10, 2018 23:45
Jenkinsfile Release Maven Artifact and Submit Jira compliance Issue
node {
def pom
stage ("Release") {
deleteDir()
git 'https://github.com/cyrille-leclerc/my-jar.git'
withMaven(maven: "maven-3.5.2") {
sh "mvn release:prepare release:perform"
}
@cyrille-leclerc
cyrille-leclerc / 0-README.md
Last active March 3, 2018 17:26
JENKINS-49536 java.lang.IllegalArgumentException: Cannot relativize ... relatively to ... when building a subdirectory with a module in a sibling directory
[withMaven] artifactsPublisher - FAILURE to archive 
        workspace/source/project/pom.xml 
        under test/project/0.0.1-SNAPSHOT/project-0.0.1-SNAPSHOT.pom, 
        file not found in workspace /Users/cyrilleleclerc/git/jenkins/pipeline-maven-plugin/jenkins-plugin/work/jobs/JENKINS-49536/workspace/source/root
[withMaven] artifactsPublisher - FAILURE to archive workspace/source/project/target/project-0.0.1-SNAPSHOT.jar under test/project/0.0.1-SNAPSHOT/project-0.0.1-SNAPSHOT.jar, file not found in workspace /Users/cyrilleleclerc/git/jenkins/pipeline-maven-plugin/jenkins-plugin/work/jobs/JENKINS-49536/workspace/source/root
[withMaven] artifactsPublisher - Archive artifact pom.xml under test/root/0.0.1-SNAPSHOT/root-0.0.1-SNAPSHOT.pom
[withMaven] junitPublisher - Archive test results for Maven artifact test:project:0.0.1-SNAPSHOT generated by maven-surefire-plugin:test (default-test): workspace/source/project/target/surefire-reports/*.xml
@cyrille-leclerc
cyrille-leclerc / jenkins.log
Created February 21, 2018 13:05
CJP 2.89.4.2-rolling startup failure
+ export JENKINS_HOME=/opt/jenkins/jenkins-home
+ JENKINS_HOME=/opt/jenkins/jenkins-home
+ export JENKINS_EXTRA_CLASSPATH=/opt/jenkins/extra-classpath/
+ JENKINS_EXTRA_CLASSPATH=/opt/jenkins/extra-classpath/
+ mkdir -p /opt/jenkins/jenkins-home
+ java -Xmx512m -Xbootclasspath/a:/opt/jenkins/extra-classpath/ -Djava.io.tmpDir=/Users/cleclerc/tmp -jar /opt/jenkins/jenkins.war --httpPort=8090 --webroot=/opt/jenkins/jenkins-home-webroot --pluginroot=/opt/jenkins/jenkins-home-pluginroot
Running from: /opt/jenkins/jenkins.war
Feb 21, 2018 2:00:21 PM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file /var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/winstone/jenkins.war
Feb 21, 2018 2:00:21 PM org.eclipse.jetty.util.log.Log initialized