Hi, I had the same problem and it was happening because there was no class file in the jar !
I found that the "mvn install" command on my plugin does not compile any file : [INFO] [compiler:compile] [INFO] No sources to compile After research, i found that my directories were not correct ! So perhaps if your plugin JAR does not have any .class, you must verify if your java src are in : <plugin project>/src/main/java/<packages> ... neo.nirav wrote: > > Hi all, > > I just searched the topic and found that if we put our plugin in > org.apache.maven.plugins, = groupdID, the plugin should run and as per > the previous discussion it worked for the topic starter BUT, i tried the > same and still getting the error!! :( > <br> > Any solution please.. > <pre> > C:\mp\test\sample-plugin>mvn hello:sayhi > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'hello'. > [INFO] artifact org.apache.maven.plugins:maven-hello-plugin: checking for > update > s from central > [INFO] > ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] null > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > java.lang.NullPointerException > at > org.apache.maven.plugin.descriptor.PluginDescriptor.getMojo(PluginDes > criptor.java:262) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor > (DefaultLifecycleExecutor.java:1529) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy > AggregationNeeds(DefaultLifecycleExecutor.java:386) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi > fecycleExecutor.java:138) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.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) > </pre> > -- View this message in context: http://www.nabble.com/NullPointerException-at-org.apache.maven.plugin.descriptor.PluginDescriptor.getMojo%28PluginDes-tf3478847s177.html#a12339362 Sent from the Maven Developers mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
