gpt4 book ai didi

java - org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject,org.apache.maven.archiver.MavenArchiveConfiguration)

转载 作者:行者123 更新时间:2023-12-02 03:18:25 30 4
gpt4 key购买 nike

我提到了一些相关的职位,但并没有解决我的问题。因为我正在使用maven-jar-plugin-2.4 jar。

我正在使用JBoss Developer Studio 7.1.1 GA IDE,并且正在尝试构建代码。在命令提示符下,我的构建成功。当我尝试在JBDS 7.1.1中编译我的代码时,抛出以下错误

org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject,org.apache.maven.archiver.MavenArchiveConfiguration)pom.xml / csi-rcs-connector第1行Maven配置问题

我的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>
<parent>
<groupId>com.aaa.csi</groupId>
<artifactId>csi</artifactId>
<version>2.33-SNAPSHOT</version>
<relativePath>../csi/pom.xml</relativePath>
</parent>
<artifactId>csi-rcs-connector</artifactId>
<packaging>rar</packaging>
<name>RCS JCA Connector</name>
<description>JCA-compliant connector for accessing RCS</description>

<dependencies>

<dependency>
<groupId>com.aaa.csi</groupId>
<artifactId>csi-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.aaa.csi</groupId>
<artifactId>csi-rcs-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-rar-plugin</artifactId>
<executions>
<execution>
<id>rar</id>
<goals>
<goal>rar</goal>
</goals>
<configuration>
<includeJar>false</includeJar>
<rarSourceDirectory>target/classes</rarSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>

</plugins>

</build>

<profiles>

<profile>
<id>stage-dist</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>

</profiles>

</project>


我的父pom文件看起来像



<finalName>${project.artifactId}</finalName>

<pluginManagement>

<plugins>

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<argLine>-enableassertions</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-packaging-maven-plugin</artifactId>
<version>2.1.1</version>
<extensions>true</extensions>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-rar-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>delete-dist-dir</id>
<phase>clean</phase>
<configuration>
<tasks>
<delete dir="${dist.dir}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>create-dist-dir</id>
<phase>pre-integration-test</phase>
<configuration>
<tasks>
<mkdir dir="${dist.dir}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>hard-deploy</goal>
</goals>
<configuration>
<serverName>${jboss.server.id}</serverName>
<deploySubDir>${jboss.deploy.dir}</deploySubDir>
<fileName>${deployable.file.name}</fileName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<generateReports>false</generateReports>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>create-remote-resources</id>
<goals>
<goal>bundle</goal>
</goals>
</execution>
<execution>
<id>copy-remote-resources</id>
<phase>pre-site</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<configuration>
<resourceBundles>
<resourceBundle>${project.groupId}:${project.artifactId}:${project.version}</resourceBundle>
</resourceBundles>
<outputDirectory>${project.build.directory}/site</outputDirectory>
<includes>
<include>**/*.xsd</include>
<include>**/*.wsdl</include>
</includes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>src/site/resources</directory>
<includes>
<include>**/schema/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>

</plugins>

</pluginManagement>

<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-rar-plugin</artifactId>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-packaging-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>

</plugins>




我的.m2文件夹包含“ maven-jar-plugin-2.4.jar”

我被困住了。任何帮助表示赞赏。让我知道您是否需要更多详细信息。

最佳答案

简单的解决方案:降级到2.6版本
实际上,可能的解决方案是回到2.6版,然后对该项目进行进一步的更新将消除任何错误。但是,这不是理想的情况,并且可能有更好的解决方案:更新m2e扩展(Eclipse Maven集成)。

更好的解决方案:更新Eclipse m2e扩展
在“帮助”>“安装新软件..”中,添加新存储库(通过“添加..”选项),指向以下任何URL:

https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.2/N/LATEST/
http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.2/N/LATEST/
然后照常按照更新向导进行操作。然后,Eclipse将需要重新启动。之后,在有关的Maven项目上进行进一步的Update Project ..将消除任何错误,然后您的Maven构建可以享受最新的maven-jar-plugin版本的好处。

关于java - org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject,org.apache.maven.archiver.MavenArchiveConfiguration),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39964962/

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