Skip to content

Instantly share code, notes, and snippets.

View olamy's full-sized avatar
🏃‍♂️
running

Olivier Lamy olamy

🏃‍♂️
running
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org</groupId>
<artifactId>foo</artifactId>
<version>1.0-SNAPSHOT</version>
[WARNING] Settings for server archiva-mirror uses legacy format
[WARNING] Settings for server archiva-mirror uses legacy format
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Pipeline Maven Integration Plugin Parent [pom]
[INFO] Pipeline Maven Plugin API [hpi]
[INFO] Maven Spy for the Pipeline Maven Integration Plugin [jar]
[INFO] Pipeline Maven Plugin Database [hpi]
@olamy
olamy / gist:520c29f626ea14f99009604679e6d665
Created July 31, 2023 06:42
Maven cache issue with using org.asciidoctor:asciidoctor-maven-plugin:2.2.4:process-asciidoc
ERROR] Cannot get configured mojo: Unable to load the mojo 'process-asciidoc' (or one of its required components) from the plugin 'org.asciidoctor:asciidoctor-maven-plugin:2.2.4': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) [Guice/ErrorInCustomProvider]: OutOfScopeException: Cannot access Key[type=MavenProject, annotation=[none]] outside of a scoping block
[ERROR] at MojoExecutionScopeModule.configure(MojoExecutionScopeModule.java:47)
[ERROR] \_ installed by: WireModule -> MojoExecutionScopeModule
[ERROR] at AsciidoctorMojo.project(AsciidoctorMojo.java:46)
[ERROR] \_ for field project
[ERROR] while locating AsciidoctorMojo
[ERROR] at ClassRealm[plugin>org.asciidoctor:asciidoctor-maven-plugin:2.2.4, parent: ClassLoaders$AppClassLoader@5ffd2b27]
[ERROR] \_ installed by: WireModule -> PlexusBindingModule
<settings>
<mirrors>
<mirror>
<id>centralhttps</id>
<mirrorOf>central</mirrorOf>
<name>Maven central https</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
</settings>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.701 s
[INFO] Finished at: 2023-02-15T21:11:49+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.28.0:check (default) on project maven-compiler-plugin: The following files had format violations:
[ERROR] src/it/MCOMPILER-517-install-not-recompile/app/src/main/java/module-info.java
[ERROR] @@ -6,9 +6,9 @@
[ERROR] ·*·to·you·under·the·Apache·License,·Version·2.0·(the
<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd">
<configuration>
<enabled>true</enabled>
<remote enabled="true" saveToRemote="true">
<url>http://nginx-cache-service.jenkins.svc.cluster.local:80</url>
</remote>
</configuration>
</cache>
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.2.1:enforce (enforce-java) on project jetty-infinispan-embedded: Execution enforce-java of goal org.apache.maven.plugins:maven-enforcer-plugin:3.2.1:enforce failed: Cannot invoke "org.apache.maven.project.MavenProject.getDependencies()" because "project" is null -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.2.1:enforce (enforce-java) on project jetty-infinispan-embedded: Execution enforce-java of goal org.apache.maven.plugins:maven-enforcer-plugin:3.2.1:enforce failed: Cannot invoke "org.apache.maven.project.MavenProject.getDependencies()" because "project" is null
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:306)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
at org.a
input="./release.txt"
git tag -l > $input
while IFS= read -r line
do
echo "$line"
# 19 because maven-shade-plugin- :)
version=${line:19}
eval "gh release create --generate-notes --title $version $line"
done < "$input"
@olamy
olamy / gist:d651e21fd89b73612a42e3617a1d0261
Last active June 8, 2022 11:08
surefire issue with modules
foo-slf4-impl: with a particular class foo.bar.logging.FooBarHelper
module-info.java
module foo.bar.logging
{
requires transitive org.slf4j;
exports foo.bar.logging;
provides org.slf4j.spi.SLF4JServiceProvider with
foo.bar.logging.Slf4jLoggingServiceProvider;
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/jenkins/agent/workspace/ject_jetty-9.4.x_no_skip_failure/jetty-webapp && /home/jenkins/agent/tools/hudson.model.JDK/jdk8/jre/bin/java -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx8g -Xms2g -XX:+PrintGCDetails org.apache.maven.surefire.booter.ForkedBooter /home/jenkins/agent/workspace/ject_jetty-9.4.x_no_skip_failure/jetty-webapp/target/surefire 2020-09-10T09-01-37_438-jvmRun1 surefire6053626550950799058tmp surefire_103239931600276459121tmp
[ERROR] Error occurred in starting fork, check output in log