Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connector for maven deployment?

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>[email protected]</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>
like image 209
maxf130 Avatar asked Aug 15 '13 12:08

maxf130


2 Answers

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.

like image 101
Torsten Avatar answered Oct 19 '22 07:10

Torsten


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>
like image 27
shifu.zheng Avatar answered Oct 19 '22 06:10

shifu.zheng