Skip to content

[MINSTALL-200] "mvn jar:jar install:install" installs a jar instead of a pom #310

@jira-importer

Description

@jira-importer

Urs Keller opened MINSTALL-200 and commented

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>test-project-parent</artifactId>
    <version>main-SNAPSHOT</version>
    <packaging>pom</packaging>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
 
$ rm -rf ~/.m2/repository/com/example/test-project-parent
$ mvn jar:jar install:install
$ file  ~/.m2/repository/com/example/test-project-parent/main-SNAPSHOT/* 
.../test-project-parent-main-SNAPSHOT.pom: Zip archive data, at least v1.0 to extract, compression method=store
 

The behaviour is different in 3.1.1 where this command will install the pom. The output looks like this:

.../test-project-parent-main-SNAPSHOT.pom: XML 1.0 document text, ASCII text 

Affects: 3.1.2

Issue Links:

  • MNG-8138 Maven internal state should not allow to become "broken"
    ("is caused by")
  • MINSTALL-201 Regression in 3.1.2 when installing pom artifact

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions