You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Malachi de AElfweald (JIRA)" <ji...@codehaus.org> on 2005/05/15 18:56:21 UTC

[jira] Created: (MNG-393) autogenerate/install doesn't work

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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-393) autogenerate/install doesn't work

Posted by "Choong Yong Koh (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-393?page=comments#action_41844 ] 

Choong Yong Koh commented on MNG-393:
-------------------------------------

Could be that Malachi forgot to change folder into the generated project before running "m2 install".  Happened to me when I tried to follow the same set of instructions at http://maven.apache.org/maven2/getting-started.html

> autogenerate/install doesn't work
> ---------------------------------
>
>          Key: MNG-393
>          URL: http://jira.codehaus.org/browse/MNG-393
>      Project: Maven 2
>         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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNG-393) autogenerate/install doesn't work

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-393?page=all ]
     
Brett Porter closed MNG-393:
----------------------------

    Resolution: Cannot Reproduce

Works for me on JDK 5.0_03. Incidentally, I don't know why you chose those output directories. I think you have them back to front :)

I'm speculating that the alpha doesn't work with Java 1.6.0. We have no intention of supporting that until it is closer to release, and if it isn't backwards compat, that's probably a bug on their end :)


> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org