How to deploy a rules kjar to S3 bucket from within the kie workbench?
Asked Answered
R

0

7

I am trying to use a S3 bucket as a remote maven repository via which to distribute the rules jar, created with the kie workbench UI, to where they are needed.

If i package the rules with maven from my IDE, i can successfully upload the jar to s3 with the usage of Maven S3 wagon extension and distribution management, it works fine. They are uploaded successfully during the maven deploy phase.

I am trying to achieve the same thing from within the workbench UI(Using Business Central Workbench 7.15.0 Final and Wildfly 14.0.Final.). Basically pressing the "Build & Deploy" button to lead to a verified build followed by an upload to the defined in the tag s3 bucket.

Sadly this leads to an error :

    Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts/metadata: Cannot access s3://my-repo/snapshot with type default using the available connector factories: BasicRepositoryConnectorFactory
    at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:269)
    at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:420)
    at org.guvnor.m2repo.backend.server.repositories.DistributionManagementArtifactRepository.deploy(DistributionManagementArtifactRepository.java:140)
    ... 107 more
    Caused by: org.eclipse.aether.transfer.NoRepositoryConnectorException: Cannot access s3://my-repo/snapshot with type default using the available connector factories: BasicRepositoryConnectorFactory
    at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:174)
    at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:265)
    ... 110 more
    Caused by: org.eclipse.aether.transfer.NoRepositoryConnectorException: Cannot access s3://my-repo/snapshot using the registered transporter factories: HttpTransporterFactory, FileTransporterFactory
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:119)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:180)
    at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:113)
    ... 111 more
    Caused by: org.eclipse.aether.transfer.NoTransporterException: Cannot access s3://my-repo/snapshot using the registered transporter factories: HttpTransporterFactory, FileTransporterFactory
    at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:151)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:115)
    ... 113 more

It pretty much says that it cant transfer them with the s3 protocol as there are only Http and file transporter factories available.

This is my pom and i assumed that the extension used that provides the s3 wagon to maven would work, apparently the deploy is not happening by invoking "mvn clean deploy" so plugins and extensions are ignored.

pom.xml

   // standard pom definitions
   ...
   <distributionManagement>
     <snapshotRepository>
       <id>my-repo-snapshot</id>
       <url>s3://my-repo/snapshot</url>
     </snapshotRepository>
     <repository>
       <id>my-repo-release</id>
       <url>s3://my-repo/release</url>
     </repository>
   </distributionManagement>
   ....
  //dependencies etc.
   ....
   <build>
       <plugins>
           <plugin>
             <groupId>org.kie</groupId>
             <artifactId>kie-maven-plugin</artifactId>
             <version>7.15.0.Final</version>
             <extensions>true</extensions>
           </plugin>
      </plugins>
      <extensions>
         <extension>
         <groupId>com.allogy.maven.wagon</groupId>
         <artifactId>maven-s3-wagon</artifactId>
         <version>1.1.0</version>
         </extension> 
      </extensions>
   </build>

Is there a way for me to configure/provide transport factory for s3, that would be used by the kie workbench?

Riba answered 7/2, 2019 at 13:25 Comment(2)
Please ensure that you have M2_HOME set.Cumulate
It is set. @laune do you have any idea?Cabinetwork

© 2022 - 2024 — McMap. All rights reserved.