Reputation: 2055
I have using intellij for creating a maven project.The intellij contains maven plug in apache-maven-3.3.9.When i deploy the project i got the following error.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project MyProject: Failed to deploy artifacts/metadata: Cannot access scp://repo/maven2 with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access scp://repo/maven2 using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR] role: org.apache.maven.wagon.Wagon
[ERROR] roleHint: scp
Below is my pom file.
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MyProject</groupId>
<artifactId>MyProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<spring.version>4.2.5.RELEASE</spring.version>
<hibernate.version>4.2.2.Final</hibernate.version>
</properties>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>corp1</id>
<name>Corporate Repository</name>
<url>scp://repo/maven2</url>
<layout>default</layout>
</repository>
</distributionManagement>
<dependencies>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
I don't know what i am doing wrong here.Please help me.
Upvotes: 0
Views: 2238
Reputation: 120
The deployment in your example refers to deploying the project artefact (the war file) into a Maven repository somewhere in your organisation.
Deploying your application to an application container such as Tomcat is best done using a plugin such as tomcat-maven-plugin, see the tutorial that Hohenheim mentioned.
Upvotes: 1