diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 625de36e6aa20666cf8742db3adf9ce10303ce35..a8091043c5a1a5fbeae8cc80cb188e9804725d40 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ build-for-staging: script: - "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS package -DskipTests" tags: - - vips-java + - java artifacts: paths: - target/*.war @@ -90,7 +90,7 @@ build-for-production: - echo "Build war file with version '$RELEASE_VERSION'" - "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS package -DskipTests" tags: - - vips-java + - java artifacts: paths: - target/*.war @@ -102,7 +102,7 @@ test: script: - "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS test" tags: - - vips-java + - java rules: - if: $CI_COMMIT_REF_NAME == $MAIN_BRANCH - if: $CI_COMMIT_REF_NAME == $RELEASE_BRANCH @@ -140,7 +140,7 @@ deploy-to-staging: after_script: - echo "Deployment complete" tags: - - vips-java + - java rules: - if: $CI_COMMIT_REF_NAME == $MAIN_BRANCH environment: @@ -156,7 +156,7 @@ upload-snapshot: fi - "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS deploy -DskipTests" tags: - - vips-java + - java rules: - if: $CI_COMMIT_REF_NAME == $MAIN_BRANCH @@ -193,7 +193,7 @@ deploy-to-production: after_script: - echo "Deployment complete" tags: - - vips-java + - java rules: - if: $CI_COMMIT_REF_NAME == $RELEASE_BRANCH environment: @@ -242,6 +242,6 @@ upload-and-tag-release: - git commit -m "[ci skip] Set snapshot version ${SNAPSHOT_VERSION}" - git push origin $MAIN_BRANCH tags: - - vips-java + - java rules: - if: $CI_COMMIT_REF_NAME == $RELEASE_BRANCH diff --git a/build_models_xml.py b/build_models_xml.py index b9459940c2421a7b9be906df103a04c0fb5d703c..3474f6789437eeeacc29e8f77f362666f2169613 100755 --- a/build_models_xml.py +++ b/build_models_xml.py @@ -59,16 +59,16 @@ if response.status_code == 200: models = {} -model_prefixes = ["no/nibio/vips/model","fi/luke/vips/model"] +model_prefixes = ["no/nibio/vips/model", "fi/luke/vips/model"] # Filter models and store only the most recent version (highest alphanumeric number) for package in all_packages: for model_prefix in model_prefixes: - if package["name"].find(model_prefix) >=0 and ((snapshot and package["version"].find("SNAPSHOT")>=0) or (not snapshot and package["version"].find("SNAPSHOT")<0)): + if package["name"].find(model_prefix) >= 0 and ((snapshot and package["version"].find("SNAPSHOT") >= 0) or (not snapshot and package["version"].find("SNAPSHOT") < 0)): model_name = package["name"][len(model_prefix) + 1:] - if models.get(model_name, None) == None: + if models.get(model_name, None) is None: models[model_name] = {} - models[model_name]["groupId"] = model_prefix.replace("/",".") + models[model_name]["groupId"] = model_prefix.replace("/", ".") models[model_name]["version"] = package["version"] else: models[model_name]["version"] = package["version"] if package["version"] > models[model_name]["version"] else models[model_name]["version"] @@ -77,11 +77,11 @@ for package in all_packages: dependencies = ET.Element("dependencies") for model_name, value in models.items(): dependency = ET.SubElement(dependencies, "dependency") - ET.SubElement(dependency,"groupId").text = value["groupId"] + ET.SubElement(dependency, "groupId").text = value["groupId"] ET.SubElement(dependency, "artifactId").text = model_name ET.SubElement(dependency, "version").text = value["version"] # Dumps the indented XML to stdout tree = ET.ElementTree(dependencies) -ET.indent(tree, space="\t",level=0) +ET.indent(tree, space="\t", level=0) ET.dump(tree) diff --git a/build_pom_with_models.py b/build_pom_with_models.py index ae699271d7e5a3b38bca79d0c1e3cb5933d7013d..22f0e12d7d435cab31b76290e5709ad77abab446 100755 --- a/build_pom_with_models.py +++ b/build_pom_with_models.py @@ -1,8 +1,7 @@ #!/usr/bin/python3 ''' -Merges pom.xml and models.xml (default) into pom_with_models.xml and -runs mvn clean install -f pom_with_models.xml +Merges pom.xml and models.xml (default) into pom_with_models.xml Copyright (C) 2023 NIBIO @@ -49,6 +48,6 @@ for dep in model_dep_elements: pom_deps_element.appendChild(dep) # Write the modified pom dom to file -pom_with_models_file = open(merged_pom_filename,"w") +pom_with_models_file = open(merged_pom_filename, "w") pom_dom.writexml(pom_with_models_file) pom_with_models_file.close() diff --git a/build_with_models.py b/build_with_models.py index c6b0a8560680582c6a9d25149ae469a084567ada..29c90b1f8914d9f3ff85fd47d33a8a1d7f023086 100755 --- a/build_with_models.py +++ b/build_with_models.py @@ -49,7 +49,7 @@ for dep in model_dep_elements: pom_deps_element.appendChild(dep) # Write the modified pom dom to file -pom_with_models_file = open(merged_pom_filename,"w") +pom_with_models_file = open(merged_pom_filename, "w") pom_dom.writexml(pom_with_models_file) pom_with_models_file.close() diff --git a/models.xml b/models.xml index b2cb61daee1ce199c6676f035ad3ab2fe4497af0..839ad44d30d9eab062e5185204a9b84010bb4b2e 100644 --- a/models.xml +++ b/models.xml @@ -2,111 +2,111 @@ <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>RoughageNutritionModel</artifactId> - <version>1.1.7</version> + <version>1.1.9</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>AlternariaModel</artifactId> - <version>1.1.6</version> + <version>1.1.8</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>BarleyNetBlotchModel</artifactId> - <version>1.1.5</version> + <version>1.1.8</version> </dependency> <dependency> - <groupId>no.nibio.vips.model</groupId> - <artifactId>AppleScabModel</artifactId> - <version>1.1.5</version> + <groupId>fi.luke.vips.model</groupId> + <artifactId>FinnCerealModels</artifactId> + <version>1.1.8</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>DeliaRadicumModel</artifactId> - <version>1.1.5</version> + <artifactId>SeptoriaHumidityModel</artifactId> + <version>1.1.8</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>DeliaRadicumFloralisObservationModel</artifactId> - <version>1.1.5</version> + <artifactId>Model_LEAFBLOTCH</artifactId> + <version>1.1.8</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>BremiaLactucaeModel</artifactId> - <version>1.1.5</version> - </dependency> - <dependency> - <groupId>fi.luke.vips.model</groupId> - <artifactId>FinnCerealModels</artifactId> - <version>1.1.5</version> + <artifactId>AppleScabModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>DOWNCASTModel</artifactId> - <version>1.1.5</version> + <artifactId>BremiaLactucaeModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>LygusRugulipennisModel</artifactId> - <version>1.1.5</version> + <artifactId>DeliaRadicumModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>GrassDryingModel</artifactId> - <version>1.1.5</version> + <artifactId>DeliaRadicumFloralisObservationModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>Model_LEAFBLOTCH</artifactId> - <version>1.1.5</version> + <artifactId>DOWNCASTModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>NaerstadModel</artifactId> - <version>1.1.5</version> + <artifactId>GrassDryingModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>MamestraBrassicaeModel</artifactId> - <version>1.1.5</version> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>Model_MAIZEPHENO</artifactId> - <version>1.1.5</version> + <artifactId>LygusRugulipennisModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>OatFloweringModel</artifactId> - <version>1.1.5</version> + <artifactId>NaerstadModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>NegativePrognosisModel</artifactId> - <version>1.1.5</version> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>PsilaRosaeObservationModel</artifactId> - <version>1.1.5</version> + <artifactId>OatFloweringModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>PsilaRosaeTempModel</artifactId> - <version>1.1.5</version> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> - <artifactId>SeptoriaHumidityModel</artifactId> - <version>1.1.5</version> + <artifactId>Model_MAIZEPHENO</artifactId> + <version>1.1.7</version> + </dependency> + <dependency> + <groupId>no.nibio.vips.model</groupId> + <artifactId>PsilaRosaeObservationModel</artifactId> + <version>1.1.7</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>SeptoriaReferenceHumidityModel</artifactId> - <version>1.1.5</version> + <version>1.1.6</version> </dependency> <dependency> <groupId>no.nibio.vips.model</groupId> <artifactId>SeptoriaApiicolaModel</artifactId> - <version>1.1.4</version> + <version>1.1.6</version> </dependency> </dependencies> diff --git a/pom.xml b/pom.xml index fe4a3090c21edd7f60c57f5b0591677793f866cd..2639215c5e2673adff935c4fbf099f0157362019 100755 --- a/pom.xml +++ b/pom.xml @@ -4,12 +4,12 @@ <parent> <groupId>no.nibio.vips</groupId> <artifactId>vips-parent-pom</artifactId> - <version>1.0.0</version> + <version>1.1.0</version> </parent> <groupId>no.nibio</groupId> <artifactId>VIPSCore</artifactId> <packaging>war</packaging> - <version>2.0.6</version> + <version>2.0.7-SNAPSHOT</version> <name>VIPSCore</name> <url>http://maven.apache.org</url>