Skip to content

Commit 8520062

Browse files
tulinkryVladimir Kotal
authored andcommitted
Opengrok tools mvn (#2429)
Generating the python build under target when running mvn fixes #2391 fixes #2390
1 parent d247410 commit 8520062

File tree

2 files changed

+48
-8
lines changed

2 files changed

+48
-8
lines changed

distribution/assembly.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<destName>source.war</destName>
2121
</file>
2222
<file>
23-
<source>${project.basedir}/../opengrok-tools/dist/opengrok-tools-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}${parsedVersion.qualifier}.tar.gz</source>
23+
<source>${project.basedir}/../opengrok-tools/${project.build.directory}/dist/opengrok-tools-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}${parsedVersion.qualifier}.tar.gz</source>
2424
<outputDirectory>tools</outputDirectory>
2525
<destName>opengrok-tools.tar.gz</destName>
2626
</file>

opengrok-tools/pom.xml

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,50 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
4343
<testSourceDirectory>src/test/python</testSourceDirectory>
4444

4545
<plugins>
46+
47+
<plugin>
48+
<!-- copy all the python files to the target directory
49+
so we produce the dist and build directories there -->
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-resources-plugin</artifactId>
52+
<version>3.1.0</version>
53+
<executions>
54+
<execution>
55+
<id>copy-resources-python</id>
56+
<phase>compile</phase>
57+
<goals>
58+
<goal>copy-resources</goal>
59+
</goals>
60+
<configuration>
61+
<outputDirectory>${project.build.directory}/src</outputDirectory>
62+
<resources>
63+
<resource>
64+
<directory>${basedir}/src</directory>
65+
</resource>
66+
</resources>
67+
</configuration>
68+
</execution>
69+
<execution>
70+
<id>copy-resources-setup.py</id>
71+
<phase>compile</phase>
72+
<goals>
73+
<goal>copy-resources</goal>
74+
</goals>
75+
<configuration>
76+
<outputDirectory>${project.build.directory}</outputDirectory>
77+
<resources>
78+
<resource>
79+
<directory>${basedir}</directory>
80+
<includes>
81+
<include>setup.py</include>
82+
<include>MANIFEST.in</include>
83+
</includes>
84+
</resource>
85+
</resources>
86+
</configuration>
87+
</execution>
88+
</executions>
89+
</plugin>
4690
<plugin>
4791
<groupId>org.codehaus.mojo</groupId>
4892
<artifactId>exec-maven-plugin</artifactId>
@@ -67,7 +111,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
67111
<id>generate python env</id>
68112
<configuration>
69113
<executable>python3</executable>
70-
<workingDirectory>${project.build.directory}/../</workingDirectory>
114+
<workingDirectory>${project.build.directory}</workingDirectory>
71115
<arguments>
72116
<argument>-m</argument>
73117
<argument>venv</argument>
@@ -86,7 +130,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
86130
</goals>
87131
<configuration>
88132
<executable>env/bin/python</executable>
89-
<workingDirectory>${project.build.directory}/../</workingDirectory>
133+
<workingDirectory>${project.build.directory}</workingDirectory>
90134
<arguments>
91135
<argument>setup.py</argument>
92136
<argument>sdist</argument>
@@ -98,7 +142,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
98142
<id>python-test</id>
99143
<configuration>
100144
<executable>env/bin/python</executable>
101-
<workingDirectory>${project.build.directory}/../</workingDirectory>
145+
<workingDirectory>${project.build.directory}</workingDirectory>
102146
<arguments>
103147
<argument>setup.py</argument>
104148
<argument>install</argument>
@@ -112,15 +156,11 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
112156
</goals>
113157
</execution>
114158
</executions>
115-
116159
</plugin>
117-
118160
<plugin>
119161
<groupId>org.apache.maven.plugins</groupId>
120162
<artifactId>maven-checkstyle-plugin</artifactId>
121163
</plugin>
122-
123164
</plugins>
124165
</build>
125-
126166
</project>

0 commit comments

Comments
 (0)