问题描述
我有一个以前没有的问题。我正在测试并开发了一些Osgi捆绑包。但是现在我有了一个仅是Java而不是Osgi的项目。 我想在Java项目中使用开发的Osgi捆绑软件。它应该可以正常工作。但是我有这个错误:
public class MyCustomFilter : ITelemetryProcessor
{
private ITelemetryProcessor Next { get; set; }
// next will point to the next TelemetryProcessor in the chain.
public MyCustomFilter(ITelemetryProcessor next)
{
this.Next = next;
}
public void Process(ITelemetry item)
{
TraceTelemetry traceTelemetry = item as TraceTelemetry;
if (traceTelemetry != null)
{
//use this line of code to determine which SeverityLevel should be logged. In this example,only SeverityLevel is warning and up can be logged
if (traceTelemetry.SeverityLevel < SeverityLevel.Warning) { return; }
}
this.Next.Process(item);
}
}
我100%可以确定我的图书馆在Maven Central中。而且,它也不会抱怨globalpomutils-exec,这也是一个捆绑包。为什么它只抱怨那些?
globalpomutils-exec是一个捆绑软件,其中包含其他捆绑软件作为依赖项。
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
services.AddApplicationInsightsTelemetry();
//register your custom TelemetryProcessor
services.AddApplicationInsightsTelemetryProcessor<MyCustomFilter>();
}
[ERROR] Failed to execute goal on project dwarfhustle-heightmap-anl: Could not resolve dependencies for project com.anrisoftware.dwarfhustle:dwarfhustle-heightmap-anl:jar:0.0.1-SNAPSHOT: The following artifacts Could not be resolved: com.anrisoftware.globalpom:globalpom-log:bundle:4.5.2,com.anrisoftware.globalpom:globalpomutils-threads:bundle:4.5.2,com.anrisoftware.propertiesutils:propertiesutils-contextproperties:bundle:4.5.2: Failure to find com.anrisoftware.globalpom:globalpom-log:bundle:4.5.2 in https://repo.maven.apache.org/maven2 was cached in the local repository,resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
pom.xml是:
<dependency>
<groupId>com.anrisoftware.globalpom</groupId>
<artifactId>globalpomutils-threads</artifactId>
<type>bundle</type>
</dependency>
致谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)