2

I have a simple POM (see below). When I execute mvn deploy I get this error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project piccolotest: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

There is no direct mention of the maven plugin in the pox, so I guess it's grabbed from somewhere else. What am I missing?

Pom file...

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>dk.anderssewerin</groupId>
  <artifactId>piccolotest</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>piccolotest</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

     <dependency>
      <groupId>org.piccolo2d</groupId>
      <artifactId>piccolo2d-core</artifactId>
      <version>1.3.1</version>
    </dependency>

     <dependency>
      <groupId>org.piccolo2d</groupId>
      <artifactId>piccolo2d-examples</artifactId>
      <version>1.3.1</version>
    </dependency>

    <dependency>
      <groupId>org.piccolo2d</groupId>
      <artifactId>piccolo2d-extras</artifactId>
      <version>1.3.1</version>
    </dependency>

  </dependencies>
</project>
Anders Johansen
  • 10,165
  • 7
  • 35
  • 52
  • I've added the definition for the repo to use in `` but I'm still getting the error you are reporting. I'm trying to find where the javadocs are for this version of the plugin `maven-deploy-plugin:2.7`. This is only showing the latest version (3.0.0): https://maven.apache.org/plugins/maven-deploy-plugin/index.html – PatS Oct 06 '22 at 16:10

1 Answers1

1

per packaging-type, in your case jar, is a predefined set of plugins bound to several phases. Since these can change for every new version of Maven it is best practice to lock the versions for these plugins. If you really want to know the location, it's https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-core/src/main/resources/META-INF/plexus/default-bindings.xml;h=09ecba441e61d4a997b01af0171815c558548537;hb=HEAD

Robert Scholte
  • 11,889
  • 2
  • 35
  • 44
  • Yes. But. You are only telling me that the Apache version I use requires this. What I need to know is how to fix the problem and move on. For example since this requirement is a part of my Maven installation, why can't Maven get this missing piece automatically like all the other missing pieces in the fresh install? – Anders Johansen Jan 09 '14 at 10:35
  • That's not the question you asked. Deploying in Maven terms means uploading to a remote repository: a shared storage for your co-workers or the rest of the world. See http://maven.apache.org/repository-management.html for details about repositories. – Robert Scholte Jan 09 '14 at 18:56