2013-08-06 12 views
2

我一直在使用多模塊Maven項目,當我執行命令發佈:準備,會發生一些問題:某處有問題,Maven的,當我執行命令釋放:準備

[INFO] Working directory: C:\Java\workspace 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Unable to tag SCM 
Provider message: 
The svn tag command failed. 
Command output: 
svn: E160013: File not found: revision 1065, path '/trunk' 

的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/maven-v4_0_0.xsd"> 

    <modelVersion>4.0.0</modelVersion> 

    <groupId>[hidden].logreport</groupId> 
    <artifactId>logreport</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <packaging>pom</packaging> 

    <modules> 
     <module>../logreport-client</module> 
     <module>../logreport-common</module> 
     <module>../logreport-server</module> 
    </modules> 

    <properties> 
     <encoding>UTF-8</encoding> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> 
     <!-- Timestamp format for the maven.build.timestamp property --> 
     <!-- You can reference property in pom.xml or filtered resources (must 
      enable third-party plugin if using Maven < 2.1) --> 
     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format> 
     <svn.username>[hidden]</svn.username> 
     <svn.password>[hidden]</svn.password> 
    </properties> 

    <dependencies> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>4.11</version> 
      <scope>test</scope> 
     </dependency> 
    </dependencies> 

    <distributionManagement> 
     <repository> 
      <id>[hidden]-releases</id> 
      <url>http://[hidden]/nexus/content/repositories/my-releases/</url> 
     </repository> 
     <snapshotRepository> 
      <id>[hidden]-snapshots</id> 
      <url>http://[hidden]/nexus/content/repositories/my-snapshots</url> 
     </snapshotRepository> 
    </distributionManagement> 

    <scm> 
     <developerConnection>scm:svn:svn://[hidden]/svn/infra/trunk/logreport/</developerConnection> 
     <connection>scm:svn:svn://[hidden]/svn/infra/trunk/logreport/</connection> 
     <url>svn://[hidden]/svn/infra/trunk/logreport/</url> 
    </scm> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-release-plugin</artifactId> 
       <version>2.4.1</version> 
       <configuration> 
        <releaseVersion>0.0.1</releaseVersion> 
        <developmentVersion>0.0.2-SNAPSHOT</developmentVersion> 
        <autoVersionSubmodules>true</autoVersionSubmodules> 
        <resume>false</resume> 
        <username>${svn.username}</username> 
        <password>${svn.password}</password> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 

</project> 

如果我把個標籤<remoteTagging>false</remoteTagging>,另一個問題:

[INFO] Working directory: C:\Java\workspace 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Unable to tag SCM 
Provider message: 
The svn tag command failed. 
Command output: 
svn: E155007: 'C:\Java\workspace' is not a working copy 

我的項目是在「C:\ JA VA \工作空間\ logreport」。

韓國社交協會

+0

這可能不會幫助,但IME,釋放命令不起作用,如果您的項目有extern和錯誤消息不提供信息。您的項目中是否有外部人員? –

+0

你可以顯示完整的文件夾結構如何調用maven以及從哪裏調用maven哪個命令? – khmarbaise

回答

3

通常,如果你有一個多模塊裝配應具有以下結構:

+-- parent (pom.xml) 
     +-- module-1 (pom.xml) 
     +-- module-2 (pom.xml) 

這意味着還具有父位於您的VCS的樹幹(在這種情況下, SVN)。

此外,上述結構的結果是,你的父母是這樣的相似:

<modelVersion>4.0.0</modelVersion> 

<groupId>com.company.logreport</groupId> 
<artifactId>parent</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<packaging>pom</packaging> 

<modules> 
    <module>logreport-client</module> 
    <module>logreport-common</module> 
    <module>logreport-server</module> 
</modules> 

並且將在父這樣的定義只有一次的SCM信息:

<scm> 
    <developerConnection>scm:svn:svn://[hidden]/svn/infra/trunk/</developerConnection> 
    <connection>scm:svn:svn://[hidden]/svn/infra/trunk/</connection> 
    <url>svn://[hidden]/svn/infra/trunk/</url> 
</scm> 

除此之外,你不應該在你的pom中定義密碼。這種事情的預期位置是settings.xml

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
         http://maven.apache.org/xsd/settings-1.0.0.xsd"> 
    ... 
    <servers> 
    <server> 
     <id>svn-server</id> 
     <username>my_login</username> 
     <password>my_password</password> 
    </server> 
    </servers> 
    ... 
</settings> 
相關問題