kieService trying to connect to repo1.maven.org when creating new KieContainer from releaseId

2,893 views
Skip to first unread message

Philipp Volkemer

unread,
Feb 19, 2015, 5:52:21 AM2/19/15
to drools...@googlegroups.com
Hi,

our problem looks like a Maven configuration issue but I'm asking it in this forum nonetheless since I couldn't find any documentation from Drools on how
to correctly setup maven in order to work with Drools.

First of all, here's how we create our kieContainer:

KieServices kieServices = KieServices.Factory.get();

ReleaseId releaseId = kieServices.newReleaseId("foo.bar", "artifact-name", "1.0.0-SNAPSHOT");

kContainer = kieServices.newKieContainer(releaseId);

This is the settings.xml that should be used by our application server (wildfly system property kie.maven.settings.custom set to "/home/myuser/.m2/settings.xml"):

<?xml version="1.0"?>
<settings>
  <localRepository>/opt/foo/mavenrepo</localRepository>
  <profiles>
    <profile>
      <id>nexus</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>nexus</id>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
</settings>


When we call our Rules Service it pauses for like 20 seconds and then retrieves the rules artifact from "ournexusserver" and stores it in the local maven repository.
However, in the reslover-status.properties of the rules artifact we see the following:

#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Thu Jan 29 15:41:00 CET 2015
maven-metadata-local.xml.lastUpdated=1422534634178
maven-metadata-central.xml.error=Could not transfer metadata foo.bar\:artifact-name\:1.0.0-SNAPSHOT/maven-metadata.xml from/to central (http\://repo1.maven.org/maven2/)\: Connection refused
maven-metadata-central.xml/default-http\://repo1.maven.org/maven2/.lastUpdated=1422534634327
maven-metadata-nexus.xml.lastUpdated=1422542460018
maven-metadata-local.xml.error=


So it seems to try to connect to repo1.maven.org first and look for our artifact there which, of course, doesn't make sense.

You might propose to include a <mirrors> section in the settings.xml like the following:

<mirrors>
<mirror>
<id>ournexus</id>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>

However, if we do this then the whole artifact retrieval process fails with the following exception:

11:32:24,981 WARN  [8e38ebe8-ae10-4539-9ca5-4dbb6364fa07] [MavenRepository] Unable to resolve artifact: foo.bar:artifact-name:pom:1.0.0-SNAPSHOT: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact foo.bar:artifact-name:pom:1.0.0-SNAPSHOT from/to ournexus (http://ournexusserver:8081/nexus/content/groups/public): No connector available to access repository ournexus (http://ournexusserver:8081/nexus/content/groups/public) of type  using the available factories FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) [aether-impl-1.13.1.jar:]
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) [aether-impl-1.13.1.jar:]
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193) [aether-impl-1.13.1.jar:]
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286) [aether-impl-1.13.1.jar:]
        at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:205) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
        at org.kie.scanner.ArtifactResolver.getPomFileForGAV(ArtifactResolver.java:106) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
        at org.kie.scanner.ArtifactResolver.getResolverFor(ArtifactResolver.java:72) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
        at org.kie.scanner.KieRepositoryScannerImpl.loadPomArtifact(KieRepositoryScannerImpl.java:125) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
        at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:101) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
        at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:93) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:114) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:100) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:77) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:97) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
        at foo.bar.service.rules.RulesService.createContainerWithNameAndVersion(RulesService.java:70) [classes:]
        at foo.bar.service.rules.RulesService.getInstanceForContainer(RulesService.java:106) [classes:]
        at foo.bar.service.personalization.PersonalizationService.checkPersonalization(PersonalizationService.java:73) [classes:]
        at foo.bar.service.api.ApiService.checkPersonalization(ApiService.java:213) [classes:]
        at foo.bar.service.api.ApiService$Proxy$_$$_WeldClientProxy.checkPersonalization(Unknown Source) [classes:]
        at foo.bar.frontend.api.ApiPersonalizationRest.checkPersonalization(ApiPersonalizationRest.java:68) [classes:]
        at foo.bar.frontend.api.ApiPersonalizationRest$Proxy$_$$_WeldClientProxy.checkPersonalization(Unknown Source) [classes:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_71]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_71]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_71]
        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_71]
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.10.Final.jar:]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
        at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]


So the question is: How do we need to configure Maven/Drools so that it talks to our nexus server directly and doesn't try to get to repo1.maven.org?


Philipp Volkemer

unread,
Feb 23, 2015, 8:13:36 AM2/23/15
to drools...@googlegroups.com
Ok, here's the answer.
I looked through the kie-ce sourceode and found the root cause in the class Ather.java.

The following method adds repo1.maven.org to the list of repositories that are searched:

 private RemoteRepository newCentralRepository() {
        return new RemoteRepository( "central", "default", "http://repo1.maven.org/maven2/" );
    }

This method is called here:

 private Collection<RemoteRepository> initRepositories(MavenProject mavenProject) {
        Collection<RemoteRepository> reps = new HashSet<RemoteRepository>();
        //reps.add(newCentralRepository());
        if (mavenProject != null) {
            reps.addAll(mavenProject.getRemoteProjectRepositories());
        }

        RemoteRepository localRepo = newLocalRepository();
        if (localRepo != null) {
            reps.add(localRepo);
            localRepository = localRepo;
        } else {
            localRepoDir = IoUtils.getTmpDirectory().getAbsolutePath();
        }
        return reps;
    }

As you can see I just commented out the line that adds the central repo and now we don't have to wait 15s for our kieContainer to load the rules from our internal Nexus repository while trying to reach repo1.maven.org without success.

Not sure if any of the drools developers is reading this but it might be interesting to know if there is another way to tell kie-ci not to connect to repo1.maven.org.

Mario Fusco

unread,
Feb 24, 2015, 3:44:03 AM2/24/15
to drools...@googlegroups.com
Hi Philipp,

thanks a lot for having reported this.
I'll give a look asap and eventually provide a fix.

Cheers,
Mario

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/92fd0bfd-8a24-4861-ab4e-692de83a1835%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mario Fusco

unread,
Feb 24, 2015, 4:28:56 AM2/24/15
to drools...@googlegroups.com
Hi again Philipp,

I tried to give a look at this but at the moment I don't agree with your analysis nor I've been able to reproduce the problem.

In more details what you wrote about what happens in the Aether class is correct but it's only part of the story. The maven repositories used to perform a given request are collected in the method MavenRepository.initRemoteRepositoriesForRequest and in particular here it iterates through the repos created by the Aether class https://github.com/droolsjbpm/drools/blob/6.1.x/kie-ci/src/main/java/org/kie/scanner/MavenRepository.java#L99 (I'm pointing to the 6.1.x branch because it seems you're using the 6.1.0 release but please advice if you're on a different version).

As you can see there, each repository (including the central maven one) before being added to the set of repositories to be used in a request is checked using the resolveMirroredRepo method that in turn uses the isMirror that always returns true if you use the * wildcard as you did: https://github.com/droolsjbpm/drools/blob/6.1.x/kie-ci/src/main/java/org/kie/scanner/MavenRepository.java#L117

Please advice if you think it is happening something different from what I described and possibly provide a reproducer for you problem.

Thanks,
Mario

Philipp Volkemer

unread,
Mar 18, 2015, 5:25:48 AM3/18/15
to drools...@googlegroups.com
Hi Mario,

I must admit that it is a bit difficult for me to provide a small example application to demonstrate the issue since we are working on a bigger Java EE 7 application that uses Drools in its Rules Service.
We currently have 2 scenarios that do not work as expected:
1. If we use a <mirror> section in the settings.xml that is used by our application (by setting the kie.maven.settings.custom property on the application server) we get the following Exception:
WARN  MavenRepository - Unable to resolve artifact: com.swisscom.contactcenter.sccp.dice:dice-rules-personalization:1.0.0-SNAPSHOT
org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact foo.bar:rules-artifact:jar:1.0.0-SNAPSHOT from/to ourhost-nexus (http://ourhost:8081/nexus/content/groups/public): No connector available to access repository sdsccpivr11-nexus (http://ourhost:8081/nexus/content/groups/public) of type  using the available factories FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory

2. If we remove the <mirrors> section from the settings.xml the rules are retrieved from the configured nexus in our LAN but it takes around 15-17 seconds until this is finally done. In the meantime it seems a connection attempt is made to repo1.maven.org although this should be disabled in our settings.xml. There is no log output so we don't really know what's going on in this pause. Here is our settings.xml that is used during runtime:
<?xml version="1.0"?>
<settings>
  <localRepository>/opt/sccp/mavenrepo</localRepository>
  <profiles>
    <profile>
      <id>nexus-profile</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>nexus</id>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </snapshots>
        </repository>
        <repository>
          <id>central</id>
          <url>http://repo1.maven.org/maven2</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
</settings>


I'm pretty sure this is a maven issue and not a rules issue but after searching the web for weeks I couldn't find any hint what the problem might be.
Also, inside the rules JAR there is the pom.xml from our source project and I'm not sure if something should be changed there.

Also, we are using SNAPSHOT versions for our rules artifacts so maybe this is a problem?

I think I'll have to try to create a small sample project (on "Rules Service" project and one "rules" project) to reproduce the issue.

Mario Fusco

unread,
Mar 18, 2015, 2:29:46 PM3/18/15
to drools...@googlegroups.com
Hi Philipp,

I'm sorry but I still cannot reproduce this issue on my side.
Did you check if you have the same problem also with the 6.2.0.Final? If so it would be really helpful if you could send me a reproducer.

Thanks a lot,
Mario

Philipp Volkemer

unread,
Mar 19, 2015, 9:56:18 AM3/19/15
to drools...@googlegroups.com
Hi Mario,

I have upgraded to 6.2.0.Final and it seems like a dependency to a jboss integration bom can not be resolved. Intead of using our internal nexus it is trying to go directly to repo.maven.apache.org/maven2:

DEBUG KieRepositoryImpl - KieModule Lookup. ReleaseId foo.bar:our-artifact:1.0.0-SNAPSHOT was not in cache, checking classpath
DEBUG KieRepositoryImpl - KieModule Lookup. ReleaseId foo.bar:our-artifact:1.0.0-SNAPSHOT was not in cache, checking maven repository
DEBUG DefaultLocalRepositoryProvider - Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
DEBUG DefaultLocalRepositoryProvider - Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
DEBUG DefaultArtifactResolver - Verifying availability of Z:\mavenrepo\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom from [central (http://repo.maven.apache.org/maven2, default, releases), jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/, default, releases+snapshots)]
DEBUG DefaultTransporterProvider - Using transporter HttpTransporter with priority 5.0 for http://repo.maven.apache.org/maven2
DEBUG DefaultRepositoryConnectorProvider - Using connector BasicRepositoryConnector with priority 0.0 for http://repo.maven.apache.org/maven2
DEBUG PoolingClientConnectionManager - Connection request: [route: {}->http://repo.maven.apache.org][total kept alive: 0; route allocated: 0 of 50; total allocated: 0 of 100]
DEBUG PoolingClientConnectionManager - Connection leased: [id: 0][route: {}->http://repo.maven.apache.org][total kept alive: 0; route allocated: 1 of 50; total allocated: 1 of 100]
DEBUG DefaultClientConnectionOperator - Connecting to repo.maven.apache.org:80
DEBUG DefaultClientConnection - Connection org.apache.http.impl.conn.DefaultClientConnection@e438228 closed
DEBUG DefaultClientConnection - Connection org.apache.http.impl.conn.DefaultClientConnection@e438228 shut down
DEBUG DefaultClientConnection - Connection org.apache.http.impl.conn.DefaultClientConnection@e438228 closed
DEBUG PoolingClientConnectionManager - Connection released: [id: 0][route: {}->http://repo.maven.apache.org][total kept alive: 0; route allocated: 0 of 50; total allocated: 0 of 100]
DEBUG DefaultUpdateCheckManager - Writing tracking file Z:\mavenrepo\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom.lastUpdated
DEBUG DefaultTransporterProvider - Using transporter HttpTransporter with priority 5.0 for https://repository.jboss.org/nexus/content/groups/public/
DEBUG DefaultRepositoryConnectorProvider - Using connector BasicRepositoryConnector with priority 0.0 for https://repository.jboss.org/nexus/content/groups/public/
DEBUG PoolingClientConnectionManager - Connection request: [route: {s}->https://repository.jboss.org][total kept alive: 0; route allocated: 0 of 50; total allocated: 0 of 100]
DEBUG PoolingClientConnectionManager - Connection leased: [id: 1][route: {s}->https://repository.jboss.org][total kept alive: 0; route allocated: 1 of 50; total allocated: 1 of 100]
DEBUG DefaultClientConnectionOperator - Connecting to repository.jboss.org:443
DEBUG DefaultClientConnection - Connection org.apache.http.impl.conn.DefaultClientConnection@53298398 closed
DEBUG DefaultClientConnection - Connection org.apache.http.impl.conn.DefaultClientConnection@53298398 shut down
DEBUG DefaultClientConnection - Connection org.apache.http.impl.conn.DefaultClientConnection@53298398 closed
DEBUG PoolingClientConnectionManager - Connection released: [id: 1][route: {s}->https://repository.jboss.org][total kept alive: 0; route allocated: 0 of 50; total allocated: 0 of 100]
DEBUG DefaultUpdateCheckManager - Writing tracking file Z:\mavenrepo\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom.lastUpdated
DEBUG DefaultArtifactResolver - Verifying availability of Z:\mavenrepo\repository\org\jboss\shrinkwrap\shrinkwrap-bom\1.2.2\shrinkwrap-bom-1.2.2.pom from [central (http://repo.maven.apache.org/maven2, default, releases)]


This is part of the output from a "mvn clean install" of our master project.
It is using the Maven configuration in my M2_HOME directory which is as follows:
<settings>
<servers>
<server>
<id>releases</id>
<username>user</username>
<password>pass</password>
</server>
<server>
<id>snapshots</id>
<username>user</username>
<password>pass</password>
</server>
</servers>
<proxies>
<proxy>
<id>myid</id>
<active>false</active>
<protocol>http</protocol>
<host>myip</host>
<port>myport</port>
<nonProxyHosts>exceptionhost</nonProxyHosts>
</proxy>
</proxies>
<mirrors>
<mirror>
<id>mynexushost-nexus</id>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<localRepository>Z:\mavenrepo\repository\</localRepository>
<profiles>
<profile>
<id>nexus</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Maven Plugin Repository</name>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>

Philipp Volkemer

unread,
Mar 20, 2015, 6:17:29 AM3/20/15
to drools...@googlegroups.com
Hi Mario,

I have tried to create a little Reproducer-Application that uses the Rules in the same way that we do in our JEE Application.
I have M2_HOME on my local PC set to a path with the following settings.xml used for the test:
<settings>
<servers>
<server>
<id>releases</id>
<username>deployment</username>
<password>deployment123</password>
</server>
<server>
<id>snapshots</id>
<username>deployment</username>
<password>deployment123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<localRepository>Z:\mavenrepo\repository\</localRepository>
</settings>

Server "nexus" is running a Sonatype OSS Nexus and contains the artifacts for drools-model and rules-artifact.
When I run the RulesReproducer.java from IDEA I get the following lengthy log output where it shows that after getting the rules artifact it's trying to connect to the outside world:

"C:\Program Files (x86)\Java\jdk1.7.0_71\bin\java" -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\plugins\junit\lib\junit-rt.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\deploy.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\javaws.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\jfr.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\jfxrt.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\management-agent.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\plugin.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\access-bridge-32.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\dnsns.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\jaccess.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\localedata.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\sunec.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\sunjce_provider.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\sunmscapi.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\sunpkcs11.jar;C:\Program Files (x86)\Java\jdk1.7.0_71\jre\lib\ext\zipfs.jar;Z:\development\IntelliJ-Projects\Reproducer\Main\target\test-classes;Z:\mavenrepo\repository\junit\junit\4.11\junit-4.11.jar;Z:\mavenrepo\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;Z:\mavenrepo\repository\org\kie\kie-api\6.2.0.Final\kie-api-6.2.0.Final.jar;Z:\development\IntelliJ-Projects\Reproducer\Model\target\classes;Z:\mavenrepo\repository\org\slf4j\slf4j-api\1.7.10\slf4j-api-1.7.10.jar;Z:\mavenrepo\repository\org\apache\logging\log4j\log4j-slf4j-impl\2.1\log4j-slf4j-impl-2.1.jar;Z:\mavenrepo\repository\org\apache\logging\log4j\log4j-api\2.1\log4j-api-2.1.jar;Z:\mavenrepo\repository\org\apache\logging\log4j\log4j-core\2.1\log4j-core-2.1.jar;Z:\mavenrepo\repository\org\kie\kie-internal\6.2.0.Final\kie-internal-6.2.0.Final.jar;Z:\mavenrepo\repository\org\mvel\mvel2\2.2.4.Final\mvel2-2.2.4.Final.jar;Z:\mavenrepo\repository\org\kie\kie-ci\6.2.0.Final\kie-ci-6.2.0.Final.jar;Z:\mavenrepo\repository\org\drools\drools-core\6.2.0.Final\drools-core-6.2.0.Final.jar;Z:\mavenrepo\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;Z:\mavenrepo\repository\org\drools\drools-compiler\6.2.0.Final\drools-compiler-6.2.0.Final.jar;Z:\mavenrepo\repository\org\antlr\antlr-runtime\3.5\antlr-runtime-3.5.jar;Z:\mavenrepo\repository\org\eclipse\jdt\core\compiler\ecj\4.3.1\ecj-4.3.1.jar;Z:\mavenrepo\repository\com\thoughtworks\xstream\xstream\1.4.7\xstream-1.4.7.jar;Z:\mavenrepo\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;Z:\mavenrepo\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;Z:\mavenrepo\repository\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;Z:\mavenrepo\repository\org\apache\maven\maven-artifact\3.2.2\maven-artifact-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-core\3.2.2\maven-core-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-repository-metadata\3.2.2\maven-repository-metadata-3.2.2.jar;Z:\mavenrepo\repository\org\codehaus\plexus\plexus-interpolation\1.19\plexus-interpolation-1.19.jar;Z:\mavenrepo\repository\org\codehaus\plexus\plexus-component-annotations\1.5.5\plexus-component-annotations-1.5.5.jar;Z:\mavenrepo\repository\org\sonatype\plexus\plexus-sec-dispatcher\1.3\plexus-sec-dispatcher-1.3.jar;Z:\mavenrepo\repository\org\apache\maven\maven-model\3.2.2\maven-model-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-model-builder\3.2.2\maven-model-builder-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-plugin-api\3.2.2\maven-plugin-api-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-settings\3.2.2\maven-settings-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-settings-builder\3.2.2\maven-settings-builder-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-compat\3.2.2\maven-compat-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\maven-aether-provider\3.2.2\maven-aether-provider-3.2.2.jar;Z:\mavenrepo\repository\org\apache\maven\wagon\wagon-provider-api\1.0\wagon-provider-api-1.0.jar;Z:\mavenrepo\repository\org\codehaus\plexus\plexus-classworlds\2.5.1\plexus-classworlds-2.5.1.jar;Z:\mavenrepo\repository\org\codehaus\plexus\plexus-utils\3.0.17\plexus-utils-3.0.17.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-api\1.0.0.v20140518\aether-api-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-util\1.0.0.v20140518\aether-util-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-impl\1.0.0.v20140518\aether-impl-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-connector-basic\1.0.0.v20140518\aether-connector-basic-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-spi\1.0.0.v20140518\aether-spi-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-transport-wagon\1.0.0.v20140518\aether-transport-wagon-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-transport-file\1.0.0.v20140518\aether-transport-file-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\eclipse\aether\aether-transport-http\1.0.0.v20140518\aether-transport-http-1.0.0.v20140518.jar;Z:\mavenrepo\repository\org\apache\httpcomponents\httpclient\4.2.6\httpclient-4.2.6.jar;Z:\mavenrepo\repository\org\slf4j\jcl-over-slf4j\1.6.2\jcl-over-slf4j-1.6.2.jar;Z:\mavenrepo\repository\org\eclipse\sisu\org.eclipse.sisu.plexus\0.0.0.M5\org.eclipse.sisu.plexus-0.0.0.M5.jar;Z:\mavenrepo\repository\javax\enterprise\cdi-api\1.0\cdi-api-1.0.jar;Z:\mavenrepo\repository\javax\annotation\jsr250-api\1.0\jsr250-api-1.0.jar;Z:\mavenrepo\repository\com\google\guava\guava\10.0.1\guava-10.0.1.jar;Z:\mavenrepo\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;Z:\mavenrepo\repository\org\eclipse\sisu\org.eclipse.sisu.inject\0.0.0.M5\org.eclipse.sisu.inject-0.0.0.M5.jar;Z:\mavenrepo\repository\org\apache\ant\ant\1.8.2\ant-1.8.2.jar;Z:\mavenrepo\repository\org\apache\ant\ant-launcher\1.8.2\ant-launcher-1.8.2.jar;Z:\mavenrepo\repository\org\apache\maven\wagon\wagon-http\2.0\wagon-http-2.0.jar;Z:\mavenrepo\repository\org\apache\maven\wagon\wagon-http-shared4\2.0\wagon-http-shared4-2.0.jar;Z:\mavenrepo\repository\org\jsoup\jsoup\1.6.1\jsoup-1.6.1.jar;Z:\mavenrepo\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;Z:\mavenrepo\repository\commons-io\commons-io\2.0.1\commons-io-2.0.1.jar;Z:\mavenrepo\repository\org\apache\httpcomponents\httpcore\4.3.3\httpcore-4.3.3.jar;Z:\mavenrepo\repository\org\sonatype\plexus\plexus-cipher\1.4\plexus-cipher-1.4.jar;Z:\mavenrepo\repository\org\sonatype\sisu\sisu-guice\3.1.0\sisu-guice-3.1.0-no_aop.jar;Z:\mavenrepo\repository\javax\inject\javax.inject\1\javax.inject-1.jar;Z:\mavenrepo\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 de.volkemer.RulesReproducer
2015-03-20 11:16:30,292 DEBUG [KieRepositoryImpl] KieModule Lookup. ReleaseId de.volkemer:rules-artifact:1.0.0-SNAPSHOT was not in cache, checking classpath
2015-03-20 11:16:30,293 DEBUG [KieRepositoryImpl] KieModule Lookup. ReleaseId de.volkemer:rules-artifact:1.0.0-SNAPSHOT was not in cache, checking maven repository
2015-03-20 11:16:31,598 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:31,604 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:31,652 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:31,661 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:rules-artifact:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:31,796 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:rules-artifact:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:31,797 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:rules-artifact:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:31,874 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:drools-model:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:31,876 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:drools-model:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:31,886 DEBUG [DefaultDependencyCollector] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, ConflictIdSorter.graphTime=1, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=2, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=3, ConflictResolver.conflictItemCount=2, DefaultDependencyCollector.collectTime=86, DefaultDependencyCollector.transformTime=7}
2015-03-20 11:16:31,887 DEBUG [KieRepositoryImpl] KieModule Lookup. ReleaseId de.volkemer:drools-model:1.0.0-SNAPSHOT was not in cache, checking classpath
2015-03-20 11:16:31,887 DEBUG [KieRepositoryImpl] KieModule Lookup. ReleaseId de.volkemer:drools-model:1.0.0-SNAPSHOT was not in cache, checking maven repository
2015-03-20 11:16:31,888 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:drools-model:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:31,890 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:drools-model:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:32,571 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:32,572 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:32,581 DEBUG [DefaultArtifactResolver] Verifying availability of Z:\mavenrepo\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom from [central (http://repo.maven.apache.org/maven2, default, releases), jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/, default, releases+snapshots)]
2015-03-20 11:16:32,588 DEBUG [DefaultDependencyCollector] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=1, DefaultDependencyCollector.transformTime=0}
2015-03-20 11:16:33,179 INFO  [KieRepositoryImpl] KieModule was added: ZipKieModule[releaseId=de.volkemer:rules-artifact:1.0.0-SNAPSHOT,file=Z:\mavenrepo\repository\de\volkemer\rules-artifact\1.0.0-SNAPSHOT\rules-artifact-1.0.0-SNAPSHOT.jar]
2015-03-20 11:16:33,866 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:33,867 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:33,873 DEBUG [DefaultArtifactResolver] Verifying availability of Z:\mavenrepo\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom from [central (http://repo.maven.apache.org/maven2, default, releases), jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/, default, releases+snapshots)]
2015-03-20 11:16:33,876 DEBUG [DefaultDependencyCollector] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=2, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=1, DefaultDependencyCollector.transformTime=0}
2015-03-20 11:16:34,252 DEBUG [KnowledgeBaseImpl] Starting Engine in PHREAK mode
2015-03-20 11:16:34,364 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:rules-artifact:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:35,035 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:35,036 DEBUG [DefaultLocalRepositoryProvider] Using manager EnhancedLocalRepositoryManager with priority 10.0 for Z:\mavenrepo\repository
2015-03-20 11:16:35,041 DEBUG [DefaultArtifactResolver] Verifying availability of Z:\mavenrepo\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom from [central (http://repo.maven.apache.org/maven2, default, releases), jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/, default, releases+snapshots)]
2015-03-20 11:16:35,043 WARN  [KieScanner] Cannot use native maven pom parser, fall back to the internal one
java.lang.RuntimeException: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.kie:kie-parent-metadata:6.2.0.Final: Failure to transfer org.jboss.integration-platform:jboss-integration-platform-parent:pom:6.0.0.CR25 from http://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. Original error: Could not transfer artifact org.jboss.integration-platform:jboss-integration-platform-parent:pom:6.0.0.CR25 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused @ org.kie:kie-parent-metadata:6.2.0.Final, Z:\mavenrepo\repository\org\kie\kie-parent-metadata\6.2.0.Final\kie-parent-metadata-6.2.0.Final.pom, line 6, column 11
[ERROR] 'dependencies.dependency.version' for org.drools:drools-compiler:jar is missing. @ line 32, column 21

at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:30) ~[kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:17) ~[kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.ArtifactResolver.getResolverFor(ArtifactResolver.java:88) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.ArtifactResolver.getResolverFor(ArtifactResolver.java:74) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.setKieContainer(KieRepositoryScannerImpl.java:72) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieScanner(KieServicesImpl.java:115) [drools-compiler-6.2.0.Final.jar:6.2.0.Final]
at de.volkemer.RulesReproducer.setupClass(RulesReproducer.java:34) [test-classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:?]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:?]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:?]
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) [junit-4.11.jar:?]
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:?]
at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:?]
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) [junit-rt.jar:?]
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) [junit-rt.jar:?]
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) [junit-rt.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]
Caused by: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.kie:kie-parent-metadata:6.2.0.Final: Failure to transfer org.jboss.integration-platform:jboss-integration-platform-parent:pom:6.0.0.CR25 from http://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. Original error: Could not transfer artifact org.jboss.integration-platform:jboss-integration-platform-parent:pom:6.0.0.CR25 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused @ org.kie:kie-parent-metadata:6.2.0.Final, Z:\mavenrepo\repository\org\kie\kie-parent-metadata\6.2.0.Final\kie-parent-metadata-6.2.0.Final.pom, line 6, column 11
[ERROR] 'dependencies.dependency.version' for org.drools:drools-compiler:jar is missing. @ line 32, column 21

at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:405) ~[maven-core-3.2.2.jar:3.2.2]
at org.kie.scanner.embedder.MavenEmbedder.buildProjects(MavenEmbedder.java:335) ~[kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.embedder.MavenEmbedder.readProjects(MavenEmbedder.java:319) ~[kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.embedder.MavenEmbedder.readProject(MavenEmbedder.java:312) ~[kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:28) ~[kie-ci-6.2.0.Final.jar:6.2.0.Final]
... 24 more
2015-03-20 11:16:35,087 DEBUG [DefaultDependencyCollector] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=24, DefaultDependencyCollector.transformTime=0}
2015-03-20 11:16:35,088 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:drools-model:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:35,089 DEBUG [DefaultUpdateCheckManager] Skipped remote request for de.volkemer:drools-model:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
2015-03-20 11:16:35,091 DEBUG [DefaultDependencyCollector] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=1, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=1, DefaultDependencyCollector.collectTime=4, DefaultDependencyCollector.transformTime=0}
2015-03-20 11:16:35,199 DEBUG [DefaultTransporterProvider] Using transporter HttpTransporter with priority 5.0 for http://nexus:8081/nexus/content/groups/public
2015-03-20 11:16:35,200 DEBUG [DefaultRepositoryConnectorProvider] Using connector BasicRepositoryConnector with priority 0.0 for http://nexus:8081/nexus/content/groups/public
2015-03-20 11:16:35,234 DEBUG [PoolingClientConnectionManager] Connection request: [route: {}->http://nexus:8081][total kept alive: 0; route allocated: 0 of 50; total allocated: 0 of 100]
2015-03-20 11:16:35,243 DEBUG [PoolingClientConnectionManager] Connection leased: [id: 0][route: {}->http://nexus:8081][total kept alive: 0; route allocated: 1 of 50; total allocated: 1 of 100]
2015-03-20 11:16:35,245 DEBUG [DefaultClientConnectionOperator] Connecting to nexus:8081
2015-03-20 11:16:35,300 DEBUG [RequestAddCookies] CookieSpec selected: best-match
2015-03-20 11:16:35,312 DEBUG [RequestTargetAuthentication] Target auth state: UNCHALLENGED
2015-03-20 11:16:35,313 DEBUG [RequestProxyAuthentication] Proxy auth state: UNCHALLENGED
2015-03-20 11:16:35,313 DEBUG [DefaultHttpClient] Attempt 1 to execute request
2015-03-20 11:16:35,313 DEBUG [DefaultClientConnection] Sending request: GET /nexus/content/groups/public/org/drools/drools-bom/6.2.0.Final/drools-bom-6.2.0.Final.jar HTTP/1.1
2015-03-20 11:16:35,314 DEBUG [wire] >> "GET /nexus/content/groups/public/org/drools/drools-bom/6.2.0.Final/drools-bom-6.2.0.Final.jar HTTP/1.1[\r][\n]"
2015-03-20 11:16:35,315 DEBUG [wire] >> "Cache-Control: no-cache, no-store[\r][\n]"
2015-03-20 11:16:35,315 DEBUG [wire] >> "Pragma: no-cache[\r][\n]"
2015-03-20 11:16:35,315 DEBUG [wire] >> "Accept-Encoding: gzip,deflate[\r][\n]"
2015-03-20 11:16:35,315 DEBUG [wire] >> "Host: nexus:8081[\r][\n]"
2015-03-20 11:16:35,315 DEBUG [wire] >> "Connection: Keep-Alive[\r][\n]"
2015-03-20 11:16:35,315 DEBUG [wire] >> "User-Agent: Aether[\r][\n]"
2015-03-20 11:16:35,316 DEBUG [wire] >> "[\r][\n]"
2015-03-20 11:16:35,316 DEBUG [headers] >> GET /nexus/content/groups/public/org/drools/drools-bom/6.2.0.Final/drools-bom-6.2.0.Final.jar HTTP/1.1
2015-03-20 11:16:35,316 DEBUG [headers] >> Cache-Control: no-cache, no-store
2015-03-20 11:16:35,316 DEBUG [headers] >> Pragma: no-cache
2015-03-20 11:16:35,316 DEBUG [headers] >> Accept-Encoding: gzip,deflate
2015-03-20 11:16:35,316 DEBUG [headers] >> Host: nexus:8081
2015-03-20 11:16:35,316 DEBUG [headers] >> Connection: Keep-Alive
2015-03-20 11:16:35,317 DEBUG [headers] >> User-Agent: Aether
2015-03-20 11:16:35,360 DEBUG [wire] << "HTTP/1.1 404 Not Found[\r][\n]"
2015-03-20 11:16:35,362 DEBUG [wire] << "Date: Fri, 20 Mar 2015 10:16:35 GMT[\r][\n]"
2015-03-20 11:16:35,362 DEBUG [wire] << "Server: Nexus/2.11.2-03[\r][\n]"
2015-03-20 11:16:35,362 DEBUG [wire] << "X-Frame-Options: SAMEORIGIN[\r][\n]"
2015-03-20 11:16:35,363 DEBUG [wire] << "X-Content-Type-Options: nosniff[\r][\n]"
2015-03-20 11:16:35,363 DEBUG [wire] << "Accept-Ranges: bytes[\r][\n]"
2015-03-20 11:16:35,363 DEBUG [wire] << "Content-Type: text/html[\r][\n]"
2015-03-20 11:16:35,363 DEBUG [wire] << "Transfer-Encoding: chunked[\r][\n]"
2015-03-20 11:16:35,363 DEBUG [wire] << "[\r][\n]"
2015-03-20 11:16:35,364 DEBUG [DefaultClientConnection] Receiving response: HTTP/1.1 404 Not Found
2015-03-20 11:16:35,364 DEBUG [headers] << HTTP/1.1 404 Not Found
2015-03-20 11:16:35,364 DEBUG [headers] << Date: Fri, 20 Mar 2015 10:16:35 GMT
2015-03-20 11:16:35,364 DEBUG [headers] << Server: Nexus/2.11.2-03
2015-03-20 11:16:35,364 DEBUG [headers] << X-Frame-Options: SAMEORIGIN
2015-03-20 11:16:35,364 DEBUG [headers] << X-Content-Type-Options: nosniff
2015-03-20 11:16:35,365 DEBUG [headers] << Accept-Ranges: bytes
2015-03-20 11:16:35,365 DEBUG [headers] << Content-Type: text/html
2015-03-20 11:16:35,365 DEBUG [headers] << Transfer-Encoding: chunked
2015-03-20 11:16:35,369 DEBUG [DefaultHttpClient] Connection can be kept alive indefinitely
2015-03-20 11:16:35,372 DEBUG [wire] << "3C5[\r][\n]"
2015-03-20 11:16:35,372 DEBUG [wire] << "<html>[\n]"
2015-03-20 11:16:35,372 DEBUG [wire] << "  <head>[\n]"
2015-03-20 11:16:35,372 DEBUG [wire] << "    <title>404 - Path /org/drools/drools-bom/6.2.0.Final/drools-bom-6.2.0.Final.jar not found in group repository &quot;Public Repositories&quot; [id=public].</title>[\n]"
2015-03-20 11:16:35,373 DEBUG [wire] << "    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>[\n]"
2015-03-20 11:16:35,373 DEBUG [wire] << "[\n]"
2015-03-20 11:16:35,373 DEBUG [wire] << "    <link rel="icon" type="image/png" href="http://nexus:8081/nexus/favicon.png">[\n]"
2015-03-20 11:16:35,373 DEBUG [wire] << "    <!--[if IE]>[\n]"
2015-03-20 11:16:35,373 DEBUG [wire] << "    <link rel="SHORTCUT ICON" href="http://nexus:8081/nexus/favicon.ico"/>[\n]"
2015-03-20 11:16:35,373 DEBUG [wire] << "    <![endif]-->[\n]"
2015-03-20 11:16:35,374 DEBUG [wire] << "[\n]"
2015-03-20 11:16:35,374 DEBUG [wire] << "    <link rel="stylesheet" href="http://nexus:8081/nexus/static/css/Sonatype-content.css?2.11.2-03" type="text/css" media="screen" title="no title" charset="utf-8">[\n]"
2015-03-20 11:16:35,374 DEBUG [wire] << "  </head>[\n]"
2015-03-20 11:16:35,374 DEBUG [wire] << "  <body>[\n]"
2015-03-20 11:16:35,374 DEBUG [wire] << "    <h1>404 - Path /org/drools/drools-bom/6.2.0.Final/drools-bom-6.2.0.Final.jar not found in group repository &quot;Public Repositories&quot; [id=public].</h1>[\n]"
2015-03-20 11:16:35,375 DEBUG [wire] << "    <p>Path /org/drools/drools-bom/6.2.0.Final/drools-bom-6.2.0.Final.jar not found in group repository &quot;Public Repositories&quot; [id=public].</p>[\n]"
2015-03-20 11:16:35,375 DEBUG [wire] << "  </body>[\n]"
2015-03-20 11:16:35,375 DEBUG [wire] << "</html>[\n]"
2015-03-20 11:16:35,375 DEBUG [wire] << "[\r][\n]"
2015-03-20 11:16:35,395 DEBUG [wire] << "0[\r][\n]"
2015-03-20 11:16:35,395 DEBUG [wire] << "[\r][\n]"
2015-03-20 11:16:35,395 DEBUG [PoolingClientConnectionManager] Connection [id: 0][route: {}->http://nexus:8081] can be kept alive indefinitely
2015-03-20 11:16:35,395 DEBUG [PoolingClientConnectionManager] Connection released: [id: 0][route: {}->http://nexus:8081][total kept alive: 1; route allocated: 1 of 50; total allocated: 1 of 100]
2015-03-20 11:16:35,397 DEBUG [PoolingClientConnectionManager] Connection manager is shutting down
2015-03-20 11:16:35,397 DEBUG [DefaultClientConnection] Connection 0.0.0.0:44070<->10.80.250.85:8081 closed
2015-03-20 11:16:35,398 DEBUG [DefaultClientConnection] Connection 0.0.0.0:44070<->10.80.250.85:8081 closed
2015-03-20 11:16:35,398 DEBUG [PoolingClientConnectionManager] Connection manager shut down
2015-03-20 11:16:35,398 WARN  [MavenRepository] Unable to resolve artifact: org.drools:drools-bom:6.2.0.Final
org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.drools:drools-bom:jar:6.2.0.Final in nexus (http://nexus:8081/nexus/content/groups/public)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444) ~[aether-impl-1.0.0.v20140518.jar:?]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246) ~[aether-impl-1.0.0.v20140518.jar:?]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223) ~[aether-impl-1.0.0.v20140518.jar:?]
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294) ~[aether-impl-1.0.0.v20140518.jar:?]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:216) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:205) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:201) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.ArtifactResolver.resolveArtifact(ArtifactResolver.java:51) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.indexAtifacts(KieRepositoryScannerImpl.java:330) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.setKieContainer(KieRepositoryScannerImpl.java:73) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieScanner(KieServicesImpl.java:115) [drools-compiler-6.2.0.Final.jar:6.2.0.Final]
at de.volkemer.RulesReproducer.setupClass(RulesReproducer.java:34) [test-classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:?]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:?]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:?]
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) [junit-4.11.jar:?]
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:?]
at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [junit-4.11.jar:?]
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) [junit-rt.jar:?]
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) [junit-rt.jar:?]
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) [junit-rt.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_71]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_71]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.drools:drools-bom:jar:6.2.0.Final in nexus (http://nexus:8081/nexus/content/groups/public)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39) ~[aether-connector-basic-1.0.0.v20140518.jar:?]
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355) ~[aether-connector-basic-1.0.0.v20140518.jar:?]
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67) ~[aether-util-1.0.0.v20140518.jar:?]
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581) ~[aether-connector-basic-1.0.0.v20140518.jar:?]
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249) ~[aether-connector-basic-1.0.0.v20140518.jar:?]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520) ~[aether-impl-1.0.0.v20140518.jar:?]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421) ~[aether-impl-1.0.0.v20140518.jar:?]
... 29 more

java.lang.NullPointerException
at org.kie.scanner.KieRepositoryScannerImpl.indexAtifacts(KieRepositoryScannerImpl.java:331)
at org.kie.scanner.KieRepositoryScannerImpl.setKieContainer(KieRepositoryScannerImpl.java:73)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieScanner(KieServicesImpl.java:115)
at de.volkemer.RulesReproducer.setupClass(RulesReproducer.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


Process finished with exit code -1


Before I can investigate further I would need to know why the following is happening:
2015-03-20 11:16:35,041 DEBUG [DefaultArtifactResolver] Verifying availability of Z:\mavenrepo\repository\org\jboss\integration-platform\jboss-integration-platform-parent\6.0.0.CR25\jboss-integration-platform-parent-6.0.0.CR25.pom from [central (http://repo.maven.apache.org/maven2, default, releases), jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/, default, releases+snapshots)]
2015-03-20 11:16:35,043 WARN  [KieScanner] Cannot use native maven pom parser, fall back to the internal one
java.lang.RuntimeException: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.kie:kie-parent-metadata:6.2.0.Final: Failure to transfer org.jboss.integration-platform:jboss-integration-platform-parent:pom:6.0.0.CR25 from http://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. Original error: Could not transfer artifact org.jboss.integration-platform:jboss-integration-platform-parent:pom:6.0.0.CR25 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused @ org.kie:kie-parent-metadata:6.2.0.Final, Z:\mavenrepo\repository\org\kie\kie-parent-metadata\6.2.0.Final\kie-parent-metadata-6.2.0.Final.pom, line 6, column 11
[ERROR] 'dependencies.dependency.version' for org.drools:drools-compiler:jar is missing. @ line 32, column 21


Thanks
Philipp
...

Matteo Mortari

unread,
Mar 26, 2015, 12:31:26 PM3/26/15
to drools...@googlegroups.com
Hi, in the hope it might be helpful.

I was in the same need, resolving rules kjar artifacts only to an internal nexus repo, without going to maven central repo.
I have the following settings file, and I set -Dkie.maven.settings.custom=C:/Users/mmortari/.m2/kie-settings.xml while starting the WildFly server, my Java EE application does only attempt to resolve the kjar artifacts only to internal repo.

Please notice: with 6.1.0.Final, you need to ensure the mirror definition has the layout=default, otherwise you will get the ArtifactResolutionException: ... No connector available to access repository...of type  using the available factories FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory
With 6.2.0.Final instead, I didn't notice the need to ensure the mirror definition layout element, I left it out from the kie-settings.xml.

So in conclusion, the below should be the minimal kie-settings.xml required, if you pass it as kie.maven.settings.custom system properties.

At least it works for me with 6.1.0.Final.

<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">


<mirrors>
<mirror>
 
<name>internal</name>
 
<url>http://nexus.local:8081/nexus/content/groups/public/</url>
 
<mirrorOf>*</mirrorOf>
 
<layout>default</layout> <!-- very important if you using 6.1.0.Final -->
</mirror>
</mirrors>


<profiles>
 
<profile>
   
<id>kie-profile</id>

   
<activation>
     
<activeByDefault>true</activeByDefault>
   
</activation>
   
<repositories>
   
<repository>

       
<id>internal</id>
       
<url>http://nexus.local:8081/nexus/content/groups/public/</url>

       
<releases>
               
<enabled>true</enabled>
       
</releases>
       
<snapshots>
           
<enabled>true</enabled>

Matteo Mortari

unread,
Mar 26, 2015, 1:15:50 PM3/26/15
to drools...@googlegroups.com
Plus,
I would like to add this "workaround" about the need to specify the mirror's definition to have the layout=default element is, as far as I understand, NOT a Drools bug, but a Maven library bug.

I think this is the culprit, because kie-ci of Drools 6.1.0.Final uses org.apache.maven / maven-settings version 3.0.5 while kie-ci of Drools 6.2.0.Final uses org.apache.maven / maven-settings version 3.2.2

and finally the reason is that ArtifactResolutionException: ... No connector available to access repository...of type  using the available factories FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory exception which I get on 6.1.0.Final is because mirror would have wrong type in the sonatype's library in turn, hence not be able to use the WagonRepositoryConnector.

But anyway, at least in my case I got the settings to work both for 610Final and 620Final exactly the way I needed, same as your original need, resolve kjar rule only from internal nexus maven repository =)

Philipp Volkemer

unread,
Mar 27, 2015, 7:30:00 AM3/27/15
to drools...@googlegroups.com
Hi Matteo,

thank your very much for your response. This indeed solves the issue we had with 6.1.0.Final not being able to use <mirror> in our Maven settings.
I was sure that this is a Maven problem pretty much from the beginning.

Cheers
Philipp

Matteo Mortari

unread,
Aug 19, 2015, 9:25:54 AM8/19/15
to Drools Usage
Ciao, this is to follow-up on my answer of Mar 26th [1]

I discovered that the kie maven settings I suggested originally, indeed solved the original requirement to avoid contact maven central (repo1.maven.org etc.) and just reference internal/custom nexus repo to resolve for the rule artifact package.

However, the release/snapshot update policy which I later set for the internal/custom nexus repo was not correctly taken into account by the Eclipse's Aether library. In summary, the release/snapshot version was refreshed only daily because the maven-metadata was refreshed only daily, regardless I wanted it to be refreshed always.

I found the following kie maven settings is actually better because:
  • it avoids contact maven central (repo1.maven.org etc.) and just reference internal/custom nexus repo to resolve for the rule artifact
  • it take into account the specified updatePolicy=always for the release/snapshot of the internal/custom nexus repo
Below the "improved" kie maven settings I'm currently using and which I pass as kie.maven.settings.custom system properties. Please notice is explicit non-colliding IDs and mirrorOf explicitly excludes the internal/custom nexus repo from the mirroring. Please notice the updatePolicy=always for the internal/custom nexus repo.

I hope this helps, I've spent quite some time to figure this out =) so I hope this avoid somebody's else pain with the Eclipse's Aether library LOL


 
<id>internalmirror</id>
 
<name>internalmirror</name>

 
<mirrorOf>*,!internal</mirrorOf> <!-- this line important in order to have custom updatePolicy for the internal nexus repo being actualized by the aether library -->
 
<layout>default</layout> <!-- this line layout=default is very important if using 6.1.0.Final (depends on org.apache.maven / maven-settings version 3.0.5). Otherwise less important as kie-ci of Drools 6.2.0.Final uses org.apache.maven / maven-settings version 3.2.2 and the layout=default is indeed the default behavior correctly set. Potential culprit: http://grepcode.com/file_/repo1.maven.org/maven2/org.apache.maven/maven-settings/3.2.2/org/apache/maven/settings/Mirror.java/?v=diff&id2=3.0.5 This is I believe the maven-settings bug : http://jira.codehaus.org/browse/MNG-5016 -->

</mirror>
</mirrors>


<profiles>
 
<profile>
   
<id>kie-profile</id>
   
<activation>
     
<activeByDefault>true</activeByDefault>
   
</activation>
   
<repositories>
   
<repository>
       
<id>internal</id>

       
<name>internal</name>
       
<url>http://nexus.local:8081/nexus/content/groups/public/</url>

       
<releases>

           
<enabled>true</enabled>
           
<updatePolicy>always</updatePolicy>

       
</releases>
       
<snapshots>
           
<enabled>true</enabled>

           
<updatePolicy>always</updatePolicy>

       
</snapshots>
   
</repository>
</repositories>
 
</profile>
</profiles>
</settings>
Reply all
Reply to author
Forward
0 new messages