如何解决渐变缺少传递依存关系
我正在项目中导入一个依赖项,该依赖项本身需要另一个依赖项(com.discord4j)。如下面的'/*'
命令的输出所示,Gradle似乎意识到了这种传递依赖性(discord4j如com.bancarelvalentin.genericbot在编译和运行时所要求的那样显示)。但是我无法导入它,因为它的名称无法解析。
关于gradle,我不是专家,所以我肯定会错过一些显而易见的东西。任何人都可以帮助找到什么?
编辑:毕竟,似乎传递依赖项未添加到compileClasspath中。为什么呢
编辑2:我修复了根库POM文件; here可用,但是上面的屏幕截图仍然是我在compileClasspath中得到的;我已经清除了所有缓存(InteliJ et Gradle),但是雄性gradle不会将那个lib放在类路径中
gradle dependencies
解决方法
views.py
发布的pom是什么?
如果class EventUpdateView(LoginRequiredMixin,UpdateView):
""" this view renders the update form that allows service desk operators to update event status,ownership and event notes
"""
model = Event
form_class = EventForm
template_name = "metamonitor/event_update_form.html"
def get_initial(self):
""" returns the initial data to populate form field on this view.
We override this method to customize the `owner` initial value to the
default event owner.
"""
initial = super().get_initial()
# the event instance being updated
event = self.get_object()
# this expression returns a queryset containing only 1 item,# like <QuerySet [<User: operator2>]>
initial['owner'] = User.objects.filter(pk=event.owner.pk)
return initial
# without this,after a successfull event update we would get an error
# because django needs a valid url to redirect to.
def get_success_url(self):
# app_name:url_name,as defined in the corresponding path() `name` argument in urls.py
return reverse("metamonitor:event_update",kwargs={"pk": self.object.pk})
模块仅具有com.bancarelvalentin:genericbot
依赖项,那么您将在编译类路径中看不到它们,因此IDE不会检测到它们。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。