languagetool-org / portuguese-pos-dict

Portuguese POS tagger
GNU Lesser General Public License v2.1
5 stars 2 forks source link

[BUG] jar's pom.xml has wrong version description #44

Open miurahr opened 1 month ago

miurahr commented 1 month ago

Bug description

Published jar bundles pom.xml with a wrong version string ${env.PT_DICT_VERSION}

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.languagetool</groupId>
    <artifactId>portuguese-pos-dict</artifactId>
    <version>${env.PT_DICT_VERSION}</version>
    <url>http://github.com/languagetool-org/portuguese-dict-tools</url>
    <name>Portuguese part-of-speech dictionary</name>
    <description>A Portuguese part-of-speech (POS) dictionary as a Morfologik binary</description>

Affected version : v0.10...v1.1.0 url to download jar: https://repo1.maven.org/maven2/org/languagetool/portuguese-pos-dict/1.1.0/

Reproduction steps

  1. Prepare gradle project
    
    plugins {
    id 'java'
    }

repositories { mavenCentral() }

dependencies { implementation 'org.languagetool:language-pt:6.4' }

2. run gradle command `./gradlew dependencies --scan`
3. you will observe error message

```runtimeClasspath - Runtime classpath of source set 'main'.
\--- org.languagetool:language-pt:6.4
     \--- org.languagetool:portuguese-pos-dict:0.12 FAILED
  1. Check gradle scan for details
inconsistent module metadata found. Descriptor: org.languagetool:portuguese-pos-dict:${env.PT_DICT_VERSION} Errors: bad version: expected='0.12' found='${env.PT_DICT_VERSION}'

Expected behaviour

Jar has correct version number.

Additional context

Same issue is also in french-pos-dict https://github.com/languagetool-org/french-pos-dict/issues/19

p-goulart commented 1 month ago

@miurahr I've identified the issue and fixed it. For future releases (in Portuguese, that's true of v1.2.0, deployed just now), the version in that pom.xml file will now reflect the version of the artefact's metadata in the Nexus repository.

Thank you for bringing this our attention!


For older releases, the process of rectifying versions in POM files of already released artefacts is not very straightforward, and may depend on permissions I do not have...

If you absolutely need to install an older version (e.g. something for LT's 6.4 snapshot), you may need to circumvent Gradle's artefactory validation somehow (there appear to be some solutions, but I haven't tested them myself), or just download the dictionary jar locally and point your gradle build instructions to it.

miurahr commented 1 month ago

If you absolutely need to install an older version (e.g. something for LT's 6.4 snapshot), you may need to circumvent Gradle's artefactory validation somehow (there appear to be some solutions, but I haven't tested them myself), or just download the dictionary jar locally and point your gradle build instructions to it.

Thank you for attention with us. We, OmegaT project, uses LT 6.1 for our development version, and I have a plan to bump to LT 6.3, because of the issue here.