I lloked at the sources: it seems you're including non-existent source 
directory files.
Please open a Jira issue [1] with a sample project as attachement, and I'll fix 
the plugin to give a better error message on such case.

Note in your pom.xml that specifying a version for archetype plugin and 
extension is a good practice, or you'll get a non-reproducible build.

Regards,

Hervé

[1] http://jira.codehaus.org/browse/ARCHETYPE

Le vendredi 1 avril 2011, SCHNEIDER-DUFEUTRELLE Maxime a écrit :
> I wonder if my mail was sent on the mailing list so I send it again, sorry
> if you already receive this mail.
> 
> 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(DefaultArchetype
> Manager.java:108) at
> org.apache.maven.archetype.DefaultArchetypeManager.zip(DefaultArchetypeMan
> ager.java:98) at
> org.apache.maven.archetype.DefaultArchetypeManager.archiveArchetype(Defaul
> tArchetypeManager.java:81) at
> org.apache.maven.archetype.mojos.JarMojo.execute(JarMojo.java:88) at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMana
> ger.java:490) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLi
> fecycleExecutor.java:694) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecyc
> le(DefaultLifecycleExecutor.java:55 6)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLif
> ecycleExecutor.java:535) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFa
> ilures(DefaultLifecycleExecutor.jav a:387)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(De
> faultLifecycleExecutor.java:348) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecyc
> leExecutor.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(DelegatingMethodAccessorIm
> pl.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.
> *************************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to