maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SCHNEIDER-DUFEUTRELLE Maxime <maxime.schneider-dufeutre...@sgcib.com>
Subject NPE when trying to install an archetype
Date Wed, 30 Mar 2011 15:39:46 GMT
Hi all,

I'd like to make my own artifact/archetype and I'm facing an issue when trying to install
it, precisely when it tries to make the jar file.

Here is the output :

C:\HOMEWARE\Maxime\myartifact >mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building myartifact
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build
is platform dependent!
[INFO] skip non existing resourceDirectory C:\HOMEWARE\Maxime\ myartifact \src\main\resources
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build
is platform dependent!
[INFO] skip non existing resourceDirectory C:\HOMEWARE\Maxime\myartifact\src\test\resources
[INFO] [archetype:jar {execution: default-jar}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at org.apache.maven.archetype.DefaultArchetypeManager.zipper(DefaultArchetypeManager.java:108)
        at org.apache.maven.archetype.DefaultArchetypeManager.zip(DefaultArchetypeManager.java:98)
        at org.apache.maven.archetype.DefaultArchetypeManager.archiveArchetype(DefaultArchetypeManager.java:81)
        at org.apache.maven.archetype.mojos.JarMojo.execute(JarMojo.java:88)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:55
6)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
a:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Mar 30 17:16:23 CEST 2011
[INFO] Final Memory: 14M/34M
[INFO] ------------------------------------------------------------------------


The "myartifact" folder contains a pom :

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.maven.dotnet</groupId>
  <artifactId>myartifact</artifactId>
  <version>0.1-SNAPSHOT</version>
  <packaging>maven-archetype</packaging>
  <name>myartifact</name>
  <build>
                        <extensions>
                          <extension>
                                                <groupId>org.apache.maven.archetype</groupId>
                                                <artifactId>archetype-packaging</artifactId>
                          </extension>
                        </extensions>
                        <plugins>
                          <plugin>
                                                <artifactId>maven-archetype-plugin</artifactId>
                                                <extensions>true</extensions>
                          </plugin>
                        </plugins>
  </build>
</project>

Another pom in myartifact\archetype-resources and a archetype.xml in myartifact\META-INF\maven.
I followed http://maven.apache.org/guides/mini/guide-creating-archetypes.html .

Does anyone know where it could come from ? Let me know if you need some other information
to help me.

Thanks in advance,
Regards,
Maxime
*************************************************************************
This message and any attachments (the "message") are confidential, intended solely for the
addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.
  
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the
message if altered, changed or
falsified.
                              ************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles
de contenir des informations couvertes 
par le secret professionnel. 
Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion
non autorisee est interdite.
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message
s'il a ete altere, deforme ou falsifie.
*************************************************************************

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message