Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artifact's pom.xml has wrong version description #19

Open
miurahr opened this issue Jul 13, 2024 · 7 comments
Open

artifact's pom.xml has wrong version description #19

miurahr opened this issue Jul 13, 2024 · 7 comments
Assignees

Comments

@miurahr
Copy link

miurahr commented Jul 13, 2024

Published jar bundles pom.xml with a wrong version string ${env.FR_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>french-pos-dict</artifactId>
    <version>${env.FR_DICT_VERSION}</version>
    <url>https://languagetool.org</url>
    <name>French part-of-speech dictionary</name>
    <description>A French part-of-speech (POS) dictionary as a Morfologik binary</description>

Affected version : 0.6
The jar file checked: https://repo1.maven.org/maven2/org/languagetool/french-pos-dict/0.6/
A path in archive: /META-INF/maven/org.languagetool/french-pos-dict/pom.xml

@miurahr
Copy link
Author

miurahr commented Jul 13, 2024

It may be caused by GitHub actions script

    - name: Update dictionary version in LT pom.xml
      working-directory: ${{ env.FR_DICT_HOME }}
      run: |
        poetry run python "dict_tools/scripts/update_pom.py" \
          --new-version "${{ env.FR_DICT_VERSION }}" \
          --package-name "french-pos-dict"

@danielnaber
Copy link
Member

@jaumeortola Any idea what the issue might be?

@miurahr
Copy link
Author

miurahr commented Jul 14, 2024

When prepare gradle project with configuration like

plugins {
  id 'java'
}

repositories {
  mavenCentral()
}

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

and run gradle command like

./gradlew dependencies --scan

then I got command output

runtimeClasspath - Runtime classpath of source set 'main'.
\--- org.languagetool:language-fr:6.4
     +--- org.languagetool:french-pos-dict:0.6 FAILED

and gradle scan report

inconsistent module metadata found. Descriptor: org.languagetool:french-pos-dict:${env.FR_DICT_VERSION} Errors: bad version: expected='0.6' found='${env.FR_DICT_VERSION}'

It cause any downstream project which use gradle as build system got error from french module.

@miurahr
Copy link
Author

miurahr commented Jul 14, 2024

It was "0.5" in v0.5 release. It become ${env.FR_DICT_VERSION} in v0.6.
https://github.com/languagetool-org/french-pos-dict/blob/master/results/java-lt/pom.xml#L8

@p-goulart
Copy link
Collaborator

p-goulart commented Jul 15, 2024

@miurahr obviously something's wrong when resolving the environment variables. I'll have a look and report back soon. I'll follow up on this in the Portuguese repo and propagate the solution to this one once I've got it.

@p-goulart
Copy link
Collaborator

The issue is fixed in the GHA workflow (as it is for Portuguese).

As discussed in languagetool-org/portuguese-pos-dict#44, this will affect future releases, but changing the version in the POM of already released artefacts will require extra juggling of Nexus permissions. I'll talk about it with @jaumeortola once he's back.

@miurahr
Copy link
Author

miurahr commented Oct 21, 2024

Unfortunately, LanguageTool-v6.5 was released with french-pos-dict v0.6 which has not been fixed yet. It means downstream projects that use the Gradle build system need to stick to the old version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants