无法使用 mvn 构建 FOP

皮埃尔·弗朗索瓦

使用 更新 FOP 的代码后svn,我尝试构建可执行文件,mvn因为ant即将弃用,但尝试构建fop-util. 这是我运行的脚本:

#!/bin/bash
echo About to fetch updates:
svn co https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk || exit

echo About to build FOP:
mvn -f trunk clean install && echo Done. || echo Failed.

脚本结束回声Failed.

About to fetch updates:

Fetching external item into 'trunk/docs':
Checked out external at revision 1883833.

Checked out revision 1883833.
About to build FOP:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache FOP Parent                                                  [pom]
[INFO] Apache FOP Utilities                                               [jar]
[INFO] Apache FOP Events                                                  [jar]
[INFO] Apache FOP Core                                                    [jar]
[INFO] Apache FOP All-In-One                                              [jar]
[INFO] Apache FOP Sandbox                                                 [jar]
[INFO] Apache FOP Servlet                                                 [war]
[INFO] Apache FOP Transcoder                                              [jar]
[INFO] Apache FOP Transcoder All-In-One                                   [jar]
[INFO] 
[INFO] -----------------< org.apache.xmlgraphics:fop-parent >------------------
[INFO] Building Apache FOP Parent 2.3.0-SNAPSHOT                          [1/9]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ fop-parent ---
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ fop-parent ---
[INFO] Installing /home/pf/MEGA/prg/java/fop/trunk/pom.xml to /home/pf/.m2/repository/org/apache/xmlgraphics/fop-parent/2.3.0-SNAPSHOT/fop-parent-2.3.0-SNAPSHOT.pom
[INFO] 
[INFO] ------------------< org.apache.xmlgraphics:fop-util >-------------------
[INFO] Building Apache FOP Utilities 2.3.0-SNAPSHOT                       [2/9]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ fop-util ---
[INFO] Deleting /home/pf/MEGA/prg/java/fop/trunk/fop-util/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ fop-util ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/pf/MEGA/prg/java/fop/trunk/fop-util/src/main/resources
[INFO] Copying 2 resources to META-INF
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ fop-util ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /home/pf/MEGA/prg/java/fop/trunk/fop-util/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache FOP Parent 2.3.0-SNAPSHOT:
[INFO] 
[INFO] Apache FOP Parent .................................. SUCCESS [  1.409 s]
[INFO] Apache FOP Utilities ............................... FAILURE [  1.814 s]
[INFO] Apache FOP Events .................................. SKIPPED
[INFO] Apache FOP Core .................................... SKIPPED
[INFO] Apache FOP All-In-One .............................. SKIPPED
[INFO] Apache FOP Sandbox ................................. SKIPPED
[INFO] Apache FOP Servlet ................................. SKIPPED
[INFO] Apache FOP Transcoder .............................. SKIPPED
[INFO] Apache FOP Transcoder All-In-One ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.939 s
[INFO] Finished at: 2020-11-26T09:58:44+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project fop-util: Compilation failure -> [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/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :fop-util
Failed.

所以,按照建议,我跑了mvn -X -f trunk install,我得到了如此巨大的输出,我不能在这里发布它(最多允许 30000 个字符),但你可以在这里找到它:https : //mega.nz/file/ohl0xLqA#CkZHF04r- zefM4JsDq9ZhS3m9ymqlZsAgUb2W0uaHsY

我的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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.apache.xmlgraphics</groupId>
  <artifactId>fop-parent</artifactId>
  <version>2.3.0-SNAPSHOT</version>
  <name>Apache FOP Parent</name>
  <description>XML Graphics Format Object Processor</description>
  <packaging>pom</packaging>

  <properties>
    <antrun.plugin.version>1.8</antrun.plugin.version>
    <avalon.version>4.3.1</avalon.version>
    <batik.version>1.9.0-SNAPSHOT</batik.version>
    <build.helper.plugin.version>1.9.1</build.helper.plugin.version>
    <checkstyle.plugin.version>2.14</checkstyle.plugin.version>
    <commons.io.version>1.3.1</commons.io.version>
    <commons.logging.version>1.0.4</commons.logging.version>
    <compiler.plugin.version>3.1</compiler.plugin.version>
    <exec.plugin.version>1.4.0</exec.plugin.version>
    <findbugs.plugin.version>3.0.4</findbugs.plugin.version>
    <jar.plugin.version>2.6</jar.plugin.version>
    <java.version>1.6</java.version>
    <junit.version>4.11</junit.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.info.reports.plugin.version>2.8</project.info.reports.plugin.version>
    <release.plugin.version>2.5.2</release.plugin.version>
    <surefire.plugin.version>2.18.1</surefire.plugin.version>
    <war.plugin.version>2.2</war.plugin.version>
    <xml.plugin.version>1.0.1</xml.plugin.version>
    <xmlgraphics.commons.version>2.3.0-SNAPSHOT</xmlgraphics.commons.version>
    <xmlunit.version>1.2</xmlunit.version>
    <jdk.path>${env.JAVA_HOME}</jdk.path>
  </properties>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Apache Software Foundation</name>
    <url>http://www.apache.org/</url>
  </organization>

  <modules>
    <module>fop</module>
    <module>fop-core</module>
    <module>fop-events</module>
    <module>fop-sandbox</module>
    <module>fop-servlet</module>
    <module>fop-transcoder</module>
    <module>fop-transcoder-allinone</module>
    <module>fop-util</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
            <tags>
              <tag>
                <name>event.severity</name>
              </tag>
            </tags>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${checkstyle.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${compiler.plugin.version}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <executable>${jdk.path}/bin/javac</executable>
            <fork>true</fork>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${jar.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${project.info.reports.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire.plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <scm>
    <connection>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/</connection>
    <url>scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/</url>
    <developerConnection></developerConnection>
  </scm>

  <repositories>
    <repository>
      <id>apache.snapshots.https</id>
      <url>https://repository.apache.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>apache.releases.https</id>
      <url>https://repository.apache.org/content/repositories/releases</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>jboss.org</id>
      <url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/</url>
    </repository>
  </repositories>

  <distributionManagement>
    <site>
      <id>${project.artifactId}-site</id>
      <url>${project.baseUri}</url>
    </site>
  </distributionManagement>

</project>

我不知道如何解决这个问题。

皮埃尔·弗朗索瓦

我通过擦除存储库的本地副本,再次下载并重新编译所有内容找到了解决方案:

rm -rf trunk
svn co https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
mvn -f trunk clean install

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章