Re: Multiple source roots?

Martin Desruisseaux <[email protected]> Thu, 18 Sep 2025 23:43:59 +0200
Newsgroups gmane.comp.java.ide.netbeans.user
Message-ID <[email protected]>
Le 18/09/2025 à 22:42, Blake McBride a écrit :

> If you have *multiple source roots*, Maven itself only supports a 
> *single* |<sourceDirectory>| and |<testSourceDirectory>| in the 
> |<build>| section. To handle *more than one*, you need to *declare one 
> as the “main”* and then use the |build-helper-maven-plugin| to add the 
> rest.

The above describes Maven 3. There is a new way to declare sources in 
Maven 4, which allows multiple source roots. Maven 4 is not yet GA 
(latest version is 4.0.0-rc-4), not all plugins have been updated, and I 
don't know how advanced is the Maven 4 integration in NetBeans. But I 
guess that the situation will get good improvements in the next 10 months.

     Martin