epublib Проблема сборки библиотеки Epub - PullRequest
0 голосов
/ 12 апреля 2019

Я пытаюсь работать с базой кода epublib. Я думаю, что мой Maven файл настроен правильно. Зависимости действительно загружаются и находятся в моей папке .m2. Тем не менее, я не могу завершить сборку Maven без ошибок.

Я использовал установить mvn, mvn clean install, пакет мвн,

если я уберу зависимости от epublib, то все будет работать. Или каким другим способом я могу использовать библиотеки epublib.

<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>epub</groupId>
<artifactId>epubfix</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>EPub file Correction</name>
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF- 
 8</project.build.sourceEncoding>
  </properties>

<dependencies>
    <dependency>
        <groupId>nl.siegmann.epublib</groupId>
        <artifactId>epublib-core</artifactId>
        <version>3.1</version>
    </dependency>
    <dependency>
        <groupId>nl.siegmann.epublib</groupId>
        <artifactId>epublib-tools</artifactId>
        <version>3.1</version>
    </dependency>
    <dependency>
        <groupId>nl.siegmann.epublib</groupId>
        <artifactId>epublib-parent</artifactId>
        <version>3.1</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
  </dependencies>
  </project>


I expect to see something like 

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------- 
[INFO] Building EPub file Correction 0.0.1-SNAPSHOT
[INFO] -------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) 
 @ epubfix ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 
epubfix ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default- 
testResources) @ epubfix ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/dyk/Eclipse/workspace/epub/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default- 
testCompile) @ epubfix ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ 
epubfix ---
[INFO] Surefire report directory:     
/Users/dyk/Eclipse/workspace/epub/target/surefire-reports
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ epubfix ---
[INFO] Building jar: 
/Users/dyk/Eclipse/workspace/epub/target/epubfix-0.0.1-SNAPSHOT.jar
[INFO] META-INF/maven/epub/epubfix/pom.xml already added, skipping
[INFO] META-INF/maven/epub/epubfix/pom.properties already added, 
skipping
[INFO] -------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -------------------------------------------------------------
[INFO] Total time: 1.269 s
[INFO] Finished at: 2019-04-12T10:57:11-06:00
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------- 

However, I am getting this error.

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] -------------------------------------------------------------
[INFO] Building EPub file Correction 0.0.1-SNAPSHOT
[INFO] -------------------------------------------------------------
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/nl/siegmann/epublib/epublib- 
core/3.1/epublib-core-3.1.pom
[WARNING] The POM for nl.siegmann.epublib:epublib-core:jar:3.1 is         
 missing, no 
dependency information available
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/nl/siegmann/epublib/epublib- 
tools/3.1/epublib-tools-3.1.pom
[WARNING] The POM for nl.siegmann.epublib:epublib-tools:jar:3.1 is 
missing, no 
dependency information available
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/nl/siegmann/epublib/epublib- 
parent/3.1/epublib-parent-3.1.pom
[WARNING] The POM for nl.siegmann.epublib:epublib-parent:pom:3.1 is 
missing, no 
dependency information available
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/nl/siegmann/epublib/epublib- 
core/3.1/epublib-core-3.1.jar
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/nl/siegmann/epublib/epublib- 
tools/3.1/epublib-tools-3.1.jar
[INFO] -------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] -------------------------------------------------------------
[INFO] Total time: 1.293 s
[INFO] Finished at: 2019-04-12T10:11:37-06:00
[INFO] Final Memory: 13M/309M
[INFO] -------------------------------------------------------------
[ERROR] Failed to execute goal on project epubfix: Could not resolve 
dependencies for project epub:epubfix:jar:0.0.1-SNAPSHOT: The 
following 
artifacts could not be resolved: nl.siegmann.epublib:epublib- 
core:jar:3.1, 
nl.siegmann.epublib:epublib-tools:jar:3.1, 
nl.siegmann.epublib:epublib- 
parent:pom:3.1: Could not find artifact nl.siegmann.epublib:epublib- 
core:jar:3.1 in central (https://repo.maven.apache.org/maven2) -> 
[Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with 
the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug 
logging.
[ERROR] 
[ERROR] For more information about the errors and possible 
solutions, please         
read the following articles:
[ERROR] [Help 1]     

http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

1 Ответ

0 голосов
/ 12 апреля 2019

Зависимость

<dependency>
    <groupId>nl.siegmann.epublib</groupId>
    <artifactId>epublib-core</artifactId>
    <version>3.1</version>
</dependency>

отсутствует в MavenCentral. Вам необходимо настроить правильный репозиторий (или, если это орфографическая ошибка, исправить ее).

...