maven的build的时候报错

杀丶破狼 发布于 2014/10/27 22:40
阅读 5K+
收藏 0
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ webproject ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.118 s
[INFO] Finished at: 2014-10-27T22:39:41+08:00
[INFO] Final Memory: 7M/14M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project webproject: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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.xml是这样配置的

<dependency>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-deploy-plugin</artifactId>
 <version>2.7</version>
</dependency>
其实我也手动加入jar包了,可还是报错

加载中
0
公孙二狗
公孙二狗

这个是plugin,需要放在build的plugins下面,而不是dependency下

    <build>
        <finalName>Demo</finalName>


        <plugins>
            <!-- Web Server Jetty -->
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty.version}</version>
                <configuration>
                    <scanIntervalSeconds>3</scanIntervalSeconds>
                </configuration>
            </plugin>
        </plugins>
    </build>

0
天巧星-浪子燕青
天巧星-浪子燕青
<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.7</version>
</dependency>
试试这个
返回顶部
顶部