在IntelliJ中运行项目

超级torpez:

我有一个基于Maven + Spring的应用程序。这是一个使用Java的Java Web应用程序。

这是我正在使用的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.alfred</groupId>
<artifactId>alfred</artifactId>
<version>v.0.1-CID.Fase.II.Edesk-SNAPSHOT</version>
<packaging>war</packaging>

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

<name>ALFRED</name>
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc14</artifactId>
        <version>10.2.0.4.0</version>
    </dependency>

    <!-- Dependencia para Spring DATA JPA con base de datos -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>


    <!-- Para implementar las conexiones a la base de datos MySQL -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <!-- version>5.1.35</version -->
    </dependency>


    <!-- Para implementar el servicio REST -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
    </dependency>
    <!-- http://mvnrepository.com/artifact/com.google.code.gson/gson -->

    <!-- Paquete que permite convertir el contenido de una respuesta en texto 
        plano JSON a objetos Java. -->
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
    </dependency>


    <!-- Para implementar cliente REST con Template -->
    <!-- dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> 
        </dependency -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
    </dependency>

    <!-- Para implementar las plantillas HTML con thymeleaf -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity3 -->
    <dependency>
        <groupId>org.thymeleaf.extras</groupId>
        <artifactId>thymeleaf-extras-springsecurity3</artifactId>
    </dependency>

    <!-- Para poder implementar los clientes de los servicios REST -->
    <dependency>
        <groupId>com.squareup.retrofit</groupId>
        <artifactId>retrofit</artifactId>
        <version>1.7.1</version>
    </dependency>

    <!-- Para escapar HTML en las llamadas a la API de IMDB -->
    <!-- http://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
    <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <version>3.0</version>
    </dependency>

    <!-- Spring Security -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>

    <!-- Java Mail API -->
    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.3</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-ldap -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>4.2.0.RELEASE</version>
    </dependency>

    <!-- Librería para tratar con excels -->
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.16</version>
    </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-jar-plugin</artifactId>
            <configuration> DO NOT include log4j.properties file in your Jar <excludes>
            <exclude>**/log4j.properties</exclude> </excludes> <archive> </archive> </configuration> 
            </plugin> -->
    </plugins>
</build>


</project>

当我进行清理时,生成资源并安装会出现此错误,并且无法开始工作

com.alfred:alfred:v.0.1-CID.Fase.II.Edesk-SNAPSHOT旁边的xml,此文件不再受支持,已被忽略,请改用settings.xml。[警告] [警告]强烈建议解决这些问题,因为它们威胁到构建的稳定性。[警告] [警告]因此,将来的Maven版本可能不再支持构建此类格式错误的项目。[警告] [信息] [信息] ----------------------------------------- ------------------------------- [INFO]构建ALFRED v.0.1-CID.Fase.II.Edesk-SNAPSHOT [ INFO] ------------------------------------------------ ------------------------ [警告] org.apache.maven.plugins:maven-install-plugin:jar:2.5.2的POM是丢失,没有可用的依赖项信息[警告] com.oracle:ojdbc14:jar:10.2.0.4.0的POM丢失,[INFO]复制1个资源[INFO]复制90个资源[INFO] [INFO] --- maven-compiler-plugin:3.1:compile(default-compile)@ alfred --- [INFO]检测到更改-重新编译模块![INFO]将174个源文件编译到C:\ Users \ spainasg \ Documents \ CID_UAT \ target \ classes [警告] / C:/ Users / spainasg / Documents / CID_UAT / src / main / java / com / edesk / controladorGUI / GestionServicioAprobadorController .java:C:\ Users \ spainasg \ Documents \ CID_UAT \ src \ main \ java \ com \ edesk \ controladorGUI \ GestionServicioAprobadorController.java使用未经检查或不安全的操作。[警告] /C:/Users/spainasg/Documents/CID_UAT/src/main/java/com/edesk/controladorGUI/GestionServicioAprobadorController.java:重新编译-Xlint:unchecked以获得详细信息。[INFO] [INFO] --- maven-resources-plugin:2.6:testResources(default-testResources)@ alfred --- [INFO]使用'UTF-8' 编码以复制过滤的资源。[INFO]跳过不存在的资源目录C:\ Users \ spainasg \ Documents \ CID_UAT \ src \ test \ resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile(default-testCompile)@ alfred- -[INFO]没什么可编译的-所有类都是最新的[INFO] [INFO] --- maven-surefire-plugin:2.17:test(默认测试)@ alfred --- [警告]组织的POM。 apache.maven.surefire:maven-surefire-common:jar:2.17丢失,没有相关性信息[警告] org.apache.maven.surefire:surefire-api:jar:2.17的POM丢失,没有相关性信息[警告]缺少org.apache.maven:maven-toolchain:jar:2.0.9的POM,没有可用的依赖项信息[警告] org.apache.maven.plugin-tools:maven-plugin注释的POM: jar:3.2不见了,处于离线模式的https://repo.maven.apache.org/maven2),并且之前从未从其下载工件org.apache.maven.surefire:maven-surefire-common:jar:2.17。-> [帮助1] [错误] [错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。[错误]使用-X开关重新运行Maven以启用完整的调试日志记录。[错误] [错误]有关错误和可能的解决方案的更多信息,请阅读以下文章:[错误] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException [错误] Maven执行异常终止(退出代码1)

我使用的是IntelliJ,但是使用Eclipse时遇到相同的错误。应用程序正在脱机工作。

对这个解决方案有什么想法吗?

Gal Shaboodi:

尝试添加所有缺少的依赖项。

[WARNING] The POM for org.apache.maven.surefire:maven-surefire-common:jar:2.17 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.surefire:surefire-api:jar:2.17 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-toolchain:jar:2.0.9 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2 is missing, no dependency information available

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

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

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

无法在IntelliJ中编译/运行Java项目

在WSL Ubuntu中运行intellij项目

如何让整个项目在 IntelliJ IDEA 中运行?

尝试在intelliJ中运行spring-mvc项目

IntelliJ:让Spring + Gradle + JUnit项目在IDE中运行

如何在IntelliJ中运行导入的Spring项目

如何在Intellij中运行导入的Spring mvc项目?

摇篮项目运行JUnit 5次测试中的IntelliJ

在IntelliJ IDEA中运行多模块项目时出错

无法在Intellij Idea中为scala项目运行集成测试

如何在IntelliJ中运行Angular2 CLI项目

Eclipse中如何在Intellij中的码头上运行Maven项目?

使用Intellij IDE运行Scala Dotty项目

运行JavaFX项目中的IntelliJ与摇篮

运行Maven项目使用的IntelliJ IDEA

intellij运行项目wtpwebapps不存在

Intellij Spring Boot项目运行配置

为什么我必须为Intellij中的每个更改运行“重建项目”?

如何使用IntelliJ编译Java项目并在终端中运行(NoClassDefFoundError)

没有选择在IntelliJ IDEA中运行Java 9项目

在运行时执行过程中如何获取Intellij的根项目目录

如何在Maven项目的单元测试中运行IntelliJ调试器?

如何在intellij项目的命令行中运行Java类

如何在Mac上的Intellij / Pycharm运行/调试配置中配置Azure功能项目

在 MacBook 上的 IntelliJ 中运行 JavaFX 项目时出现安全警告

在IntelliJ Idea中编译和运行Scala项目时出现问题

如何在基于Gradle的项目中将运行窗口视图更改为仅IntelliJ中的输出

在 IntelliJ IDEA 中运行 iOS React Native 项目时如何指定设备

在IntelliJ中打开Dart项目