Skip to content

java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText #712

Closed
@dabico

Description

@dabico

Describe the bug (required)

After recently upgrading to the next major release, I started getting an error at the end of the build. I think this has something to do with the jgit implementation this plugin ships with, as setting the useNativeGit flag does not produce this error.

Tell us about your plugin configuration (required)

<plugin>
	<groupId>io.github.git-commit-id</groupId>
	<artifactId>git-commit-id-maven-plugin</artifactId>
	<version>8.0.0</version>
	<executions>
		<execution>
			<goals>
				<goal>revision</goal>
			</goals>
			<configuration>
				<commitIdGenerationMode>full</commitIdGenerationMode>
				<generateGitPropertiesFile>true</generateGitPropertiesFile>
				<generateGitPropertiesFilename>
					${project.build.outputDirectory}/git.properties
				</generateGitPropertiesFilename>
				<includeOnlyProperties>
					<includeOnlyProperty>git.branch</includeOnlyProperty>
					<includeOnlyProperty>git.build.time</includeOnlyProperty>
					<includeOnlyProperty>git.build.user.email</includeOnlyProperty>
					<includeOnlyProperty>git.build.user.name</includeOnlyProperty>
					<includeOnlyProperty>git.build.version</includeOnlyProperty>
					<includeOnlyProperty>git.commit.author.time</includeOnlyProperty>
					<includeOnlyProperty>git.commit.committer.time</includeOnlyProperty>
					<includeOnlyProperty>git.commit.id.abbrev</includeOnlyProperty>
					<includeOnlyProperty>git.commit.id.full</includeOnlyProperty>
					<includeOnlyProperty>git.commit.message.short</includeOnlyProperty>
					<includeOnlyProperty>git.commit.message.full</includeOnlyProperty>
					<includeOnlyProperty>git.commit.time</includeOnlyProperty>
					<includeOnlyProperty>git.commit.user.email</includeOnlyProperty>
					<includeOnlyProperty>git.commit.user.name</includeOnlyProperty>
					<includeOnlyProperty>git.remote.origin.url</includeOnlyProperty>
					<includeOnlyProperty>git.tags</includeOnlyProperty>
					<includeOnlyProperty>git.total.commit.count</includeOnlyProperty>
				</includeOnlyProperties>
			</configuration>
		</execution>
	</executions>
</plugin>

Tell us about the Plugin version used (required)

8.0.0

Tell us about the Maven version used (required)

$ mvn --version

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /usr/local/Cellar/maven/3.9.6/libexec
Java version: 11.0.22, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "14.2.1", arch: "x86_64", family: "mac"

Steps to Reproduce (required)

Just executing mvn -DskipTests=true clean package

Are there any stacktraces or any error messages? (required)

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< ch.usi.si.seart:ghs-application >-------------------
[INFO] Building GitHub Search 1.12.1
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ ghs-application ---
[INFO] Deleting /Users/ozrendabic/Desktop/ghs/target
[INFO]
[INFO] --- git-commit-id:8.0.0:revision (default) @ ghs-application ---
[INFO] dotGitDirectory '/Users/ozrendabic/Desktop/ghs/.git'
[INFO] Collected git.build.user.name with value dabico
[INFO] Collected git.build.user.email with value dabico@usi.ch
[INFO] Collected git.branch with value dependabot/maven/master/io.github.git-commit-id-git-commit-id-maven-plugin-8.0.0
[INFO] Collected git.commit.id.full with value 223d3c5ebd4d71ba9b444f683eaba75e0f73ef37
[INFO] Collected git.commit.id.abbrev with value 223d3c5
[INFO] Collected git.commit.user.name with value dependabot[bot]
[INFO] Collected git.commit.user.email with value 49699333+dependabot[bot]@users.noreply.github.com
[INFO] Collected git.commit.message.full with value Bump io.github.git-commit-id:git-commit-id-maven-plugin

Bumps io.github.git-commit-id:git-commit-id-maven-plugin from 7.0.0 to 8.0.0.


updated-dependencies:

  • dependency-name: io.github.git-commit-id:git-commit-id-maven-plugin
    dependency-type: direct:production
    update-type: version-update:semver-major
    ...

Signed-off-by: dependabot[bot] support@github.com
[INFO] Collected git.commit.message.short with value Bump io.github.git-commit-id:git-commit-id-maven-plugin
[INFO] Collected git.commit.time with value 2024-03-05T01:21:50+01:00
[INFO] Collected git.commit.author.time with value 2024-03-05T01:21:50+01:00
[INFO] Collected git.commit.committer.time with value 2024-03-05T01:21:50+01:00
[INFO] Collected git.remote.origin.url with value https://github.com/seart-group/ghs.git
[INFO] Collected git.tags with value
[INFO] Collected git.total.commit.count with value 2370
[INFO] Collected git.build.time with value 2024-03-06T10:01:09+01:00
[INFO] Collected git.build.version with value 1.12.1
[INFO] including property 'git.tags' in results
[INFO] including property 'git.build.version' in results
[INFO] including property 'git.commit.user.name' in results
[INFO] including property 'git.commit.id.abbrev' in results
[INFO] including property 'git.branch' in results
[INFO] including property 'git.total.commit.count' in results
[INFO] including property 'git.build.user.email' in results
[INFO] including property 'git.commit.message.short' in results
[INFO] including property 'git.commit.committer.time' in results
[INFO] including property 'git.commit.user.email' in results
[INFO] including property 'git.commit.id.full' in results
[INFO] including property 'git.commit.time' in results
[INFO] including property 'git.commit.author.time' in results
[INFO] including property 'git.build.time' in results
[INFO] including property 'git.build.user.name' in results
[INFO] including property 'git.commit.message.full' in results
[INFO] including property 'git.remote.origin.url' in results
[INFO] Writing properties file [/Users/ozrendabic/Desktop/ghs/target/classes/git.properties] (for project GitHub Search)...
[INFO]
[INFO] --- build-helper:3.5.0:add-source (default) @ ghs-application ---
[INFO] Source directory: /Users/ozrendabic/Desktop/ghs/target/generated-sources/annotations added.
[INFO]
[INFO] --- kotlin:1.9.22:compile (default) @ ghs-application ---
[INFO] No sources to compile
[INFO]
[INFO] --- spring-boot:2.7.18:build-info (default) @ ghs-application ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ ghs-application ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 6 resources from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.10.1:compile (default-compile) @ ghs-application ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 172 source files to /Users/ozrendabic/Desktop/ghs/target/classes
[INFO]
[INFO] --- kotlin:1.9.22:compile (compile) @ ghs-application ---
[INFO] No sources to compile
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ ghs-application ---
[INFO] skip non existing resourceDirectory /Users/ozrendabic/Desktop/ghs/src/test/resources
[INFO]
[INFO] --- compiler:3.10.1:testCompile (default-testCompile) @ ghs-application ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/ozrendabic/Desktop/ghs/target/test-classes
[INFO]
[INFO] --- kotlin:1.9.22:test-compile (test-compile) @ ghs-application ---
[INFO] No sources to compile
[INFO]
[INFO] --- surefire:2.22.2:test (default-test) @ ghs-application ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jar:3.2.2:jar (default-jar) @ ghs-application ---
[INFO] Building jar: /Users/ozrendabic/Desktop/ghs/target/ghs-application-1.12.1.jar
[INFO]
[INFO] --- spring-boot:2.7.18:repackage (repackage) @ ghs-application ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.330 s
[INFO] Finished at: 2024-03-06T10:01:17+01:00
[INFO] ------------------------------------------------------------------------
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText
at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:85)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jgit.internal.JGitText
... 2 more

Process finished with exit code 0

Is there a (public) project where this issue can be reproduced? (optional)

The project is seart-group/ghs. There is a dedicated branch to this version upgrade: https://github.com/seart-group/ghs/tree/dependabot/maven/master/io.github.git-commit-id-git-commit-id-maven-plugin-8.0.0

Your Environment (optional)

macOS 14.2.1

Context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions