无法更新快照或使用 Maven 运行安装目标

发布于 2024-07-19 04:28:59 字数 4113 浏览 9 评论 0原文

有谁知道如何解决这个 Maven 错误? 当我尝试更新项目的快照时,我收到以下信息:

my-projects-name 的构建错误; org.apache.maven.lifecycle.LifecycleExecutionException: 插件管理器中的内部错误 执行目标 'org.apache.maven.plugins:maven-dependency-plugin:2.0:unpack': Mojo 执行失败。

然后当我尝试运行“mvn install”时:

<前><代码>[信息] [程序集:单个{执行:默认}] [信息] -------------------------------------------------- -------- [错误] 构建错误 [信息] -------------------------------------------------- -------- [信息] 读取程序集时出错:未找到程序集描述符。

我正在运行 Maven 2.1.0。 谁能解释一下为什么它对我犹豫不决? 其他团队成员能够使用 SVN 中完全相同的代码副本执行上述操作。

谢谢!

编辑:这是 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.company.group</groupId>
    <artifactId>the-project-parent</artifactId>
    <version>1.0</version>
  </parent>
  <groupId>com.company.group.project</groupId>
  <artifactId>project-root</artifactId>
  <packaging>pom</packaging>
  <name>Project Name</name>
  <version>1.0.2-SNAPSHOT</version>
  <description>This artifact contains the common settings for the Project.</description>
  <url>http://maven.dev.companyName.com/sites/projectGroup/project</url>
  <scm>
    <connection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</connection>
    <developerConnection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</developerConnection>
  </scm>
  <modules>
    <module>module-1</module>
    <module>module-2</module>
    <module>module-3</module>
    <module>module-4</module>
  </modules>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>net.sourceforge.jtds.jdbc</groupId>
        <artifactId>jtds</artifactId>
        <version>1.2.2</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.unitils</groupId>
        <artifactId>unitils</artifactId>
        <version>2.2</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.easymock</groupId>
        <artifactId>easymock</artifactId>
        <version>2.3</version>
        <scope>test</scope>
      </dependency>

      <!-- I cut most dependencies for brevity -->

      <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
        <scope>runtime</scope>
        <exclusions>
          <exclusion>
            <artifactId>commons-logging</artifactId>
            <groupId>commons-logging</groupId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0-beta-5</version>
        <inherited>false</inherited>
        <configuration>
          <preparationGoals>clean install</preparationGoals>
          <tagBase>https://sourceforge.companyname.com/svn/repos/projects/tags/projGroup/my-project-name</tagBase>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Does anyone have an idea how to resolve this Maven error? I get the following when I attempt to update my project's snapshots:

Build errors for my-projects-name;
org.apache.maven.lifecycle.LifecycleExecutionException:
Internal error in the plugin manager
executing goal
'org.apache.maven.plugins:maven-dependency-plugin:2.0:unpack':
Mojo execution failed.

And then when I try running "mvn install":

[INFO] [assembly:single {execution:default}] [INFO]   
--------------------------------------------------------- 
[ERROR] BUILD ERROR [INFO]
--------------------------------------------------------- 
[INFO] Error reading assemblies: No assembly descriptors found.

I'm running Maven 2.1.0. Can anyone shed some light as to why it's balking at me? Other team members are able to perform the above actions with the exact same copy of the code from SVN.

Thanks!

Edit: Here's the 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.company.group</groupId>
    <artifactId>the-project-parent</artifactId>
    <version>1.0</version>
  </parent>
  <groupId>com.company.group.project</groupId>
  <artifactId>project-root</artifactId>
  <packaging>pom</packaging>
  <name>Project Name</name>
  <version>1.0.2-SNAPSHOT</version>
  <description>This artifact contains the common settings for the Project.</description>
  <url>http://maven.dev.companyName.com/sites/projectGroup/project</url>
  <scm>
    <connection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</connection>
    <developerConnection>scm:svn:https://sourceforge.companyname.com/svn/repos/group/tags/projGroup/my-project-name</developerConnection>
  </scm>
  <modules>
    <module>module-1</module>
    <module>module-2</module>
    <module>module-3</module>
    <module>module-4</module>
  </modules>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>net.sourceforge.jtds.jdbc</groupId>
        <artifactId>jtds</artifactId>
        <version>1.2.2</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.unitils</groupId>
        <artifactId>unitils</artifactId>
        <version>2.2</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.easymock</groupId>
        <artifactId>easymock</artifactId>
        <version>2.3</version>
        <scope>test</scope>
      </dependency>

      <!-- I cut most dependencies for brevity -->

      <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
        <scope>runtime</scope>
        <exclusions>
          <exclusion>
            <artifactId>commons-logging</artifactId>
            <groupId>commons-logging</groupId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0-beta-5</version>
        <inherited>false</inherited>
        <configuration>
          <preparationGoals>clean install</preparationGoals>
          <tagBase>https://sourceforge.companyname.com/svn/repos/projects/tags/projGroup/my-project-name</tagBase>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绿光 2024-07-26 04:28:59

您粘贴的 pom 中没有显示程序集插件配置。 也许是在父母身上? 如果没有配置,那么程序集插件会抱怨,因为您没有使用告诉它要做什么的描述符来配置它。 运行 mvn help: effective-pom ,然后粘贴这些结果(确保清除所有密码),以便我可以在继承后看到您的完整 pom。

You have no assembly plugin configuration shown in the pom you pasted. Perhaps it's in the parent? If there's no config then the assembly plugin will complain because you haven't configured it with a descriptor that tells it what to do. run mvn help:effective-pom and then paste those results (make sure to scrub any passwords) so I can see your full pom after inheritence.

最美不过初阳 2024-07-26 04:28:59

我终于通过将 Maven 降级到 2.0.9 来运行 install 目标。

编辑:
我尝试使用 Maven 2.1.0 执行 mvn clean installmvn clean install assembly: assembly ,它重复了上述错误: > “找不到程序集描述符。”

它仍然适用于 Maven 2.0.9。 我完全相信版本之间至少发生了一些变化,导致了这种差异......

编辑:
据我所知,Maven 2.1.0 和我们使用的这个插件的版本之间可能存在某种版本冲突:

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-5</version>

I finally got it to run the install goal by downgrading Maven to 2.0.9.

EDIT:
I tried executing mvn clean install and mvn clean install assembly:assembly using Maven 2.1.0 and it duplicated the above error: > "No Assembly descriptors found."

It still works with Maven 2.0.9. I'm wholly convinced that at minimum something has changed between versions which is causing this this discrepancy...

EDIT:
From what I've been able to find out, it appears there's likely some kind of version conflict between Maven 2.1.0 and the version of this plugin we use:

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-5</version>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文