Code Monkey home page Code Monkey logo

Comments (7)

shollander avatar shollander commented on May 28, 2024 1

@mdietrichstein That fixed it for me. I can now use the plugin with Gradle 4.7. Thanks!

from gradle-offline-dependencies-plugin.

mdietrichstein avatar mdietrichstein commented on May 28, 2024

Hey @shollander

Thanks for your feedback! Can you provide me with a example build.gradle file or a dependency which triggers this issue?

from gradle-offline-dependencies-plugin.

shollander avatar shollander commented on May 28, 2024

@mdietrichstein It can be any dependency that does not have a javadoc or sources jar. For example:

'org.springframework.boot:spring-boot-starter-data-mongodb:2.0.0.RELEASE'

from gradle-offline-dependencies-plugin.

mdietrichstein avatar mdietrichstein commented on May 28, 2024

I have created a small testproject which includes the dependency you have mentioned. It works fine for me (MacOSX, Java 1.8.0_112, gradle 4.5 and 4.6).

Could you download the attached project, run ./gradlew clean updateOfflineRepository --stacktrace --debug and post the output here?

That would help me a lot with debugging the issue, thanks!

gradle-testproject.zip

from gradle-offline-dependencies-plugin.

shollander avatar shollander commented on May 28, 2024

I can't reproduce it now with that dependency unfortunately. It seems that my nexus repo has cached that result in some way that now it is happy. However I can still reproduce it with other dependencies, for example 'org.springframework.boot:spring-boot-starter-tomcat:2.0.0.RELEASE'. I am using an internal corporate nexus repository.

This is part of the stacktrace that I am seeing:

Caused by: groovy.lang.MissingPropertyException: No such property: file for class: org.gradle.api.internal.artifacts.result.DefaultUnresolvedArtifactResult
Possible solutions: type, id, failure
at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.collectPoms(UpdateOfflineRepositoryTask.groovy:207)
at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.collectRepositoryFiles(UpdateOfflineRepositoryTask.groovy:179)
at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.withRepositoryFiles(UpdateOfflineRepositoryTask.groovy:295)
at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.run(UpdateOfflineRepositoryTask.groovy:56)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
...
...

from gradle-offline-dependencies-plugin.

omidzk avatar omidzk commented on May 28, 2024

I encountered the same error too. I ran the task wit --stacktrace --debug options as you wished. The whole output is rather large and irrelevant as the problem occurs at the end when all dependencies are already fetched. Here is the relevant part of output (nearly at the end).
By the way I tested this with Gradle versions 3.0, 4.3.1, 4.6 and encountered the same error.

21:05:45.930 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Execute run for :updateOfflineRepository'
21:05:45.930 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
21:05:45.930 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':updateOfflineRepository'
21:05:45.930 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :updateOfflineRepository FAILED
21:05:45.930 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Task :updateOfflineRepository'
21:05:45.930 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Task :updateOfflineRepository' completed
21:05:45.930 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :updateOfflineRepository (Thread[Task worker for ':',5,main]) completed. Took 6.105 secs.
21:05:45.930 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.10 completed (1 worker(s) in use)
21:05:45.930 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on root.1.10
21:05:45.930 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':': released lock on :
21:05:45.931 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 6.105 secs, idle: 0.0 secs
21:05:45.931 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':updateOfflineRepository'.
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > No such property: file for class: org.gradle.api.internal.artifacts.result.DefaultUnresolvedArtifactResult
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Possible solutions: type, id, failure
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --scan to get full insights.
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':updateOfflineRepository'.
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
21:05:45.935 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: groovy.lang.MissingPropertyException: No such property: file for class: org.gradle.api.internal.artifacts.result.DefaultUnresolvedArtifactResult
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Possible solutions: type, id, failure
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.collectPoms(UpdateOfflineRepositoryTask.groovy:207)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.collectRepositoryFiles(UpdateOfflineRepositoryTask.groovy:179)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.withRepositoryFiles(UpdateOfflineRepositoryTask.groovy:295)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at io.pry.gradle.offline_dependencies.UpdateOfflineRepositoryTask.run(UpdateOfflineRepositoryTask.groovy:56)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:788)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:755)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
21:05:45.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ... 30 more
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
21:05:45.937 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 6s
21:05:45.937 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 1 actionable task: 1 executed
21:05:45.937 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
21:05:45.937 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 14: released lock on root.1
21:05:45.937 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
...

from gradle-offline-dependencies-plugin.

mdietrichstein avatar mdietrichstein commented on May 28, 2024

I still wasn't able to reproduce this error, but I could at least identify a possible cause: The plugin did not handle occurrences of UnresolvedArtifactResult correctly.

I have added a few additional checks. With version 0.4 of the plugin you should see an error log entry if the plugin is unable to resolve an artifact. The log entry looks like this: Resolver was unable to resolve artifact '<ARTIFACT ID>' and also includes a stacktrace which should explain why the artifact could not be resolved.

Let me know if this helps.

from gradle-offline-dependencies-plugin.

Related Issues (17)

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.