Git Product home page Git Product logo

Comments (23)

eyalbe4 avatar eyalbe4 commented on August 26, 2024 2

@regevbr and all,
Version 4.4.2 is available on jcenter and should be soon available on plugins.gradle.org.

from build-info.

ItamarBenjamin avatar ItamarBenjamin commented on August 26, 2024 1

I have been able to reproduce this issue in a sample project

you can see the output here:
ibinyami@itstl087 /tmp/art_gradle >gradle build
[buildinfo] Not using buildInfo properties file for this build.
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build

BUILD SUCCESSFUL

Total time: 5.786 secs

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html

ibinyami@itstl087 /tmp/art_gradle >vi build.gradle

********* here i change the plugin version to latest **********

ibinyami@itstl087 /tmp/art_gradle >gradle build
[buildinfo] Not using buildInfo properties file for this build.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':api'.

    Task with name 'artifactoryPublish' not found in project ':api'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 5.591 secs
build.gradle.txt
settings.gradle.txt

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024 1

@ItamarBenjamin, @ForNeVeR and @ezraroi,
I believe we have a fix for the issues discussed here, and we'd like to ask you try out the fix before publishing a new release. You can install the snapshot plugin as follows:

buildscript {
    repositories {
        maven {
            url "https://oss.jfrog.org/oss-snapshot-local"
        }
        jcenter()
    }
    dependencies {
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.x-SNAPSHOT"
    }
}

from build-info.

ForNeVeR avatar ForNeVeR commented on August 26, 2024

For some reason my projects also were unable to build after updating 4.4.0 -> 4.4.1. Still investigating.

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

@ItamarBenjamin,
Does the same project build properly with an older version of the plugin? If so, what is the older version?
Since the example projects (referenced from the plugin documentation) are working with 4.4.1, can you please provide us with a sample project that reproduces this issue?

from build-info.

ItamarBenjamin avatar ItamarBenjamin commented on August 26, 2024

yes, when i explicltly reverted to 4.4.0 everything worked well as before. (previously i had imported the plugin with version 4.+)

i will try to reproduce this situation on a sample project, our gradle setup is quite complex to copy it here

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

Thank you @ItamarBenjamin and @ForNeVeR.
We'll be waiting for s sample project that reproduces the issue.

from build-info.

ForNeVeR avatar ForNeVeR commented on August 26, 2024

I have a similar setup, but in my case it silently fails telling that it cannot find the artifacts from my artifactory repo (and listing any sorts of URLs except my actual Artifactory repo).

I have a config like this:

artifactory {
    contextUrl = 'https://[REDACTED]/artifactory'
    resolve {
        repository {
            repoKey = '[REDACTED]'
            username = "${artifactory_user}"
            password = "${artifactory_password}"
            maven = true
        }
    }
}

I've compared the debug logs (obtained with ./gradlew -debug build) from 4.4.0 and 4.4.1 and I see the following difference. 4.4.0 have this line, while 4.4.1 haven't:

[org.jfrog.gradle.plugin.artifactory.extractor.listener.ProjectsEvaluatedBuildListener] Artifactory URL: https://[REDACTED]/artifactory/[REDACTED]

All the configuration files in my environment are the same.

I'll try to play with the sample projects to get the repro.

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

Thanks @ItamarBenjamin and @ForNeVeR,
In order to pinpoint the root cause of these failures, it would really help if you could provide us with a sample project that we can run and reproduce a failure. Since all project examples (referenced from the plugin documentation) work properly, there's obviously something in your build scripts that the new version does not support. Any chance you can try and create such a sample?

from build-info.

ItamarBenjamin avatar ItamarBenjamin commented on August 26, 2024

@eyalbe4 Hi Eyal, I've uploaded two gradle files with my last comment, they contain the sample for the output I posted before in that comment.

from build-info.

ezraroi avatar ezraroi commented on August 26, 2024

@ItamarBenjamin lets create a public repo tomorrow in GitHub with the sample project.
@eyalbe4 , do you have any release notes or something similar for the new version?

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

Sure @ezraroi,
The release notes for 4.4.1 are available here.
You can see the 2 commits for the 2 issues for this release. I suspect that one of them caused the issue you're experiencing. I'm sure that we'll be able to pinpoint the problem and fix it using a sample project.
All - thanks for the great cooperation!

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

@ezraroi, @ItamarBenjamin and @ForNeVeR - please ignore my last comment, will rephrase and post again soon.

from build-info.

ForNeVeR avatar ForNeVeR commented on August 26, 2024

I think that my case is different. I'll try to make a repro sample and post another issue ASAP.

from build-info.

ItamarBenjamin avatar ItamarBenjamin commented on August 26, 2024

Hi @eyalbe4
Indeed it may solve the issue, but what if the api subproject should not publish anything? if what you proposed is the solution then in that case applying the plugin to the root project forces us to apply it to all sub projects and in most cases the majority of them will not need to publish anything.

Seems like the issue is that the new version of the plugin for some reason depends on the existence of the artifactoryPublish task in all subprojects.

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

Thanks for the feedback @ItamarBenjamin.
We created a snapshot version that resolves the issue your sample build script reproduces. GAP-260 tracks this fix.
Can please try out the snapshot version? You can install it as follows:

buildscript {
    repositories {
        maven {
            url "https://oss.jfrog.org/oss-snapshot-local"
        }
        jcenter()
    }
    dependencies {
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.x-SNAPSHOT"
    }
}

from build-info.

ItamarBenjamin avatar ItamarBenjamin commented on August 26, 2024

Hi @eyalbe4
I can confirm this release fixes the issue. Thank you for the quick resultion. I have ran the our build scripts and they didn't fail on configuration phase. However, I wasn't able to publish to artifactory successfully as the build now fails with this error:

  • What went wrong:
    Execution failed for task ':client:artifactoryPublish'.

    File '/workarea/ibinyami/workspace/weed/java/client/build/publications/dist/pom-default.xml' does not exist, and need to be published from publication dist

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

@ItamarBenjamin,
We'd like to better understand the structure of your gradle project, so that we can determine why it is not compatible with the recent changes. Can you please send an email to [email protected] so that we can look into this together?

from build-info.

ForNeVeR avatar ForNeVeR commented on August 26, 2024

Wow, it really seems that my problem was fixed by the patch. Thank you, guys!

from build-info.

regevbr avatar regevbr commented on August 26, 2024

@eyalbe4 , is it released? how can we install 4.4.2?

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

@regevbr, 4.4.2 will soon be published.
We'll update here as soon as it is out there.

from build-info.

eyalbe4 avatar eyalbe4 commented on August 26, 2024

Thanks everybody. Closing this issue.

from build-info.

regevbr avatar regevbr commented on August 26, 2024

Thanks!
@ItamarBenjamin

from build-info.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.