N
N
Nevars2014-07-05 11:45:11
Java
Nevars, 2014-07-05 11:45:11

How to make a maven module deploy?

Good afternoon. There is a maven module and I want to deploy it in the local repository "/Users/mainUser/.m2/repository". The whole build cycle goes well, but one step does not want to be performed - deploy.
I am using intellijidea. When deploying, this error is displayed

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.043 s
[INFO] Finished at: 2014-07-05T14:45:46+04:00
[INFO] Final Memory: 10M/115M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project Node: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project Node: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.MojoExecutionException: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
  at org.apache.maven.plugin.deploy.DeployMojo.getDeploymentRepository(DeployMojo.java:235)
  at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:118)
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
  ... 25 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

POM looks like this:
<?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>ru.Node</groupId>
    <artifactId>Node</artifactId>
    <version>1.0-RELEASE</version>


</project>

Grateful for any help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tyranron, 2014-07-05
@Tyranron

You may have confused deploy with install. In my experience, installation to a local repository is done precisely through install, and deploy is already uploading to the server after assembly or to a remote repository. To which it swears, they say, you don’t have any “requisites” for this.

B
bit_rainbow, 2014-07-06
@bit_rainbow

install - puts in local
deploy in remote

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question