Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.mytest.test</groupId>
- <artifactId>test-tag</artifactId>
- <version>${revision}</version>
- <description>Test</description>
- <properties>
- <ChangeType>TO_BE_SET</ChangeType>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>1.5</version>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <providerSelection>2.0</providerSelection>
- <properties>
- <script>git describe --abbrev=0 --tags</script>
- </properties>
- <source>
- def tagIt = 'git tag -a vXXXX -m "Auto tagged"'
- def changeType = project.properties.ChangeType
- def command = project.properties.script
- def process = command.execute()
- process.waitFor()
- def describe = process.in.text.trim()
- println "Setting revision to: " + describe
- if(!describe.startsWith("v")) {
- describe = "1.0.1"
- } else {
- describe = describe.substring(1)
- }
- project.properties.setProperty('revision', describe)
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <executions>
- <execution>
- <id>default-compile</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>default-testCompile</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>default-testResources</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>default-jar</id>
- <phase>package</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <executions>
- <execution>
- <id>default-test</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </project>
- <properties>
- <revision>1.0.1</revision>
- </properties>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement