当前位置: 首页 > 知识库问答 >
问题:

运行maven site的奇怪问题(处理POM时遇到问题)

石正卿
2023-03-14
[WARNING] Unable to create Maven project for org.crashub:crash.shell:pom:1.3.1 from repository.
org.apache.maven.project.InvalidProjectModelException: Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../Classes/classes.jar @ line 98, column 19

我的POM文件

<?xml version="1.0" encoding="UTF-8"?>
<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.example</groupId>
    <artifactId>primecheck</artifactId>
    <version>1.0.0-SNAPSHOT</version>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.2.3.RELEASE</version>
    </parent>

    <packaging>war</packaging>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>3.4.1</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.8</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>
                <dependencies>
                    <dependency>
                        <groupId>lt.velykis.maven.skins</groupId>
                        <artifactId>reflow-velocity-tools</artifactId>
                        <version>1.1.1</version>
                    </dependency>
                    <!-- Reflow skin requires Velocity >= 1.7  -->
                    <dependency>
                        <groupId>org.apache.velocity</groupId>
                        <artifactId>velocity</artifactId>
                        <version>1.7</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>spring-releases</id>
            <url>https://repo.spring.io/libs-release</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-releases</id>
            <url>https://repo.spring.io/libs-release</url>
        </pluginRepository>
        <pluginRepository>
            <id>central</id>
            <name>Maven Plugin Repository</name>
            <url>http://repo1.maven.org/maven2</url>
        </pluginRepository>
    </pluginRepositories>

</project>

正在运行MVN依赖项:树


    [INFO] --- maven-dependency-plugin:2.9:tree (default-cli) @ primecheck ---
    [INFO] com.tomasruud:primecheck:war:1.0.0-SNAPSHOT
    [INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.2.3.RELEASE:compile
    [INFO] |  +- org.springframework.boot:spring-boot-starter:jar:1.2.3.RELEASE:compile
    [INFO] |  |  +- org.springframework.boot:spring-boot:jar:1.2.3.RELEASE:compile
    [INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.2.3.RELEASE:compile
    [INFO] |  |  \- org.yaml:snakeyaml:jar:1.14:compile
    [INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.4.5:compile
    [INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.5:compile
    [INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.4.5:compile
    [INFO] |  +- org.hibernate:hibernate-validator:jar:5.1.3.Final:compile
    [INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
    [INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile
    [INFO] |  |  \- com.fasterxml:classmate:jar:1.0.0:compile
    [INFO] |  +- org.springframework:spring-core:jar:4.1.6.RELEASE:compile
    [INFO] |  +- org.springframework:spring-web:jar:4.1.6.RELEASE:compile
    [INFO] |  |  +- org.springframework:spring-aop:jar:4.1.6.RELEASE:compile
    [INFO] |  |  |  \- aopalliance:aopalliance:jar:1.0:compile
    [INFO] |  |  +- org.springframework:spring-beans:jar:4.1.6.RELEASE:compile
    [INFO] |  |  \- org.springframework:spring-context:jar:4.1.6.RELEASE:compile
    [INFO] |  \- org.springframework:spring-webmvc:jar:4.1.6.RELEASE:compile
    [INFO] |     \- org.springframework:spring-expression:jar:4.1.6.RELEASE:compile
    [INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:1.2.3.RELEASE:compile
    [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.11:compile
    [INFO] |  |  \- org.slf4j:slf4j-api:jar:1.7.11:compile
    [INFO] |  +- org.slf4j:jul-to-slf4j:jar:1.7.11:compile
    [INFO] |  +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.1:compile
    [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.1:compile
    [INFO] |  \- org.apache.logging.log4j:log4j-core:jar:2.1:compile
    [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.2.3.RELEASE:compile
    [INFO] |  +- junit:junit:jar:4.12:compile
    [INFO] |  +- org.mockito:mockito-core:jar:1.10.19:compile
    [INFO] |  |  \- org.objenesis:objenesis:jar:2.1:runtime
    [INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:compile
    [INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:compile
    [INFO] |  \- org.springframework:spring-test:jar:4.1.6.RELEASE:compile
    [INFO] +- org.apache.commons:commons-math3:jar:3.4.1:compile
    [INFO] \- org.springframework.boot:spring-boot-starter-tomcat:jar:1.2.3.RELEASE:provided
    [INFO]    +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.20:provided
    [INFO]    +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.20:provided
    [INFO]    +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:8.0.20:provided
    [INFO]    \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.20:provided

共有1个答案

苏宾鸿
2023-03-14

我发现了这两个相关的问题:

https://jira.exoplatform.org/browse/crash-225

https://jira.codehaus.org/browse/mshade-185

CRaSH正式嵌入为Spring Boot remote Shell。

所以org.crashub:crash.shell:pom:1.3.1似乎与Spring Boot有关,但我不知道警告是什么意思:“无法为[...]创建Maven项目”

编辑

<dependency>
    <groupId>com.sun</groupId>
    <artifactId>tools</artifactId>
    <version>1.8</version>
    <scope>system</scope>
    <systemPath>${java.home}/../lib/tools.jar</systemPath>
    <optional>true</optional>
</dependency>
 类似资料:
  • 我正在写一个新的家长pom.xml 下面是我的孩子pom 下面是我在构建过程中遇到的错误

  • 我创建并尝试使用构建项目,但它不工作。不是这个项目,我试着构建我的所有项目,但在我的ubuntu笔记本电脑上不工作 [信息]扫描项目...从中心下载:https://repo . maven . Apache . org/maven 2/org/spring framework/boot/spring-boot-starter-parent/2 . 6 . 11/spring-boot-start

  • 我正在尝试从何处运行此源代码https://github.com/kishancs2020/TicketBookingServiceJunitTestingGithub在我的Jenkins中查看了在Jenkins文件中创建的管道源代码。 我已经更新了maven,java版本来修复它,但错误仍然是一样的。我也通过了这个链接http://cwiki.apache.org/confluence/disp

  • 我想开始一个新泽西州的项目,但因为pom,我第一步就失败了。xml显示一些错误,无法生成项目。错误: 这是我的pom。xml: 你能帮我解决这个问题吗?我尝试了很多配置,但主题都不起作用。我不知道我的IDE配置(IntelliJ)是否有问题。非常感谢。

  • 我试图以编程方式解决pom,但遇到了几个错误。 下面是代码片段: 但不幸的是,我在执行projectBuilder时最终出现了这样的错误。构建(新文件(“pom.xml”),请求) 看起来maven解析器无法设置正在遍历的POM的属性。。。 我有一个完整的github项目来演示这个问题,包括CI。 我还交叉发布了Maven-dev邮件列表。 谢谢

  • 问题内容: 这是一个示例资源类: 还有资源的JerseyTest: 除了使用作为输入参数的资源外,我还可以对所有其他资源运行球衣测试。它给出了 以下是堆栈跟踪: 问题答案: 您的例外是有关的事实是。 泽西岛文件说: 3.6。使用@Context 前面的部分介绍了@Context的用法。JAX-RS规范的第5章介绍了可以与@Context一起使用的所有标准JAX-RS Java类型。 使用Servl