【问题标题】:Athena latest JDBC driver jar AthenaJDBC42_2.0.14Athena最新的JDBC驱动jar AthenaJDBC42_2.0.14
【发布时间】:2020-11-02 01:56:02
【问题描述】:

https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html 我已将最新的 jdbc jar 安装到我的本地 mvn 存储库中。当我尝试构建我的项目时,我遇到了错误。

Failed to collect dependencies at Athena:AthenaJDBC42:jar:2.0.14.1000: Failed to read artifact descriptor for Athena:AthenaJDBC42:jar:2.0.14.1000: 1 problem was encountered while building the effective model for Athena:AthenaJDBC${env.JDBC_V}:${env.MAJOR_V}.${env.MINOR_V}.${env.REVISION_V}.${env.BUILD_V}
[ERROR] [ERROR] 'artifactId' with value 'AthenaJDBC${env.JDBC_V}' does not match a valid id pattern. @

任何人有任何想法,如何解决这个错误。?

【问题讨论】:

    标签: jdbc amazon-athena mulesoft


    【解决方案1】:

    仅用 Maven 的小错误 sn-p 很难说,但看起来 Maven 无法识别属性 ${env.JDBC_V} 或者它包含一些无效值,例如空格。

    我建议生成一个Maven有效的pom模型(mvn help~effective-pom)并在调试模式下执行Maven(mvn -X ...)尝试排查原因。

    【讨论】:

      【解决方案2】:

      我遇到了同样的错误。当我使用以下命令将 jar 安装到存储库中时,它得到了解决。 (确保在执行命令之前从 .m2 中删除了所有现有的雅典娜驱动程序 jar 文件实例)

      mvn install:install-file -Dfile=/Users/chetanparekh/Downloads/AthenaJDBC42_2.0.14.jar -DgroupId=Athena -DartifactId=AthenaJDBC42 -Dversion=2.0.14.1000 -Dpackaging=jar

      来自我的 POM 的片段。

      <build>
          <plugins>
      
              <plugin>
                  <groupId>org.mule.tools.maven</groupId>
                  <artifactId>mule-maven-plugin</artifactId>
                  <version>${mule.maven.plugin.version}</version>
                  <extensions>true</extensions>
                  <configuration>
                  <sharedLibraries>
                          <sharedLibrary>
                              <groupId>Athena</groupId>
                              <artifactId>AthenaJDBC42</artifactId>
                          </sharedLibrary>
                      </sharedLibraries>
                  </configuration>
              </plugin>
          </plugins>
      </build>
      
      <dependencies>
      <dependency>
              <groupId>Athena</groupId>
              <artifactId>AthenaJDBC42</artifactId>
              <version>2.0.14.1000</version>
          </dependency>
      </dependencies>
      

      【讨论】:

        【解决方案3】:

        感谢您的回答。 我终于解决了 mvn install:install-file -Dfile=/Users/dk/Downloads/AthenaJDBC42_2.0.14.jar -DgroupId=Athena -DartifactId=AthenaJDBC42 -Dversion=2.0.14

        删除了构建版本(1000)和-Dpackaing=jar,它可以工作。我不确定构建版本 .1000 和 -Dpacking=jar 可能有什么问题。

        再次感谢!

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2018-11-12
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-01-02
          • 2018-11-06
          相关资源
          最近更新 更多