我提到了一些相关的帖子,但它并没有解决我的问题。因为我使用的是 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 line 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”组成
我被这个困住了。任何帮助表示赞赏。如果您需要更多详细信息,请告诉我。