gpt4 book ai didi

maven - 值为 'jar' 的“包装”无效。聚合器项目需要 'pom' 作为包装

转载 作者:行者123 更新时间:2023-12-05 02:21:43 26 4
gpt4 key购买 nike

我的项目有一个问题,即项目 pom 文件有一个错误,指出打包不应该解析为 jar,而是解析为 pom。我需要我的项目生成一个目标“jar”并且我没有任何子模块,但是这个错误是由另一个错误生成的:Child module of pom.xml does not exist 现在我的pom文件:

<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.itworx.bigdata</groupId>
<artifactId>MediaSensor</artifactId>
<version>0.0.1</version>
<name>MediaSensor</name>
<description>Complete and Integrated Spark Flow of Big Data</description>
<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
<!-- please stick to the CDH version and this repositry do not use apache repos -->
<!-- All CDH jars in this link http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cdh_vd_cdh5_maven_repo.html#concept_jhf_dcz_bs_unique_2-->
<dependencies>
<!-- following jar is implicitly needed by one of spark ref -->
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<scope>system</scope>
<version>1.6.0_24</version>
<systemPath>C:/Program Files/Java/jdk1.7.0_51/lib/tools.jar</systemPath>
</dependency>

<dependency>
<groupId>com.itworx.epenta</groupId>
<artifactId>ePenta</artifactId>
<scope>system</scope>
<version>1.1</version>
<systemPath>D:/Capability_Building/Media_Sensor_Development/temp_space/ePenta.jar</systemPath>
</dependency>
<dependency>
<groupId>com.itworx.lucene</groupId>
<artifactId>solr-writer</artifactId>
<scope>system</scope>
<version>1.1</version>
<systemPath>D:/Capability_Building/Media_Sensor_Development/temp_space/spark-solr-1.0-SNAPSHOT-shaded.jar
</systemPath>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20141113</version>
</dependency>

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.3.0-cdh5.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.10</artifactId>
<version>1.3.0-cdh5.4.2</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.apache.spark</groupId> -->
<!-- <artifactId>spark-streaming-twitter_2.10</artifactId> -->
<!-- <version>1.3.0-cdh5.4.2</version> -->
<!-- </dependency> -->

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming-kafka-assembly_2.10</artifactId>
<version>1.3.0-cdh5.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming-kafka_2.10</artifactId>
<version>1.3.0-cdh5.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core</artifactId>
<version>3.1.0-incubating</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>1.0.0-cdh5.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-annotations</artifactId>
<version>1.0.0-cdh5.4.2</version>
</dependency>

<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-hadoop-compat</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-hadoop2-compat</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-it</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-common</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->

<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.0.0-cdh5.4.2</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-checkstyle</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->

<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-examples</artifactId>
<version>1.0.0-cdh5.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-prefix-tree</artifactId>
<version>1.0.0-cdh5.4.2</version>
</dependency>

<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-protocol</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-rest</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-shell</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-testing-util</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.apache.hbase</groupId> -->
<!-- <artifactId>hbase-thrift</artifactId> -->
<!-- <version>1.0.0-cdh5.4.2</version> -->
<!-- </dependency> -->
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<outputFile>D:/Capability_Building/Media_Sensor_Development/temp_space/MediaSensorShaded.jar
</outputFile>
<artifactSet>
<includes>
<include>*:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<modules>
<module>?</module>
</modules>
</project>

有人能帮忙吗?

最佳答案

就像@florian-schaetz 在评论中指出的那样,您在 pom 的末尾有这个:

<modules>
<module>?</module>
</modules>

如果你不打算有子模块,你应该删除它。通过拥有它,您将迫使 Maven 将您的 pom 视为聚合 pom(显然不是)。

关于maven - 值为 'jar' 的“包装”无效。聚合器项目需要 'pom' 作为包装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32443481/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com