Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking an artifact with pom packaging fails #34

Open
bazusaladra opened this issue Feb 23, 2022 · 3 comments
Open

Checking an artifact with pom packaging fails #34

bazusaladra opened this issue Feb 23, 2022 · 3 comments

Comments

@bazusaladra
Copy link

bazusaladra commented Feb 23, 2022

image

The plugin loads just the pom.xml contents instead of the cached checksum, did you lose ".sha1" part?

[ERROR] Failed to execute goal org.honton.chas:exists-maven-plugin:0.7.0:local (default) on project microservice-parent: buildChecksum(45b67dfc91df453c7be01ebf541d55cf3e2ac15e) != priorChecksum(<?xml version="1.0" encoding="UTF-8"?>
[ERROR] <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
[ERROR]          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
[ERROR]     <modelVersion>4.0.0</modelVersion>
[ERROR]     <parent>
[ERROR]         <groupId>org.springframework.boot</groupId>
[ERROR]         <artifactId>spring-boot-starter-parent</artifactId>
[ERROR]         <version>2.5.5</version>
[ERROR]     </parent>
[ERROR]     <packaging>pom</packaging>
@chonton
Copy link
Owner

chonton commented Feb 23, 2022

Please run mvn with -X, extract the relevant 'DEBUG' information from the log, and add to this issue report.

@chonton
Copy link
Owner

chonton commented Feb 23, 2022

I assume that version 0.6.0 works?

@bazusaladra
Copy link
Author

Version 0.6.0 works. Now it fails on the checksum comparison for an artifact:

<failIfExists>false</failIfExists>
<cmpChecksum>true</cmpChecksum>
<failIfNotMatch>true</failIfNotMatch>

Debug log:

[DEBUG] Configuring mojo org.honton.chas:exists-maven-plugin:0.7.0:local from plugin realm ClassRealm[plugin>org.honton.chas:exists-maven-plugin:0.7.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@6f94fa3e]
[DEBUG] Configuring mojo 'org.honton.chas:exists-maven-plugin:0.7.0:local' with basic configurator -->
[DEBUG]   (f) artifact = microservice-parent.pom
[DEBUG]   (f) cmpChecksum = true
[DEBUG]   (f) failIfExists = false
[DEBUG]   (f) failIfNotExists = false
[DEBUG]   (f) failIfNotMatch = true
[DEBUG]   (f) localRepository =       id: local
      url: file:///C:/Users/developer/.m2/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]

[DEBUG]   (f) mavenProject = MavenProject: com.company:microservice-parent:0.1.4 @ C:\Users\developer\IdeaProjects\company\company-backend-commons\pom.xml
[DEBUG]   (f) project = com.company:microservice-parent:pom:0.1.4
[DEBUG]   (f) property = maven.install.skip
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@55d58825
[DEBUG]   (f) skip = false
[DEBUG]   (f) skipIfSnapshot = true
[DEBUG]   (f) userProperty = false
[DEBUG] -- end configuration --
[INFO] Checking for artifact at C:\Users\developer\.m2\repository\com\company\microservice-parent\0.1.4\microservice-parent-0.1.4.pom
[DEBUG] checking for resource C:\Users\developer\.m2\repository\com\company\microservice-parent\0.1.4\microservice-parent-0.1.4.pom
[DEBUG] Calculating checksum for C:\Users\developer\IdeaProjects\company\company-backend-commons\pom.xml
[INFO] com.company:microservice-parent:pom:0.1.4 checksum does not match

@bazusaladra bazusaladra changed the title Checkinga n artifact with pom packaging fails Checking an artifact with pom packaging fails Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants