Kie-Server exception - Could not transfer artifact from/to central (http://repo1.maven.org/maven2/)

617 views
Skip to first unread message

Maniganda Prakash

unread,
Jun 16, 2015, 5:19:08 AM6/16/15
to drools...@googlegroups.com

Following exception is thrown in 'Kie-Server v6.2.0' while creating a container in 'Kie Workbench v 6.2.0':

01:15:22,501 WARN  [org.kie.scanner.MavenRepository] Unable to resolve artifact: first.second:third:1.0: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact first.second:third:jar:1.0 from/to central (http://repo1.maven.org/maven2/): repo1.maven.org
        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:]

As shown in the screen shot,
 - 'Kie-workbench v6.2.0' and 'Kie-Server v6.2.0' are installed in two different servers.
 - This property is set in both 'workbench' and 'execution server' <property name="org.guvnor.m2repo.dir" value="/drools/mvn"/>
 - In Kie-workbench, when I build and deploy, artifacts are stored in the directory '/drools/mvn' as expected in the first server
 - Manually I copied '/drools/mvn' directory to the Server 2 (to Kie-Server)
 - Exception is thrown when I create a Kie-server container in the workbench with valid group and artifact id

Why does Kie-server go to 'repo1.maven.org' instead of looking at the directory '/drools/mvn' as I set the property?
Is there any other property I have to set so that Kie-server doesn't refer 'repo1.maven.org'?

Thanks,
Prakash

Michael Anstis

unread,
Jun 16, 2015, 7:01:33 AM6/16/15
to drools...@googlegroups.com
Property org.guvnor.m2repo.dir is used by the Workbench to determine where to store artifacts within it's "internal" M2 Repository; and AFAIK is not used by KIE Server.

KIE Server probably uses either the <repositories> configured in the deployed KJAR's pom.xml or those in the local settings.xml. Can you confirm neither are configured to use repo1.maven.org?

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@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-setup/6b6d9622-f78e-4b0e-954d-4f72a1a56e94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maniganda Prakash

unread,
Jun 16, 2015, 1:40:12 PM6/16/15
to drools...@googlegroups.com
If both Kie-workbench and Kie-Server are deployed in the same server (server 1) then the Kie-Server correctly loads the artifact from '/drools/mvn' instead of referring to 'repo1.maven.org'.

How does Kie-server load the artifact from my '/drools/mvn' directory if deployed along with workbench in the same server? How can I make Kie-Server to refer to my '/drools/mvn' directory even if workbench and Kie-server are deployed in different servers?

Thanks,
Prakash

Michael Anstis

unread,
Jun 16, 2015, 2:44:22 PM6/16/15
to drools...@googlegroups.com
To be honest, I don't know.. I'd be very surprised if it used the "org.guvnor.m2repo.dir" property.. Very surprised indeed.

I'd think kie-server would use whatever Maven configuration is available at runtime.. but I've BCC'ed a couple of colleagues who developed the kie-server for their opinion...

With kind regards,

Mike

Edson Tirelli

unread,
Jun 16, 2015, 2:49:58 PM6/16/15
to drools...@googlegroups.com

   Michael is correct. Kie-server uses kie-ci to resolve repositories and download jars. Kie-ci uses default maven configuration files, including "settings.xml". So make sure you configure your remote maven repositories in there.

   Edson


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



--
  Edson Tirelli
  Principal Software Engineer 
  Red Hat Business Systems and Intelligence Group

Reply all
Reply to author
Forward
0 new messages