pd4ml的Maven依赖

问题描述 投票:0回答:4

我在谷歌搜索并没有找到PD4ML的依赖。我已经手动添加了jar但每次我做mvn干净安装它给我编译时错误

错误:包org.zefer.pd4ml不存在

org.zefer.pd4ml不存在

java web-services rest html-to-pdf pd4ml
4个回答
1
投票

我花了几个小时就得到了答案

第一步:下载pd4ml.jar

第二步:在命令提示符下运行以下命令

mvn install:install-file -Dfile=D:\<path to your downloaded jar>\pd4ml.jar -DgroupId=com.pd4ml.utilities -DartifactId=pd4ml -Dversion=1.0 -Dpackaging=jar

第3步:根据您提供的groupId和artifactsId添加对pom.xml的依赖性

    <dependency>
        <groupId>com.pd4ml.utilities</groupId>
        <artifactId>pd4ml</artifactId>
        <version>1.0</version>
    </dependency>

记住ss_css2 jar也需要运行pd4ml按照上面的步骤为这个jar创建一个mvn依赖


0
投票

您是否在pom.xml文件中添加了依赖项?就像是:

<dependency>
    <groupId>org.zefer.pd4ml</groupId>
    <artifactId>pd4ml</artifactId>
    <version>3.2.3fx5</version>
</dependency>

0
投票

在您的pom.xml中首先添加存储库以解析pd4ml,如下所示:

<repositories>
   <repository>
     <id>my-repo2</id>
     <name>your custom repo</name>
     <url>http://maven.scandilabs.com/repository</url>
   </repository>
 </repositories>

然后在依赖项中添加依赖项,如下所示:

<dependency>
    groupId>org.zefer.pd4ml</groupId>
    <artifactId>pd4ml</artifactId>
    <version>370fx2</version>
  </dependency>

0
投票

将存储库https://pd4ml.tech/maven2/和依赖关系com.pd4ml添加到您的pom.xml

<project ...>
  <groupId>de.luckydonald.stackoverflow</groupId>
  <artifactId>42805145</artifactId>
  <version>1.0-SNAPSHOT</version>
  <repositories>
    <repository>
      <id>pd4ml</id>
      <url>https://pd4ml.tech/maven2/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <dependencies>
    <!-- html to rtf -->
    <dependency>
      <groupId>com.pd4ml</groupId>
      <artifactId>pd4ml</artifactId>
      <version>4.0.2</version>
    </dependency>
  </dependencies>
</project>
© www.soinside.com 2019 - 2024. All rights reserved.