Drools WorkBench Settings.xml添加远程存储库



我在drools workbench中得到以下错误:

17:40:29,027 ERROR [stderr] (default task-11) javax.net.ssl|DEBUG|E4|default task-11|2022-05-23 17:40:29.027 UTC|SSLSocketImpl.java:1361|close the underlying socket
17:40:29,027 ERROR [stderr] (default task-11) javax.net.ssl|DEBUG|E4|default task-11|2022-05-23 17:40:29.027 UTC|SSLSocketImpl.java:1380|close the SSL connection (initiative)
17:40:29,030 INFO  [org.appformer.maven.integration.MavenRepository] (default task-11) Erasing directory from local maven repository /opt/jboss/.m2/repository/org/kie/kie-api/7.56.0.Final
17:40:29,031 ERROR [org.appformer.maven.integration.embedder.MavenProjectLoader] (default task-11) Unable to create MavenProject from InputStream: org.apache.maven.project.ProjectBuildingException: 1 problem was encountered while building the effective model
[FATAL] Non-readable POM : input contained no data @
for project
(...)
17:40:29,042 ERROR [org.kie.workbench.common.services.backend.builder.core.Builder] (default task-20) org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for org.default:artifact:jar:1.0.0: java.lang.RuntimeException: org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for org.default:artifact:jar:1.0.0
(...)
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for org.default:artifact:jar:1.0.0
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:208)
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at deployment.business-central.war//org.appformer.maven.integration.MavenRepository.getArtifactDependecies(MavenRepository.java:126)
... 99 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.default:artifact:jar:1.0.0
at deployment.business-central.war//org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
at deployment.business-central.war//org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:202)
... 101 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.default:artifact:pom:1.0.0 from/to central (https://repo1.maven.org/maven2/): Connection reset
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at deployment.business-central.war//org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
... 103 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.default:artifact:pom:1.0.0 from/to central (https://repo1.maven.org/maven2/): Connection reset
at deployment.business-central.war//org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at deployment.business-central.war//org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at deployment.business-central.war//org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at deployment.business-central.war//org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at deployment.business-central.war//org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at deployment.business-central.war//org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 106 more
Caused by: javax.net.ssl.SSLException: Connection reset

我认为问题是该项目正试图从"repo1.maven.org"one_answers";repo.maven.apache.org"当我需要项目从我的库中下载依赖项时。

为此,我采用了以下方法:

1。在JAVA_OPTS中添加变量:

-Dorg.guvnor.m2repo.dir =/opt/jboss/.m2/库

-Dkie.maven.settings.custom =/opt/jboss/.m2 settings.xml

-Dorg.appformer.m2repo.url = https://scdvlcfs02.stc.com.sa/nexus/repository/celfocus-maven-group

2。使用JAVA_OPTS变量org.kie.workbench.profile=FULL将以下行添加到standalone-full.xml

<system-properties>
<property name="org.guvnor.m2repo.dir" value="/opt/jboss/.m2/repository" />
<property name="org.appformer.m2repo.url" value="https://scdvlcfs02.stc.com.sa/nexus/repository/celfocus-maven-group" />
<property name="kie.maven.settings.custom" value="/opt/jboss/.m2/settings.xml" />
</system-properties>

当然,我还在"/opt/jboss/.m2/settings.xml"中添加了settings.xml,内容如下:

<settings>
<servers>
<server>
<id>drools-maven</id>
<username>${env.KIE_MAVEN_REPO_USER}</username>
<password>${env.KIE_MAVEN_REPO_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>drools-maven</id>
<name>Drools Maven Repository</name>
<url>${env.KIE_MAVEN_REPO}</url>

<!-- Include these to always update the repository -->
<releases>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>

但是drools工作台继续尝试与"repo1.maven.org"one_answers";repo.maven.apache.org"。什么好主意吗?

我在这个问题上一个星期,完全迷路了。提前谢谢。

我们似乎不能否认drools(jboss)不查看Maven中心。

我在settings xml中维护了Maven中心和我的仓库的配置。

然后我通过将POM<scope>provided</scope>放入需要从我的仓库下载的所有依赖项中来修复此问题

相关内容

  • 没有找到相关文章

最新更新