autogenerate/install doesn't work
---------------------------------

         Key: MNG-393
         URL: http://jira.codehaus.org/browse/MNG-393
     Project: m2
        Type: Bug
    Versions: 2.0-alpha-2    
 Environment: Microsoft Windows XP [Version 5.1.2600]

java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b36)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b36, mixed mode, sharing)

Maven version: 2.0-alpha-2
    Reporter: Malachi de AElfweald
    Priority: Minor


Migrating from M1 to M2.

Tried to start with instructions from here:
http://maven.apache.org/maven2/getting-started.html

did: m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
verified that pom.xml and source files were there

tried: m2 install
crashed with null pointer because jar had nothing to jar because compile said 
there was no source

added the following to the autogenerated pom.xml:
  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <testSourceDirectory>src/test/java</testSourceDirectory>
    <directory>target/classes</directory>
    <outputDirectory>target/dist</outputDirectory>
    <testOutputDirectory>target/test-classes</testOutputDirectory>
  </build>

still, 'm2 package', 'm2 compile' and 'm2 install' give same error:

[INFO] 
----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] 
----------------------------------------------------------------------------
[INFO] maven-jar-plugin: resolved to version 2.0-alpha-2 from local repository
[INFO] maven-resources-plugin: resolved to version 2.0-alpha-2 from local 
repository
[INFO] maven-compiler-plugin: resolved to version 2.0-alpha-2 from local 
repository
[INFO] maven-surefire-plugin: resolved to version 2.0-alpha-2 from local 
repository
[INFO] maven-install-plugin: resolved to version 2.0-alpha-2 from local 
repository
[INFO] [resources:resources]
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] Setting reports dir: target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no test to run.

Results :
[surefire] Tests run: 0, Failures: 0, Errors: 0

[INFO] [jar:jar]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] 
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
----------------------------------------------------------------------------
[ERROR] Cause:
org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
        at org.apache.maven.plugin.jar.JarMojo.execute(JarMojo.java:105)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(DefaultLifecycleExecutor.java:169)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:90)
        at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:253)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:246)
        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:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: java.lang.NullPointerException
        at 
org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:141)
        at 
org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:204)
        at org.apache.maven.plugin.jar.JarMojo.execute(JarMojo.java:100)
        ... 14 more
[INFO] 
----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun May 15 09:42:21 PDT 2005
[INFO] Final Memory: 1M/3M
[INFO] 
----------------------------------------------------------------------------


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to