7

我正在尝试使用 S3 存储桶作为远程 maven 存储库,通过它将使用 kie 工作台 UI 创建的规则 jar 分发到需要它们的地方。

如果我从我的 IDE 用 maven 打包规则,我可以使用 Maven S3 wagon 扩展和分发管理成功地将 jar 上传到 s3,它工作正常。它们在 Maven 部署阶段成功上传。

我正在尝试从工作台 UI 中实现相同的目标(使用 Business Central Workbench 7.15.0 Final 和 Wildfly 14.0.Final。)。基本上按下“构建和部署”按钮以导致经过验证的构建,然后上传到标签 s3 存储桶中定义的内容。

可悲的是,这会导致错误:

    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

它几乎说它不能使用 s3 协议传输它们,因为只有 Http 和文件传输器工厂可用。

这是我的 pom,我假设为 maven 提供 s3 wagon 的扩展可以工作,显然部署并没有通过调用“mvn clean deploy”进行,因此插件和扩展被忽略。

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>

有没有办法让我为 s3 配置/提供传输工厂,让 kie 工作台使用?

4

0 回答 0