java - maven 未在 Eclipse 中下载 iText jar 依赖项

标签 java eclipse maven itext7

1) 我正在尝试在 Eclipse 中创建一个 itext 项目(Neon.1a Release (4.6.1))。

2) 要在我的项目中添加 iText7,我按照链接 https://www.youtube.com/watch?v=sxArv-GskLc 中的视频教程进行操作.

3) 我按照视频中的描述进行操作,但 Maven 依赖项未添加到项目中。这样我就可以从 http://developers.itextpdf.com/content/itext-7-jump-start-tutorial/installing-itext-7 复制依赖代码

4) 然后将其添加到 pom.xml 文件并作为 maven install 运行项目。但 Maven 依赖项仍然没有添加到项目中。我附上了我的笔记本电脑屏幕的屏幕截图以供引用。

enter image description here

这是我按照这些步骤操作的视频的另一个屏幕截图,

enter image description here

请指导我解决这个问题。提前致谢。 :)

这是我的 pom.xml 文件。

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.itextpdf</groupId>
  <artifactId>jumpstart</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>iText7 jumpstart</name>
  <description>jumpstarting itext7</description>
  <dependencies>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>kernel</artifactId>
        <version>7.0.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>io</artifactId>
        <version>7.0.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>layout</artifactId>
        <version>7.0.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>forms</artifactId>
        <version>7.0.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>pdfa</artifactId>
        <version>7.0.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>pdftest</artifactId>
        <version>7.0.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.18</version>
    </dependency>
</dependencies>
</project>

最佳答案

Finally it work. Here what I did,
In Eclipse,
1) Go to windows tab-> preferences ->maven,
   Here I check the box for,
  1) Download Artifacts for JavaDoc
  2) Download repository index updates on startup.

2) clean All project,
  1) Project tab ->clean.

3) Restarted Eclipse, and Run As maven install. Done.


关于java - maven 未在 Eclipse 中下载 iText jar 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40649765/

相关文章:

Java从文本文件中的某个点提取文本

Java Swing 文本区域 "Sticky Text"

eclipse : Project properties don't show Build Path

java - Maven-source-plugin 和 Java 11 - 无法扫描类文件 :

java - Android 中简单格式日期解析失败

java - Alfresco solr 跟踪失败

java - Resolving model jre :call:zip:1. 0.0 的目的是什么?

java - 抓取 SWT 组件的继承背景图像(滚动复合)

maven - 无法让 Sonar 处理多模块 Maven 项目的 jacoco exec 文件

maven - 从 Github Action 部署到 Github 包注册表