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

Runtim exception in azure devops pipeline #245

Open
dermoritz opened this issue Mar 29, 2023 · 0 comments
Open

Runtim exception in azure devops pipeline #245

dermoritz opened this issue Mar 29, 2023 · 0 comments

Comments

@dermoritz
Copy link

my config is as follows (also thanks to suggestions from #229):

<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-9.4.0.xsd">

    <refs>
        <ref type="tag">
            <pattern><![CDATA[v(?<version>.*)]]></pattern>
            <version>${ref.version}</version>
        </ref>

        <ref type="branch">
            <pattern>master</pattern>
            <version>${describe.tag.version.major}.${describe.tag.version.minor}.${describe.tag.version.patch.next}-SNAPSHOT</version>
        </ref>

        <ref type="branch">
            <pattern>.+</pattern>
            <version>${ref}-SNAPSHOT</version>
        </ref>

    </refs>

    <!-- optional fallback configuration in case of no matching ref configuration-->
    <rev>
        <version>${commit}</version>
    </rev>

</configuration>

while locally (on master) the calculated version is "0.0.4-SNAPSHOT" - last tag + 1 in pipeline i get:

[INFO] --- me.qoomon:maven-git-versioning-extension:9.6.5 [core extension] ----
[INFO] matching ref: BRANCH - master
[INFO] ref configuration: BRANCH - pattern: master
[INFO]   describeTagFirstParent: true
[INFO]   version: ${describe.tag.version.major}.${describe.tag.version.minor}.${describe.tag.version.patch.next}-SNAPSHOT
[INFO] 
[INFO] com.bosch.pt.hg.connectedcharger:cc-pipeline-test
[ERROR] Internal error: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalStateException: couldn't find matching tag in shallow git repository -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalStateException: couldn't find matching tag in shallow git repository
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:121)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:199)

in the pipeline it self i set


- task: Maven@4
  env:
    # env variables used by maven-git-versioning extension to version the artifacts 
    VERSIONING_GIT_REF: $(Build.SourceBranch)
    VERSIONING_GIT_BRANCH: $(Build.SourceBranchName) 

with this as version it is working: "${describe.tag.version}-SNAPSHOT" - it just uses the current / latest tag. but i want it do be increased.

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

1 participant