mirror of https://github.com/apache/cloudstack.git
storpool: fix pom.xml which caused docker image build failures (#7845)
steps to reproduce the issue: - git clone https://github.com/apache/cloudstack.git - cd cloudstack - rm -rf .git/ - run `mvn -P developer,systemvm clean install` Without this PR, it fails with error ``` > [ 8/10] RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install: 668.1 [ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:4.9.10:revision (get-the-git-infos) on project cloud-plugin-storage-volume-storpool: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml -> [Help 1] ```
This commit is contained in:
parent
1605b2f0db
commit
d9319e645c
|
|
@ -69,6 +69,31 @@
|
|||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.gmaven</groupId>
|
||||
<artifactId>gmaven-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>set-properties</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<providerSelection>1.7</providerSelection>
|
||||
<source>
|
||||
File git = new File("./.git")
|
||||
if (!git.exists()) {
|
||||
pom.properties['storpool.skip.git.properties'] = 'true'
|
||||
} else {
|
||||
pom.properties['storpool.skip.git.properties'] = 'false'
|
||||
}
|
||||
</source>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
|
|
@ -96,6 +121,7 @@
|
|||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skip>${storpool.skip.git.properties}</skip>
|
||||
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
|
||||
<prefix>git</prefix>
|
||||
<verbose>false</verbose>
|
||||
|
|
|
|||
Loading…
Reference in New Issue