我正在尝试将SVN修订号写入MANIFEST.MF。我添加了maven build number插件,scm连接属性到pom。我的构建号返回null。当我定义revisionOnScmFailure然后它返回测试。我正在使用Collabnet Subversion Edge 1.3.3
有些人说你必须安装SVN客户端。 Tortoise SVN安装在我的电脑上。它在Path System变量中定义。它也不是一个新项目。
我还添加了用户名和密码,在连接到scm连接时尝试了它们
<scm>
<connection>scm:svn:https://remoteip/svn/trunk/psa</connection>
<developerConnection>scm:svn:https://remoteip/svn/trunk/psa</developerConnection>
</scm>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<username>username</username>
<password>password</password>
<revisionOnScmFailure>"test"</revisionOnScmFailure>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- Make this jar executable -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/${project.lib.path}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>${project.lib.path}/</classpathPrefix>
<mainClass>client.gui.MainGuiFrame</mainClass>
</manifest>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>