Checkout BIP-Ranker during 'prepare-package' && add it in the oozie-package.tar.gz

This commit is contained in:
Serafeim Chatzopoulos 2023-03-21 18:03:55 +02:00
parent 720fd19b39
commit f992ecb657
10 changed files with 22 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# Ranking Workflow for Openaire Publications
# Ranking Workflow for OpenAIRE Publications
This project contains the files for running a paper ranking workflow on the openaire graph using apache oozie.
All scripts are written in python and the project setup follows the typical oozie workflow structure:
@ -7,17 +7,15 @@ All scripts are written in python and the project setup follows the typical oozi
- a job.properties file specifying parameter values for the parameters used by the workflow
- a set of python scripts used by the workflow
**NOTE**: the workflow depends on the external library of ranking scripts called BiP! Ranker.
**NOTE**: the workflow depends on the external library of ranking scripts called [BiP! Ranker](https://github.com/athenarc/Bip-Ranker).
You can check out a specific tag/release of BIP! Ranker using maven, as described in the following section.
## Check out a specific tag/release of BIP-Ranker
## Build and deploy
* Edit the `scmVersion` of the maven-scm-plugin in the pom.xml to point to the tag/release version you want to check out.
* Then, use maven to perform the checkout:
Use the following command for packaging:
```
mvn scm:checkout
mvn package -Poozie-package -Dworkflow.source.dir=eu/dnetlib/dhp/oa/graph/impact_indicators -DskipTests
```
* The code should be visible under `src/main/bip-ranker` folder.
Note: edit the property `bip.ranker.tag` of the `pom.xml` file to specify the tag of [BIP-Ranker](https://github.com/athenarc/Bip-Ranker) that you want to use.

View File

@ -5,9 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp</artifactId>
<artifactId>dhp-workflows</artifactId>
<version>1.2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>dhp-impact-indicators</artifactId>
@ -16,6 +15,9 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Use this property to fetch a specific tag -->
<bip.ranker.tag>v1.0.0</bip.ranker.tag>
</properties>
<scm>
@ -32,9 +34,18 @@
<configuration>
<connectionType>connection</connectionType>
<scmVersionType>tag</scmVersionType><!-- 'branch' can also be provided here -->
<scmVersion>v1.0.0</scmVersion><!-- in case of scmVersionType == 'branch', this field points to the branch name -->
<checkoutDirectory>${project.build.directory}/../src/main/bip-ranker</checkoutDirectory>
<scmVersion>${bip.ranker.tag}</scmVersion><!-- in case of scmVersionType == 'branch', this field points to the branch name -->
<checkoutDirectory>${project.build.directory}/${oozie.package.file.name}/${oozieAppDir}/bip-ranker</checkoutDirectory>
</configuration>
<executions>
<execution>
<id>checkout-bip-ranker</id>
<phase>prepare-package</phase>
<goals>
<goal>checkout</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -38,6 +38,7 @@
<module>dhp-usage-raw-data-update</module>
<module>dhp-broker-events</module>
<module>dhp-doiboost</module>
<module>dhp-impact-indicators</module>
</modules>
<pluginRepositories>