12

I have created a working maven archetype for a Vaadin/Hibernate/Spring project. I am able to install this archetype to my local repository and use it to generate new maven projects.

Now I want to deploy the archetype to my companies internal repository, so it might be used by other developers. However, when I run mvn deploy I recieve the following error message:

[ERROR] Failed to execute goal org.apache.maven.plugins:
maven-deploy-plugin:2.7:deploy (default-deploy) on project 
vaadin-hibernate-archetype: Failed to deploy artifacts/metadata: 
No connector available to access repository maven.planet-ic.de 
(maven.planet-ic.de/planet-ic-releases) of type default using the 
available factories WagonRepositoryConnectorFactory -> [Help 1]

What is the connector that I am missing?

EDIT: I am not asking for someone to solve my problem, just some insight as to what the 'connector' is.

Here is my pom.xml if it should be of interest:

<?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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <groupId>de.planetic.maven.archetype.vaadin</groupId>
    <artifactId>vaadin-hibernate-archetype</artifactId>
    <version>1.1.0</version>
    <packaging>jar</packaging>
    <inceptionYear>2013</inceptionYear>
    <description>
        This archetype generates a Vaadin application for use with Hibernate, and to be deployed to a Tomcat 7 server.  It may also work with other Tomcat versions and other servers.
    </description>
    <developers>
        <developer>
            <name>Maximilian Friedersdorff</name>
            <email>max.friedersdorff@planet-ic.de</email>
        </developer>
    </developers>
    <scm>
        <connection>scm:svn:http://subversion.planet-ic.de/internal/maven/archetype/pinnwand-webapp/tags/pinnwand-webapp-archetype-1.1.0</connection>
        <developerConnection>scm:svn:http://subversion.planet-ic.de/internal/maven/archetype/pinnwand-webapp/tags/pinnwand-webapp-archetype-1.1.0</developerConnection>
        <url>http://subversion.planet-ic.de/internal/maven/archetype/pinnwand-webapp/tags/pinnwand-webapp-archetype-1.1.0</url>
    </scm>
    <distributionManagement>
        <repository>
            <id>maven.planet-ic.de</id>
            <name>planet-ic-releases</name>
            <url>maven.planet-ic.de/planet-ic-releases</url>
        </repository>
        <snapshotRepository>
            <id>maven.planet-ic.de</id>
            <name>planet-ic-snapshots</name>
            <url>http://maven.planet-ic.de/planet-ic-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>  
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.4</version>
            </extension>
        </extensions>
    </build>
</project>
Péter Török
  • 114,404
  • 31
  • 268
  • 329
diestl
  • 2,020
  • 4
  • 23
  • 37
  • no relevant stanza from the `pom.xml` means no help –  Aug 15 '13 at 13:20
  • 1
    @JarrodRoberson As I said: I am not looking for help with my particular problem, but for an explanation as to what the 'connector' is. – diestl Aug 15 '13 at 13:36
  • @DB5 Wow! Nice edit. How did you do that? – diestl Aug 15 '13 at 15:33
  • @maxf130, basically just turned on syntax highlighting: http://stackoverflow.com/editing-help#syntax-highlighting – DB5 Aug 16 '13 at 06:47

5 Answers5

15

Depending on the maven repository you are trying to deploy to there are various methods available to upload your artifacts.

These methods are implemented using Maven Wagon connectors for different transport protocols (e.g. ssh,dav etc.), this is the term you are looking for.

Apache Maven Guide to using Extensions gives you an introduction on how to add connectors to your setup.

Torsten
  • 6,184
  • 1
  • 34
  • 31
3

In the following line:

<url>maven.planet-ic.de/planet-ic-releases</url>

You need to add prefix of "file://", because you need to tell maven you are using file connector not ftp, http or something else. And you'd better to use relative path there. For example:

<url>file://${project.basedir}/maven.planet-ic.de/planet-ic-releases/</url>
shifu.zheng
  • 691
  • 7
  • 16
0
 <build>
 <extensions>
    <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>2.4</version>
    </extension>
 </extensions>
 </build>

 <distributionManagement>
 <repository>
  <id>remoteserver</id>
  <name>MyCompany Repository</name>
  <url>scp://server/path/repo</url>
</repository>

0

In case it helps others, adding the following to the pom.xml got it working for me

<build>
  <extensions>
    <extension>
      <groupId>org.springframework.build</groupId>
      <artifactId>aws-maven</artifactId>
      <version>5.0.0.RELEASE</version>
    </extension>
  </extensions>
</build>
Nathan Adams
  • 1,255
  • 1
  • 11
  • 17
0

Was having the same issue with deployment to private repo through sftp instead of scp.

Resolved it by setting the following.

Java 11

pom.xml

    <distributionManagement>
        <repository>
            <id>setting_id</id>
            <url>sftp://maven...../maven</url>
        </repository>
        <snapshotRepository>
            <id>setting_id_snapshot</id>
            <url>sftp://maven...../maven</url>
        </snapshotRepository>
    </distributionManagement>
    <build>
        <plugins>
            <!-- ...other plugins...-->
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ssh</artifactId>
                        <version>3.5.2</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
                </plugin>
        </plugins>
    </build>

settings.xml

    <server>
        <id>server_id</id>
        <username>repo_user</username>
        <privateKey>/var/lib/jenk_user/.ssh/id_rsa</privateKey>
        <directoryPermissions>744</directoryPermissions>
        <filePermissions>664</filePermissions>
    </server>

Had tried using <artifactId>wagon-ssh-external</artifactId> to no success.

Hope somebody finds it helpful.

McAngujo
  • 115
  • 2
  • 8