Maven发布:准备不起作用

时间:2014-10-16 15:13:06

标签: java maven maven-3

我正在使用maven进行模块化项目。我的骨架项目如下:

|-- parent
 |-- model
     pom.xml
 |-- services
     pom.xml
 |-- web-app
     pom.xml

的pom.xml

这是我的父pom.xml:

<project>

<modelVersion>4.0.0</modelVersion>
<groupId>it.myCompany</groupId>
<artifactId>myProject</artifactId>
<version>2.2.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>myProject</name>

<modules>
    <module>model</module>
    <module>services</module>
    <module>web-app</module>
</modules>

<properties>
    <spring.version>3.1.3.RELEASE</spring.version>
</properties>

<scm>
    <connection>scm:svn:svn://192.168.0.11/home/svn/myCompany/myProject/billing/trunk/youtility-billing/</connection>
    <developerConnection>scm:svn:svn://192.168.0.11/home/svn/myCompany/myProject/billing/trunk/youtility-billing/</developerConnection>
</scm>

<build>


    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.2.2</version>
            <dependencies>
                <dependency>
                    <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                    <artifactId>maven-scm-provider-svnjava</artifactId>
                    <version>2.1.1</version>
                </dependency>
            </dependencies>
            <configuration>
                <providerImplementations>
                    <svn>javasvn</svn>
                </providerImplementations>
                <checkModificationExcludes>
                    <checkModificationExclude>.project</checkModificationExclude>
                    <checkModificationExclude>.settings</checkModificationExclude>
                    <checkModificationExclude>.classpath</checkModificationExclude>
                    <checkModificationExclude>target</checkModificationExclude>
                    <checkModificationExclude>gwt-unitCache</checkModificationExclude>
                    <checkModificationExclude>widgetsets</checkModificationExclude>
                    <checkModificationExclude>changes</checkModificationExclude>

                </checkModificationExcludes>

                <arguments>-Dmaven.wagon.http.ssl.insecure=true
                    -Dmaven.wagon.http.ssl.allowall=true</arguments>
            </configuration>
        </plugin>
    </plugins>
</build>





<distributionManagement>
    <repository>
        <id>aiem-releases</id>
        <url>https://192.168.0.18:443/artifactory/releases</url>
    </repository>

    <snapshotRepository>
        <id>aiem-snapshot</id>
        <url>https://192.168.0.18:443/artifactory/snapshot</url>
    </snapshotRepository>
</distributionManagement>

现在,当我运行以下命令(来自父项目)时:

  

mvn release:prepare -DdryRun = t   rue -DautoVersionSubmodules = true -Dusername = user -Dpassword = user

我总是遇到同样的问题:

  

[错误]无法执行目标org.apache.maven.plugins:maven-release-plugin:2.2      .2:在项目myProject上准备(default-cli):Maven执行失败,e      xit代码:'1' - &gt; [帮助1]

我该如何解决?

更新1

模特的Gav

<parent>
    <groupId>it.myCompany</groupId>
    <artifactId>myProject</artifactId>
    <version>2.2.2-SNAPSHOT</version>
</parent>
<artifactId>model</artifactId>

服务的Gav

<parent>
    <groupId>it.myCompany</groupId>
    <artifactId>myProject</artifactId>
    <version>2.2.2-SNAPSHOT</version>
  </parent>
  <artifactId>services</artifactId>

网络应用的Gav

 <parent>
    <groupId>it.myCompany</groupId>
    <artifactId>myProject</artifactId>
    <version>2.2.2-SNAPSHOT</version>
</parent>
<artifactId>web-app</artifactId>
<packaging>war</packaging>

我使用-e选项运行,然后得到:

    [INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2
.2:prepare (default-cli) on project youtility-billing: Maven execution failed, e
xit code: '1' -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.maven.plugins:maven-release-plugin:2.2.2:prepare (default-cli) on proj
ect youtility-billing: Maven execution failed, exit code: '1'
        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.buildProje
ct(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution faile
d, exit code: '1'
        at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(Pr
epareReleaseMojo.java:306)
        at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRe
leaseMojo.java:258)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
        ... 19 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven exec
ution failed, exit code: '1'
        at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(A
bstractRunGoalsPhase.java:89)
        at org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.execute(Ru
nPrepareGoalsPhase.java:44)
        at org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.simulate(R
unPrepareGoalsPhase.java:57)
        at org.apache.maven.shared.release.DefaultReleaseManager.prepare(Default
ReleaseManager.java:202)
        at org.apache.maven.shared.release.DefaultReleaseManager.prepare(Default
ReleaseManager.java:142)
        at org.apache.maven.shared.release.DefaultReleaseManager.prepare(Default
ReleaseManager.java:104)
        at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(Pr
epareReleaseMojo.java:302)
        ... 22 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven ex
ecution failed, exit code: '1'
        at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoal
s(InvokerMavenExecutor.java:395)
        at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoal
s(InvokerMavenExecutor.java:418)
        at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(A
bstractRunGoalsPhase.java:81)
        ... 28 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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

0 个答案:

没有答案