English 中文(简体)
Failed to parse plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.4.3. 1. 打开齐普案卷错误
原标题:Failed to parse plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.4.3.. error in opening zip file
  • 时间:2011-10-03 07:05:51
  •  标签:
  • maven

我正在利用ven来建造和编辑一个春季项目,这里我对“开启齐普案卷”的错误。 我在此附上了这些背景。xml表明,我配置了代理权以及om。

[SETTINGS.XML]

        <proxy>
            <active>true</active>
            <protocol>http</protocol>
            <host>XXXX</host>
            <port>8080</port>
            <username>XXXX</username>
            <password>XXXXX</password>
            <nonProxyHosts>localhost</nonProxyHosts>
         </proxy>

[POM.XML]

<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>
  <groupId>com.wrox</groupId>
  <artifactId>springfirst</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>springfirst</name>
  <url>http://maven.apache.org</url>
    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <filtering>true</filtering>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <properties>
        <spring-version>2.0.6</spring-version>
        <junit-version>3.8.2</junit-version>
    </properties>
  
  <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring-version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
            <version>${spring-version}</version>
        </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

[ERROR MESSAGE]

E:DOCUMENTSETCTUTORIALSegspringcode_091809srcchapter1springfirst>mvn -X compile
Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)
Maven home: C:maven2.2.1in..
Java version: 1.6.0_15, vendor: Sun Microsystems Inc.
Java home: C:Program FilesJavajdk1.6.0_15jre
Default locale: en_PH, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:maven2.2.1in..confsettings.xml
[DEBUG] Reading user settings from C:UsersAMT.m2settings.xml
[DEBUG] Using local repository at C:UsersAMT.m2
epository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:UsersAMT.m2
epository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.wrox:springfirst:jar:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.wrox:springfirst:jar:1.0-SNAPSHOT
[WARNING]  build.plugins.plugin.version  for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 42, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.wrox:springfirst:jar:1.0-SNAPSHOT
[DEBUG] Tasks:   [compile]
[DEBUG] Style:   Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building springfirst 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-pack
age, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.177s
[INFO] Finished at: Mon Oct 03 14:57:47 SGT 2011
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to parse plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.4.3 (C:UsersAMT.m2
epositoryorgapachemavenpluginsmaven-resources-plugin2.4.3maven-resources-plugin-2.4.3.jar): error in opening zip file -> [Help 1]
org.apache.maven.plugin.PluginDescriptorParsingException: Failed to parse plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:2.4.3 (C:UsersAMT.m2
epositoryorgapachemavenpluginsmaven-resources-plugin2.4.3maven-resources-plugin-2.4.3.jar): error in opening zip file
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.extractPluginDescriptor(DefaultMavenPluginManager.java:212)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:147)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
        at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:116)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
        at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
        at java.util.jar.JarFile.<init>(JarFile.java:133)
        at java.util.jar.JarFile.<init>(JarFile.java:112)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.extractPluginDescriptor(DefaultMavenPluginManager.java:170)
        ... 25 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginDescriptorParsingException
 cmd  is not recognized as an internal or external command,
operable program or batch file.
E:DOCUMENTSETCTUTORIALSegspringcode_091809srcchapter1springfirst>
问题回答

删除C:UsersAMT.m2 epositoryorgapachemavenpluginsmaven-resources-plugin2.4.3maven-resources-plugin-2.4.3jar。 或更妥善的<条码>C:UsersAMT.m2 epositoryorgapachemavenpluginsmaven-resources-plugin2.4.3 翻了一番,再次尝试。

显然,杰尔案不完整或腐败。

销毁储存库后,这个问题已经解决。

提出同样的问题。 这为我工作。

检查您的文稿

HOME>> mvn -version
3.0.3

我更新了这一版本,使其达到3.2.1,并改变了<编码>bash_profile的道路。 现在再次检查。

HOME>> mvn -version

If it is updated, delete the repository and close the terminal. Reopen the terminal and type

Project Path >> mvn clean install 

如果未更新,则类型如下:

HOME>> echo $JAVA_HOME
HOME>> which java
/usr/share/java(for e.g.)
HOME>> cd /usr/share/java
HOME>> open .

你们将看到该版本的旧内容。 用新版本的内容取代其内容。

然后删除存放处。

Project Path>> mvn clean install

Now all your maven jars will be downloaded.

希望这将有助于你们。





相关问题
JavaFX with Maven [closed]

I recently started a JavaFX project, and I d like to use Maven as my compiler/deployment tool. Is there a good tutorial or plugin to integrate JavaFX and Maven?

How to upload jar to respository?

I have jar files that cannot be found on Maven Central repository. I would like to add the jar so I can just include extra tag in my pom.xml file and other developer can use the jar. What are the ...

Debug Maven project in Eclipse with third party sources

I am currently developing a maven project in eclipse. The m2eclipse plugin works beautifully. It even works out of the box with debugging. But when I am debugging open source third party libarries. ...

Could Free Pascal benefit of something like Apache Maven?

Apache Maven is a very popular build and dependency management tool in the Java open source ecosphere. I did some tests to find out if it can handle compiled Free Pascal / Delphi units and found it ...

Run a single test method with maven

I know you can run all the tests in a certain class using: mvn test -Dtest=classname But I want to run an individual method and -Dtest=classname.methodname doesn t seem to work.

Uploading a directory using sftp with Maven

How can I upload a directory - Eclipse update site - using sftp with public key authentication in Maven? For background information: I m using tycho to build an Eclipse plugin and want to get the ...

What are solid NMaven or build servers for .NET alternatives?

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in the C#/.NET world as its larger cousin was in the Java ...

热门标签