这是我的pom.xml文件,它既不能在VS代码中运行应用程序,也不能在Eclipse中运行应用程序,每次运行项目时,它都会给出构建错误“failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.1.release:run”这是我的错误屏幕截图
我在https://start.spring.io上创建了我的项目/internet上的几个错误类似,但没有解决我的问题。
任何帮助都是有用的
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<!-- <version>2.4.0</version> -->
<version> 2.3.1.RELEASE </version>
<relativePath />
</parent>
<groupId>com.mmm</groupId>
<artifactId>appenggusermgmt</artifactId>
<packaging>war</packaging>
<name>AppEnggUserMgmt</name>
<description>Application Engineering User Management</description>
<version>1.0.6-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.release.version>3.0.0-M1</maven.release.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<github.global.server>github</github.global.server>
<maven.surefire.version>3.0.0-M5</maven.surefire.version>
<!-- <junit.version>5.6.2</junit.version> -->
<slf4j.version>1.7.5</slf4j.version>
</properties>
<!-- for autogenerating github tag -->
<scm>
<developerConnection>scm:git:https://github.com/3mcloud/appEngRecommender-User-Mgmt-Docker</developerConnection>
<!-- <tag>HEAD</tag> -->
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>${github.global.server}</id>
<name>appEngRecommender-User-Mgmt-Docker</name>
<url>https://maven.pkg.github.com/3mcloud/appEngRecommender-User-Mgmt-Docker</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>
<!-- <dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency> -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven.release.version}</version>
</dependency>
</dependencies>
<build>
<!-- <finalName>AppEnggUserMgmt</finalName> -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- <plugin> Paul - this is a great plugin but damn noisy
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>google_checks.xml</configLocation>
<consoleOutput>false</consoleOutput>
<failsOnError>false</failsOnError>
<violationSeverity>warning</violationSeverity>
<failOnViolation>false</failOnViolation>
</configuration>
</plugin> -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>validate</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>CLASS</element>
<excludes>
<!-- <exclude>nothing</exclude> use to exclude in the future -->
</excludes>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven.release.version}</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<checkModificationExcludes>
<checkModificationExclude>pom.xml</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
这是我的类文件
package com.mmm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@SpringBootApplication
public class UserProfileManagementApplication extends SpringBootServletInitializer {
private static final Logger LOG = LoggerFactory.getLogger(UserProfileManagementApplication.class.getName());
public static void main(String[] args) {
SpringApplication.run(UserProfileManagementApplication.class, args);
LOG.info("--Application User Profile Management Started--");
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(UserProfileManagementApplication.class);
}
}
我不能重复与你面临的完全相同的问题,这意味着它将是好的获得更多的信息。也许把你的代码推到GitHub。我想指出的一点是:
` ` 在TOmCAT服务器中。我无法运行这个项目。? ` 严重:web应用程序[/SpringMvc4]中的Servlet[spring]抛出了load()异常Java。伊奥。FileNotFoundException:无法打开组织上的ServletContext资源[/WEB-INF/spring servlet.xml]。springframework。网状物上下文支持ServletCont
我有一个带有TestNG的maven项目。我以前使用Eclipse,今天搬到了IntelliJ,我认为我配置正确。但是当我在IntelliJ中运行这个项目时,它不能在下面的错误信息下运行。当使用maven命令运行时,它没有任何问题。 但是当我从IntelliJ跑过来时,我得到: @w@C:\用户\sdymj\AppData\本地\Temp\idea_working_dirs_testng.tmp-
我对科特林来说是全新的。我已经安装了kotlin插件来eclipse。我在下面的一个教程中找到了一个简单的例子。问题是,当我运行项目时,我收到了以下声明的错误。 为了解决这个问题,我试图运行项目作为kotlin应用程序,但我找不到这个选项。 请让我知道如何修复此错误? 代码: 错误: 更新: 为了解决这个问题,我完全按照本教程中的内容,安装了最新版本的eclipse PHOTON,但问题仍然存在。
我正在开始一门Android Studio课程,但我在运行代码时遇到了问题:事实上,当我使用Nexus S API 22点击“Run app”时,启动的是我的旧项目,而不是我的新项目。我有Android Studio 3.5 我试图重启Android Studio并启动全新的项目,但没有成功。 谢谢你的帮助。
////我在环境变量中设置了jdk路径。但是应用程序无法安装。我试了很多次。但是错误仍然there.do回复如果有任何解决方案。 ///
好吧,所以,不知何故,我决定忽略IDE,玩命令。我发现jar(从gradle构建中创建)无法识别根文件夹中的yml文件。如上所述,Spring boot project位于子project中,其中作为config(yml文件)位于根文件夹中。 我在java-jar中添加了--spring.config.location,但后来明白了jar是在没有依赖项的情况下生成的。知道如何在类路径中添加它们或者