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

Context url cannot be empty #80

Open
RobGThai opened this issue Apr 6, 2016 · 3 comments
Open

Context url cannot be empty #80

RobGThai opened this issue Apr 6, 2016 · 3 comments

Comments

@RobGThai
Copy link

RobGThai commented Apr 6, 2016

I'm getting this error using build-info-extractor-gradle:4.2.+. Although I have verified that I set contextUrl correctly.

As you can see below, I have set contextUrl at base level and at Pubisher level as well. I can see URL being printed out within Publisher configuration but the error persists regardless. I read that someone got around by disabling Gradle Daemon but it didn't help me.

artifactory {
    def url = "${artifactory_contextUrl}"
    contextUrl = "${url}"
    publish {
        contextUrl = "${url}"
        repository {
            repoKey = 'AndroidHello'
            username = "${artifactory_user}"
            password = "${artifactory_password}"
            maven = true

            println("Pub u: ${artifactory_user}")
            println("Pub p: ${artifactory_password}")
            println "URL $url"
        }

        defaults {
            publications ('aar')
            publishArtifacts = true

            properties = ['qa.level': 'basic', 'dev.team': 'core']
            publishPom = true
        }
    }

    resolve {
        repository {
            repoKey = 'libs-release'
            username = "${artifactory_user}"
            password = "${artifactory_password}"
            maven = true
        }
    }
}

I'm running this on OSX 10.11.3. Using Gradle Wrapper 2.10. Trying to deploy a sample aar lib to Artifactory version 4.7.1 rev 40159 running on the same laptop.

Here's the stacktrace.

Caused by: java.lang.IllegalStateException: Context URL cannot be empty
        at org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.getContextUrl(ArtifactoryClientConfiguration.java:146)
        at org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration$PublisherHandler.getContextUrl(ArtifactoryClientConfiguration.java:312)
        at org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask.prepareAndDeploy(BuildInfoBaseTask.java:349)
        at org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask.collectProjectBuildInfo(BuildInfoBaseTask.java:129)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
        ... 60 more

@eyalbe4
Copy link
Contributor

eyalbe4 commented Apr 7, 2016

@RobGThai, I was trying to reproduce this error, but this doesn't happen for me. To troubleshoot the issue, can you please try running the gradle-examples?

@RobGThai
Copy link
Author

RobGThai commented Apr 7, 2016

@eyalbe4 , Just tried gradle-android-aar example it works fine. However, the current version of buildtool and the example is very different. So I'm trying to upgrade the example and learn what make or break my config.

@eyalbe4
Copy link
Contributor

eyalbe4 commented Apr 7, 2016

OK @RobGThai. If you feel this example needs to be updated, feel free to contribute.

RobiNino pushed a commit to RobiNino/build-info that referenced this issue Oct 7, 2020
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

2 participants