Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-906

Running an M2 goal in a directory not containing a POM generates confusing messages.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.0-beta-1
    • None
    • Plugins and Lifecycle
    • None
    • - Windows 2000 server
      - Maven 2 beta 1

    Description

      • Running 'm2 compile' in a directory not containing a POM results in:

      java.lang.NullPointerException
      at org.apache.maven.plugin.PluginParameterExpressionEvaluator.evaluate(PluginParameterExpressionEvaluator.java:221)
      at org.apache.maven.plugin.PluginParameterExpressionEvaluator.evaluate(PluginParameterExpressionEvaluator.java:99)
      at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.fromExpression(AbstractConfigurationConverter.java:167)
      at org.codehaus.plexus.component.configurator.converters.basic.AbstractBasicConverter.fromConfiguration(AbstractBasicConverter.java:53)
      at org.codehaus.plexus.component.configurator.converters.basic.FileConverter.fromConfiguration(FileConverter.java:54)
      at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:252)
      at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:116)
      at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:55)
      at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1014)
      at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:515)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
      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: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)

      • On the other hand, running 'm2 generate-sources' in the same directory results in:

      [INFO] ----------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ----------------------------------------------------------------------------
      [INFO] Total time: < 1 second
      [INFO] Finished at: Fri Sep 16 21:24:47 CEST 2005
      [INFO] Final Memory: 1M/2M
      [INFO] ----------------------------------------------------------------------------

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              dtoch Davy Toch
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: