Class ModuleInfoUtils
java.lang.Object
org.netbeans.modules.maven.api.ModuleInfoUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addRequires
(NbMavenProject project, Collection<? extends org.apache.maven.artifact.Artifact> artifacts) Adds the given artifacts as require entries into module-info.java.static boolean
checkModuleInfoAndCompilerFit
(org.netbeans.api.project.Project prj) Determines if the configured maven-compiler-plugin isn't too old in case there is a main module-info.java in the given project (has to be >= 3.6).static boolean
hasModuleInfo
(NbMavenProject nbprj)
-
Constructor Details
-
ModuleInfoUtils
public ModuleInfoUtils()
-
-
Method Details
-
addRequires
public static void addRequires(NbMavenProject project, Collection<? extends org.apache.maven.artifact.Artifact> artifacts) Adds the given artifacts as require entries into module-info.java. The artifact scope determines the target module-info.java file - main or test. If there is no module-info.java file then nothing happens.- Parameters:
project
-artifacts
-
-
checkModuleInfoAndCompilerFit
public static boolean checkModuleInfoAndCompilerFit(org.netbeans.api.project.Project prj) Determines if the configured maven-compiler-plugin isn't too old in case there is a main module-info.java in the given project (has to be >= 3.6).- Parameters:
prj
- the project to be checked- Returns:
true
if there is no module-info file or if the m-c-p version is new enough (>= 3.6). Otherwisefalse
-
hasModuleInfo
-