|
18 | 18 | <asciidoctorj.version>2.5.3</asciidoctorj.version> |
19 | 19 | <generated.docs.dir>${project.build.outputDirectory}/org/globalbioticinteractions/nomer/docs |
20 | 20 | </generated.docs.dir> |
| 21 | + <cmd.class>org.globalbioticinteractions.nomer.Nomer</cmd.class> |
21 | 22 | </properties> |
22 | 23 |
|
23 | 24 | <dependencies> |
|
127 | 128 | <version>1.2.1</version> |
128 | 129 | <executions> |
129 | 130 | <execution> |
| 131 | + <id>generate-manpages</id> |
130 | 132 | <phase>process-classes</phase> |
131 | 133 | <goals> |
132 | 134 | <goal>exec</goal> |
133 | 135 | </goals> |
| 136 | + <configuration> |
| 137 | + <executable>java</executable> |
| 138 | + <arguments> |
| 139 | + <argument>-classpath</argument> |
| 140 | + <classpath/> |
| 141 | + <argument>${cmd.class}</argument> |
| 142 | + <argument>gen-manpage</argument> |
| 143 | + <argument>--outdir</argument> |
| 144 | + <argument>${generated.docs.dir}/adoc</argument> |
| 145 | + </arguments> |
| 146 | + </configuration> |
| 147 | + </execution> |
| 148 | + <execution> |
| 149 | + <id>generate-completion</id> |
| 150 | + <phase>process-classes</phase> |
| 151 | + <goals> |
| 152 | + <goal>exec</goal> |
| 153 | + </goals> |
| 154 | + <configuration> |
| 155 | + <executable>java</executable> |
| 156 | + <arguments> |
| 157 | + <argument>-Dpicocli.autocomplete.systemExitOnError</argument> |
| 158 | + <argument>-cp</argument> |
| 159 | + <classpath/> |
| 160 | + <argument>picocli.AutoComplete</argument> |
| 161 | + <argument>--force</argument><!-- overwrite if exists --> |
| 162 | + <argument>--completionScript</argument> |
| 163 | + <argument>${project.build.directory}/${project.artifactId}_completion</argument> |
| 164 | + <argument>${cmd.class}</argument> |
| 165 | + </arguments> |
| 166 | + </configuration> |
134 | 167 | </execution> |
135 | 168 | </executions> |
136 | | - <configuration> |
137 | | - <executable>java</executable> |
138 | | - <arguments> |
139 | | - <argument>-classpath</argument> |
140 | | - <classpath/> |
141 | | - <argument>org.globalbioticinteractions.nomer.Nomer</argument> |
142 | | - <argument>gen-manpage</argument> |
143 | | - <argument>--outdir</argument> |
144 | | - <argument>${generated.docs.dir}/adoc</argument> |
145 | | - </arguments> |
146 | | - </configuration> |
147 | 169 | </plugin> |
148 | 170 | <plugin> |
149 | 171 | <groupId>org.asciidoctor</groupId> |
|
300 | 322 | <defineStatements> |
301 | 323 | <defineStatement>_unpackaged_files_terminate_build 0</defineStatement> |
302 | 324 | </defineStatements> |
| 325 | + <requires> |
| 326 | + <require>java-headless >= 1.8</require> |
| 327 | + <require>bash-completion</require> |
| 328 | + </requires> |
303 | 329 | <mappings> |
304 | 330 | <mapping> |
305 | 331 | <directory>/opt/${project.artifactId}/lib</directory> |
|
341 | 367 | </source> |
342 | 368 | </sources> |
343 | 369 | </mapping> |
| 370 | + <mapping> |
| 371 | + <directory>/usr/share/bash-completion/completions</directory> |
| 372 | + <directoryIncluded>false</directoryIncluded> |
| 373 | + <filemode>644</filemode> |
| 374 | + <username>root</username> |
| 375 | + <groupname>root</groupname> |
| 376 | + <sources> |
| 377 | + <source> |
| 378 | + <location>target/${project.artifactId}_completion</location> |
| 379 | + <destination>${project.artifactId}</destination> |
| 380 | + </source> |
| 381 | + </sources> |
| 382 | + </mapping> |
344 | 383 | </mappings> |
345 | | - <preinstallScriptlet> |
346 | | - <scriptFile>src/main/rpm/preinstall.sh</scriptFile> |
347 | | - <fileEncoding>utf-8</fileEncoding> |
348 | | - <filter>true</filter> |
349 | | - </preinstallScriptlet> |
350 | 384 | </configuration> |
351 | 385 | </execution> |
352 | 386 | </executions> |
|
0 commit comments