Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  5. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  6.  
  7. <modelVersion>4.0.0</modelVersion>
  8. <groupId>com.mytest.test</groupId>
  9. <artifactId>test-tag</artifactId>
  10. <version>${revision}</version>
  11.  
  12.  
  13. <description>Test</description>
  14.  
  15. <properties>
  16. <ChangeType>TO_BE_SET</ChangeType>
  17. </properties>
  18.  
  19.  
  20. <build>
  21. <plugins>
  22. <plugin>
  23. <groupId>org.codehaus.gmaven</groupId>
  24. <artifactId>gmaven-plugin</artifactId>
  25. <version>1.5</version>
  26. <executions>
  27. <execution>
  28. <phase>validate</phase>
  29. <goals>
  30. <goal>execute</goal>
  31. </goals>
  32. <configuration>
  33. <providerSelection>2.0</providerSelection>
  34. <properties>
  35. <script>git describe --abbrev=0 --tags</script>
  36. </properties>
  37. <source>
  38. def tagIt = 'git tag -a vXXXX -m "Auto tagged"'
  39. def changeType = project.properties.ChangeType
  40. def command = project.properties.script
  41. def process = command.execute()
  42. process.waitFor()
  43. def describe = process.in.text.trim()
  44. println "Setting revision to: " + describe
  45.  
  46. if(!describe.startsWith("v")) {
  47. describe = "1.0.1"
  48. } else {
  49. describe = describe.substring(1)
  50. }
  51.  
  52. project.properties.setProperty('revision', describe)
  53.  
  54.  
  55. </source>
  56. </configuration>
  57. </execution>
  58. </executions>
  59. </plugin>
  60.  
  61.  
  62. <plugin>
  63. <artifactId>maven-compiler-plugin</artifactId>
  64. <executions>
  65. <execution>
  66. <id>default-compile</id>
  67. <phase>none</phase>
  68. </execution>
  69. <execution>
  70. <id>default-testCompile</id>
  71. <phase>none</phase>
  72. </execution>
  73. </executions>
  74. </plugin>
  75.  
  76. <plugin>
  77. <artifactId>maven-resources-plugin</artifactId>
  78. <executions>
  79. <execution>
  80. <id>default-testResources</id>
  81. <phase>none</phase>
  82. </execution>
  83. </executions>
  84. </plugin>
  85.  
  86. <plugin>
  87. <artifactId>maven-jar-plugin</artifactId>
  88. <executions>
  89. <execution>
  90. <id>default-jar</id>
  91. <phase>package</phase>
  92. </execution>
  93. </executions>
  94. </plugin>
  95.  
  96. <plugin>
  97. <artifactId>maven-surefire-plugin</artifactId>
  98. <executions>
  99. <execution>
  100. <id>default-test</id>
  101. <phase>none</phase>
  102. </execution>
  103. </executions>
  104. </plugin>
  105. </plugins>
  106. </build>
  107.  
  108. </project>
  109.  
  110. <properties>
  111. <revision>1.0.1</revision>
  112. </properties>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement