[ https://issues.apache.org/jira/browse/MDEPLOY-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899256#comment-17899256 ]
Michaël edited comment on MDEPLOY-318 at 11/18/24 8:39 PM: ----------------------------------------------------------- The root cause of this issue is discussed in https://issues.apache.org/jira/browse/MNG-8138 TLDR; invoking the jar:jar task directly changes the (internal) state of a pom project/module to think it has a jar to deploy. The deploy plugin consequently tries to honor that and that is the behaviour you are observing. The "best" way of solving this is not invoking the tasks directly but using the maven lifecycles and configuring your project accordingly. A shortcut worth trying is to mark skip the maven-jar-plugin for the pom module (mentioned in above ticket) ```xml {color:#d5b778}<plugin>{color}{color:#d5b778} {color} {color:#d5b778} <groupId>{color}org.apache.maven.plugins{color:#d5b778}</groupId>{color}{color:#d5b778} {color} {color:#d5b778} <artifactId>{color}maven-jar-plugin{color:#d5b778}</artifactId>{color} {color:#d5b778} <configuration>{color}{color:#d5b778} <skipIfEmpty>{color}true{color:#d5b778}</skipIfEmpty>{color}{color:#d5b778} </configuration>{color} {color:#d5b778}</plugin>{color} ``` was (Author: JIRAUSER305673): The root cause of this issue is discussed in https://issues.apache.org/jira/browse/MNG-8138 TLDR; invoking the jar:jar task directly changes the (internal) state of a pom project/module to think it has a jar to deploy. The deploy plugin consequently tries to honor that and that is the behaviour you are observing. The "best" way of solving this is not invoking the tasks directly but using the maven lifecycles and configuring your project accordingly. A shortcut worth trying is to mark skip the maven-jar-plugin for the pom module (mentioned in above ticket) {color:#d5b778}<plugin> {color}{color:#d5b778} <groupId>{color}org.apache.maven.plugins{color:#d5b778}</groupId> {color}{color:#d5b778} <artifactId>{color}maven-jar-plugin{color:#d5b778}</artifactId> {color}{color:#d5b778} <configuration> {color}{color:#d5b778} <skipIfEmpty>{color}true{color:#d5b778}</skipIfEmpty> {color}{color:#d5b778} </configuration> {color}{color:#d5b778}</plugin>{color} > version 3.1.2 is uploading jar files to wrong endpoints > ------------------------------------------------------- > > Key: MDEPLOY-318 > URL: https://issues.apache.org/jira/browse/MDEPLOY-318 > Project: Maven Deploy Plugin > Issue Type: Bug > Affects Versions: 3.1.2 > Environment: spring-boot, gitlab > Reporter: Michaël > Assignee: Slawomir Jaranowski > Priority: Major > Attachments: pom.xml, test-maven-deploy-0.0.1.zip, > test-maven-deploy-0.0.2.zip, test-maven-parent-0.0.1.pom, > test-maven-parent-0.0.2.pom > > > hi, i'm using spring-boot, and upon updating to 3.2.6 i noticed that my > parent pom was uploaded corrupted. > {{[FATAL] Non-parseable POM > ~/.m2/repository/nl/intractief/intr-parent/7.1.5/intr-parent-7.1.5.pom: only > whitespace content allowed before start tag and not P (position: > START_DOCUMENT seen P... @1:2) @ > ~/.m2/repository/nl/intractief/intr-parent/7.1.5/intr-parent-7.1.5.pom, line > 1, column 2}} > > * the same parent pom was correctly published using spring-boot 3.2.5 > * the parent pom is correct before publishing in the pipeline (manually > checked the target folder). > * after publishing i see binary stuff as pom (guess: zipped binary content) > * setting the maven-deploy-plugin.version in the project to 3.1.1 solves the > issue. > in the spring-boot project i created an issue about this (see external issue > link) and found another similar issue with a functional workaround. > we think there is an issue with the deployment endpoints in version 3.1.2 it > seems the jars end up at the pom endpoints > > -- This message was sent by Atlassian Jira (v8.20.10#820010)