I am using NB 27, Java 25, and Maven 3.9.11. I have a simple application with 
two files. One is in the compact source file format meaning there is only a 
method in the file with a signature of void main(). In this main the other 
class is instantiated and called upon. I am using the pom file generated by 
NetBeans and both files are in the same package. Compact source files do not 
allow a package statement, I am verifying this on the Amber mailing list, but 
they can have an import statement. If I use Run from the project context menu 
and the pom file has or does not have <defaultGoal> it works. If I use Run 
Maven -> Other Goals and use compile exec:java or have these in the 
<defaultGoal> I get this error:
java.lang.Exception: The specified mainClass doesn't contain a main method with 
appropriate signature.
Both Run and Run Maven use Maven but with a slightly different command line. 
I'd expect my example to work with both, not only with Run.
Is this an NB issue or a Maven issue?

Thank you in advance for any suggestions,

Ken


Reply via email to