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

我不能解决maven建筑错误失败

宗建章
2023-03-14

我使用maven构建项目时出错。所以请帮忙!谢谢你的帮助

无法执行目标组织。阿帕奇。专家插件:maven assembly插件:2.2.1:ProjectNewStart应用程序ithelp上的assembly(make assembly):目标组织的执行make assembly。阿帕奇。专家plugins:maven程序集plugin:2.2.1:assembly失败:对于工件{null:null:null:jar}:groupId不能为空。原因:执行目标组织的组装。阿帕奇。专家plugins:maven程序集plugin:2.2.1:assembly失败:对于工件{null:null:null:jar}:groupId不能为空。堆栈跟踪:org。阿帕奇。专家生命周期。LifecycleExecutionException:无法执行目标组织。阿帕奇。专家插件:maven assembly插件:2.2.1:ProjectNewStart应用程序ithelp上的assembly(make assembly):目标组织的执行make assembly。阿帕奇。专家plugins:maven程序集plugin:2.2.1:assembly失败:对于工件{null:null:null:jar}:groupId不能为空。

<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">
<parent>
    <groupId>com.feinno.app</groupId>
    <artifactId>root-pom</artifactId>
    <version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>newstart.app</groupId>
<artifactId>newstart-app-ithelp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>newstart-app-ithelp</name>
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2.1</version>
            <configuration>
                <appendAssemblyId>false</appendAssemblyId>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <archive>
                    <manifest>
                        <mainClass>com.newstart.app.ithelp.ITHelpBean</mainClass>
                    </manifest>
                </archive>
            </configuration>
            <executions>
                <execution>
                    <id>make-assembly</id>
                    <phase>package</phase>
                    <goals>
                        <goal>assembly</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <verbose>true</verbose>
                <fork>true</fork>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.3</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.1.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>4.1.2</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.0</version>
    </dependency>
    <dependency>
        <groupId>com.feinno.app</groupId>
        <artifactId>feinno-app-common</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz</artifactId>
        <version>2.2.0</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.24</version>
    </dependency>
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>0.2.9</version>
    </dependency>
    <dependency>
        <groupId>spring-aop</groupId>
        <artifactId>spring-aop</artifactId>
        <version>3.2.3</version>
    </dependency>
    <dependency>
        <groupId>spring-beans</groupId>
        <artifactId>spring-beans</artifactId>
        <version>3.2.3</version>
    </dependency>
    <dependency>
        <groupId>spring-context</groupId>
        <artifactId>spring-context</artifactId>
        <version>3.2.3</version>
    </dependency>
    <dependency>
        <groupId>spring-core</groupId>
        <artifactId>spring-core</artifactId>
        <version>3.2.3</version>
    </dependency>
    <dependency>
        <groupId>spring-jdbc</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>3.2.3</version>
    </dependency>
    <dependency>
        <groupId>spring-tx</groupId>
        <artifactId>spring-tx</artifactId>
        <version>3.2.3</version>
    </dependency>
    <dependency>
        <groupId>spring-expression</groupId>
        <artifactId>spring-expression</artifactId>
        <version>3.2.3</version>
    </dependency>
    <dependency>
        <groupId>IKAnalyzer</groupId>
        <artifactId>IKAnalyzer</artifactId>
        <version>6</version>
    </dependency>
    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-core</artifactId>
        <version>3.6.0</version>
    </dependency>
    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-core</artifactId>
        <version>2.6.0</version>
    </dependency>
    <dependency>
        <groupId>linq4j</groupId>
        <artifactId>linq4j</artifactId>
        <version>1.0</version>
    </dependency>
</dependencies>
<distributionManagement>
    <snapshotRepository>
        <id>snapshots</id>
        <url>http://10.10.208.92:8081/content/repositories/snapshots</url>
    </snapshotRepository>
</distributionManagement>

共有3个答案

燕和同
2023-03-14

如果您查看maven构建输出,应该会有一些警告。pom无效,可传递依赖项(如果有)将不可用。删除与这些POM和rebuild对应的所有工件,您不需要删除整个存储库。

慕祯
2023-03-14

我的解决方案不同。我有一个POM有一个

修复:删除

在代码中,以下是破碎的情况:

Parent pom.xml:
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
        </dependency>
    </dependencies>
</dependencyManagement>

Child pom.xml:
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
    </dependencies>
</dependencyManagement>
...
<dependencies>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${httpclient.version}</version>
    </dependency>
</dependencies>

后修复:父POM是相同的,子POM只有这个

<dependencies>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
    </dependency>
</dependencies>

解修然
2023-03-14

我已经通过删除本地. m2/repository文件夹修复了此问题。现在构建成功了。

 类似资料:
  • 问题内容: 我收到此错误: 我正在使用Tomcat 6作为Web服务器。我有两个HTTPS Web应用程序安装在不同端口上但在同一台机器上的不同Tomcat上。说App1(port 8443)和 App2(port 443)。App1连接到App2。当App1连接到App2我得到以上错误。我知道这是一个非常常见的错误,因此在不同的论坛和站点上遇到了许多解决方案。我在server.xml两个Tomc

  • 我在网站“https://medium . com/discord-bots/making-a-basic-discord-bot-with-Java-834949008 c2b”上跟随一个教程我得到了错误接收方类com . github . jengel man . grad le . plugins . shadow . internal . dependency filecollection

  • 我在我的项目中使用Maven3。它已经在架子上搁置了一段时间,但我们最近又开始着手处理了。 关于如何正确“修复”我们的pom.xml文件的任何具体建议都将不胜感激。

  • 我正在学习一个关于构建多平台iOS框架的教程--它提到了这些架构名称: 在我的Xcode构建设置中,我对我的体系结构进行了如下设置: $(ARCHS_STANDARD) i386 X86_64 ARM7S ARMv7 ARMv7S 然而,在构建时,我会得到以下错误: 有人知道为什么吗?

  • 我一直在努力理解Storm建筑,但我不确定我是否理解正确。我会尽可能准确地解释我认为的情况。请解释一下如果我错了什么是对的。 http://storm.apache.org/releases/2.0.0-SNAPSHOT/Understanding-the-parallelism-of-a-Storm-topology.html这意味着一个工人也是一个过程http://storm.apache.o

  • 问题内容: 在Windows Vista SP2 + Python 2.7.10上,我可以连接到https://www.python.org,但不能连接到https://codereview.appspot.com 剧本: 并输出: 如何解决问题,https://codereview.appspot.com/到底有什么问题? 问题答案: 我的猜测是,它与OpenSSL中的替代链处理有关,如Pyth