pom.xml - 我在这个 POM 中的错误是什么以及在哪里?
问题描述
我试图在示例应用程序上编写一个 pom,但在依赖项中出现错误。我阅读了https://maven.apache.org/guides/index.html和https://maven.apache.org/community.html realatives 文章,我仍然找不到。
但是当我查看我的 pom 时,它包含了我需要的https://maven.apache.org/guides/index.html中包含的所有元素。
下面给出的是我的应用程序的 pom,我看不到错误。任何身体状况都暗示着某种东西。
说明 资源路径位置类型 对于工件 {practica:app01:null:jar}:版本不能为空。org.apache.maven.artifact.InvalidArtifactRTException: For artifact {practica:app01:null:jar}: 版本不能为空。pom.xml /app01 line 1 Maven pom加载问题
说明 资源路径 位置 类型 缺少工件 org.springframework:spring-context:jar:${org.springframework-Version}
提前感谢您为澄清此问题提供的任何帮助。
我的 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>practica</groupId>
<artifactId>app01</artifactId>
<name>app01</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Host for deploy-->
<bb-host>127.0.0.1</bb-host>
<java-version>1.7</java-version>
<org.springframework-version>3.1.1.RELEASE</org.springframework-version>
<org.aspectj-version>1.7.2</org.aspectj-version>
<org.slf4j-version>1.7.12</org.slf4j-version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-Version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-csv -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.camel/camel-core -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.21.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.camel/camel-spring -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>2.21.0</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>spi-annotations</artifactId>
<version>2.21.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.camel/camel-jms -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>2.21.0</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-http4</artifactId>
<version>2.21.0</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-quartz</artifactId>
<version>2.21.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.activemq/activemq-all -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.15.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.25</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Allows the routes to be run via 'mvn camel:run' -->
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
非常感谢。
解决方案
推荐阅读
- r - 将 PCR 96 孔板转换为单列格式
- sql - 如何更改存储在 Postgres 中的 JSON 对象中所有记录的键名
- loops - Applescript:循环中的文本定界
- javascript - 从 Firebase 获取图片网址
- julia - ```@time``` 范围内的 UndefVarError 错误
- mysql - 选择单个结果或多个结果时的 sql 请求问题
- javascript - PHP 包含在 2 个网站上:一个工作,一个不工作
- sql - SQL:拆分字符串以连接表 更新
- ios - 如何修复条件绑定的初始化程序必须具有可选类型,而不是“字符串”?
- regex - 如何使用 grep 从文本中提取两个单词之间的每个字符串并将其保存到新文件中?