File tree Expand file tree Collapse file tree 4 files changed +55
-8
lines changed Expand file tree Collapse file tree 4 files changed +55
-8
lines changed Original file line number Diff line number Diff line change 20
20
<destName >source.war</destName >
21
21
</file >
22
22
<file >
23
- <source >${project.basedir}/../opengrok-tools/${project.build.directory}/dist/opengrok-tools-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}${parsedVersion.qualifier }.tar.gz</source >
23
+ <source >${project.basedir}/../opengrok-tools/${project.build.directory}/dist/opengrok-tools-${project.python.package.version }.tar.gz</source >
24
24
<outputDirectory >tools</outputDirectory >
25
- <destName >opengrok-tools.tar.gz</destName >
25
+ <destName >opengrok-tools-${project.python.package.version} .tar.gz</destName >
26
26
</file >
27
27
</files >
28
28
<fileSets >
Original file line number Diff line number Diff line change 67
67
<plugin >
68
68
<groupId >org.codehaus.mojo</groupId >
69
69
<artifactId >build-helper-maven-plugin</artifactId >
70
- <version >3.0.0 </version >
70
+ <version >1.8 </version >
71
71
<executions >
72
72
<execution >
73
- <id >parse -version</id >
73
+ <id >generate-python-package -version</id >
74
74
<goals >
75
- <goal >parse-version </goal >
75
+ <goal >regex-property </goal >
76
76
</goals >
77
+ <phase >package</phase >
78
+ <configuration >
79
+ <!--
80
+ Use property ${project.version} but delete the "-" (dash) from it
81
+ and place it into the property ${project.python.package.version}
82
+ -->
83
+ <name >project.python.package.version</name >
84
+ <regex >-rc</regex >
85
+ <value >${project.version} </value >
86
+ <replacement >rc</replacement >
87
+ <failIfNoMatch >false</failIfNoMatch >
88
+ </configuration >
77
89
</execution >
78
90
</executions >
79
91
</plugin >
Original file line number Diff line number Diff line change @@ -43,7 +43,31 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
43
43
<testSourceDirectory >src/test/python</testSourceDirectory >
44
44
45
45
<plugins >
46
-
46
+ <plugin >
47
+ <groupId >org.codehaus.mojo</groupId >
48
+ <artifactId >build-helper-maven-plugin</artifactId >
49
+ <version >1.8</version >
50
+ <executions >
51
+ <execution >
52
+ <id >generate-python-package-version</id >
53
+ <goals >
54
+ <goal >regex-property</goal >
55
+ </goals >
56
+ <phase >generate-resources</phase >
57
+ <configuration >
58
+ <!--
59
+ Use property ${project.version} but delete the "-" (dash) from it
60
+ and place it into the property ${project.python.package.version}
61
+ -->
62
+ <name >project.python.package.version</name >
63
+ <regex >-rc</regex >
64
+ <value >${project.version} </value >
65
+ <replacement >rc</replacement >
66
+ <failIfNoMatch >false</failIfNoMatch >
67
+ </configuration >
68
+ </execution >
69
+ </executions >
70
+ </plugin >
47
71
<plugin >
48
72
<!-- copy all the python files to the target directory
49
73
so we produce the dist and build directories there -->
@@ -78,10 +102,17 @@ Portions Copyright (c) 2017-2018, Chris Fraire <
[email protected] >.
78
102
<resource >
79
103
<directory >${basedir} </directory >
80
104
<includes >
81
- <include >setup.py</include >
82
105
<include >MANIFEST.in</include >
83
106
</includes >
84
107
</resource >
108
+ <!-- replace ${project.python.package.version} in setup.py -->
109
+ <resource >
110
+ <directory >${basedir} </directory >
111
+ <includes >
112
+ <include >setup.py</include >
113
+ </includes >
114
+ <filtering >true</filtering >
115
+ </resource >
85
116
</resources >
86
117
</configuration >
87
118
</execution >
Original file line number Diff line number Diff line change 1
1
import os
2
2
import unittest
3
+
3
4
from setuptools import setup
4
5
5
6
SCRIPT_DIR = os .path .dirname (os .path .realpath (__file__ ))
@@ -20,7 +21,10 @@ def my_test_suite():
20
21
21
22
setup (
22
23
name = 'opengrok-tools' ,
23
- version = '1.1rc63' ,
24
+ # The package version is taken from maven.
25
+ # this "variable" is replaced by maven on the fly so don't change it here
26
+ # see pom.xml for this module
27
+ version = '${project.python.package.version}' ,
24
28
packages = [
25
29
'opengrok_tools' ,
26
30
'opengrok_tools.utils' ,
You can’t perform that action at this time.
0 commit comments