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

Cannot deploy tile with composed distributionManagement #29

Closed
Gawen-pjr opened this issue Aug 19, 2015 · 5 comments
Closed

Cannot deploy tile with composed distributionManagement #29

Gawen-pjr opened this issue Aug 19, 2015 · 5 comments

Comments

@Gawen-pjr
Copy link
Contributor

When following the README guide for defining a tile using itself a nexus-release-tile, I get an error when trying to deploy the project.

pom.xml :

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

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.maven.tiles</groupId>
  <artifactId>test-tile</artifactId>
  <packaging>tile</packaging>
  <version>1.0-SNAPSHOT</version>

  <build>
    <plugins>
      <plugin>
        <groupId>io.repaint.maven</groupId>
        <artifactId>tiles-maven-plugin</artifactId>
        <version>2.2</version>
        <extensions>true</extensions>
        <configuration>
          <filtering>false</filtering>
          <tiles>
            <tile>com.example.maven.tiles:nexus-release-tile:[1.0, 2)</tile>
          </tiles>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>

on mvn deploy, I get the following error :

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

But with mvn help:effective-pom, I effectively see the distributionManagement section.

PS : on mvn deploy, the log clearly says that the nexus-release-tile is mixed in the pom.

@talios
Copy link
Member

talios commented Aug 24, 2015

I have a suspicion that tiles can't be used for releases. I remember we wrote that up as an example at the start of the project, but at that stage tiles didn't quite work as expected. Even now, I have a version of this tile that didn't work ( due to various things the release plugin itself does ).

At the time I was too busy to investigate exactly what the release plugin was doing to see why it was failing.

@Gawen-pjr
Copy link
Contributor Author

Thank you for the reply.

As a workaround, I've set the altXXXDeploymentRepository configuration properties of maven-deploy-plugin in my nexus-release-tile. With that the deploy goal works as expected.

@talios
Copy link
Member

talios commented Nov 21, 2015

tiles-maven-plugin 2.5 has now been released and should be in central soon with the release fixes. Note - in order to use oss.sonatype.org you'll also need to use the flatten-maven-plugin.

@rvowles
Copy link
Member

rvowles commented Nov 22, 2015

did we document that? @talios

@talios
Copy link
Member

talios commented Nov 22, 2015

I don't think we have actually - have raised that as #44.

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

3 participants