apache / apache/maven-assembly-plugin

[MASSEMBLY-593] jarsigner plugin failes after assembly plugin

Open
#758 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
110
Forks
75
Avg merge
12h 54m
Merged PRs (30d)
10

Description

**[Adrian Stabiszewski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nitegate)** opened **[MASSEMBLY-593](https://issues.apache.org/jira/browse/MASSEMBLY-593?redirect=false)** and commented

This is a regression since version 2.2-beta-5 where this config is working.

Workaround for 2.2.2: It works if the "appendAssemblyId" is set to false.

For me it looks like the jar file is still open by the assembly plugin when the jarsigner plugin tries to sign it.
This becomes visible when you set the option "\true\" on the jarsigner plugin:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jarsigner-plugin:1.2:sign (sign) on project demo: Failed to unsign archive \bugreports\maven-assembly\target\demo-1.0-SNAPSHOT.jar: Failed to delete \bugreports\maven-assembly\target\demo-1.0-SNAPSHOT.jar while trying to rename \bugreports\maven-assembly\target\demo-1.0-SNAPSHOT.jar.unsigned -> [Help 1]

---

**Affects:** 2.2, 2.2.1, 2.2.2

**Attachments:**
- [maven-assembly.zip](https://issues.apache.org/jira/secure/attachment/12714366/maven-assembly.zip) (_2.38 kB_)

1 votes, 3 watchers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the configuration from the attached maven-assembly.zip, focusing on the assembly plugin followed by the jarsigner plugin. Compare behavior with version 2.2-beta-5 and the 2.2.2 workaround using appendAssemblyId=false. Done means the assembled JAR can be signed with removeExistingSignatures enabled without the reported delete or rename failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.