Merge pull request #15 from oyarzun/checkstyle-cleanup

Cleanup checkstyle errors
diff --git a/pom.xml b/pom.xml
index 2ead2bc..d3199a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -180,13 +180,13 @@
                 <configuration>
                     <component>12336702</component>
                 </configuration>
-   
+
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>                            
+                <artifactId>maven-checkstyle-plugin</artifactId>
             </plugin>
-                        
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
@@ -232,7 +232,7 @@
                     </reportSet>
                 </reportSets>
             </plugin>
-                        
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jxr-plugin</artifactId>
@@ -268,10 +268,10 @@
                         <excludedLink>plugin-info.html</excludedLink>
                     </excludedLinks>
                     <!--<excludedPages>
-                        <excludedPage>dependencies.html</excludedPage> 
+                        <excludedPage>dependencies.html</excludedPage>
                     </excludedPages>-->
-                </configuration>	       
-            </plugin>                        
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>cobertura-maven-plugin</artifactId>
@@ -282,10 +282,10 @@
                             <exclude>**/HelpMojo.class</exclude>
                             <exclude>**/BuildMacMojo.class</exclude>
                         </excludes>
-                    </instrumentation>    
+                    </instrumentation>
                 </configuration>
             </plugin>
-            <plugin> 
+            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>taglist-maven-plugin</artifactId>
                 <version>2.4</version>
@@ -450,7 +450,7 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <!-- use harness from NetBeans 11.2  --> 
+            <!-- use harness from NetBeans 11.2  -->
             <groupId>${project.groupId}</groupId>
             <artifactId>nbm-maven-harness</artifactId>
             <version>11.2</version>
diff --git a/src/main/java/org/apache/netbeans/nbm/AbstractNbmMojo.java b/src/main/java/org/apache/netbeans/nbm/AbstractNbmMojo.java
index afd82e9..9240caa 100644
--- a/src/main/java/org/apache/netbeans/nbm/AbstractNbmMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/AbstractNbmMojo.java
@@ -225,8 +225,8 @@
             log.warn(
                     "dependencies in module descriptor are deprecated, use the plugin's parameter moduleDependencies" );
 
-            //we need to make sure a dependency is not twice there, module deps override the config (as is the case with other
-            //configurations)
+            //we need to make sure a dependency is not twice there, module deps override the config
+            //(as is the case with other configurations)
             for ( Dependency d : module.getDependencies() )
             {
                 Dependency found = null;
@@ -403,8 +403,9 @@
             File jar = art.getFile();
             if ( !jar.isFile() )
             {
-                //MNBMODULE-210 with recent CoS changes in netbeans (7.4) jar will be file as we link open projects in the build
-                // via WorkspaceReader. That's fine here, as all we need is to know if project is osgi or nbm module.
+                //MNBMODULE-210 with recent CoS changes in netbeans (7.4) jar will be file as we link open projects in
+                // the build via WorkspaceReader.
+                // That's fine here, as all we need is to know if project is osgi or nbm module.
                 // the nbm file has to be in local repository though.
                 String path = localRepository.pathOf( art );
                 File jar2 = new File( localRepository.getBasedir(), path.replace( "/", File.separator ) );
diff --git a/src/main/java/org/apache/netbeans/nbm/BrandingMojo.java b/src/main/java/org/apache/netbeans/nbm/BrandingMojo.java
index 949cff8..3fc7a83 100644
--- a/src/main/java/org/apache/netbeans/nbm/BrandingMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/BrandingMojo.java
@@ -171,7 +171,8 @@
                     // jars should be placed in locales/ under the same directory the jar-directories are
                     File destinationJar
                             = new File( destinationLocation + File.separator + "locale"
-                                    + File.separator + destinationFileName( jarDirectory.getName(), effectiveBranding ) );
+                                    + File.separator
+                                    + destinationFileName( jarDirectory.getName(), effectiveBranding ) );
 
                     // create nnn.jar archive of contents
                     JarArchiver archiver = new JarArchiver();
@@ -190,7 +191,7 @@
 
     static String destinationFileName( String brandingFilePath, String branding )
     {
-        // use first underscore in filename 
+        // use first underscore in filename
         int lastSeparator = brandingFilePath.lastIndexOf( File.separator );
         String infix = "_" + branding;
 
diff --git a/src/main/java/org/apache/netbeans/nbm/BuildInstallersMojo.java b/src/main/java/org/apache/netbeans/nbm/BuildInstallersMojo.java
index b7864aa..672182f 100644
--- a/src/main/java/org/apache/netbeans/nbm/BuildInstallersMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/BuildInstallersMojo.java
@@ -239,7 +239,8 @@
         {
             getLog().info( String.format( "License file is at %1s, exist = %2$s", installerLicenseFile,
                     installerLicenseFile.exists() ) );
-            props.put( "nbi.license.file", installerLicenseFile.getAbsolutePath() ); //mkleint: no path replacement here??
+            //mkleint: no path replacement here??
+            props.put( "nbi.license.file", installerLicenseFile.getAbsolutePath() );
         }
 
         List<String> platforms = new ArrayList<String>();
@@ -287,7 +288,8 @@
         props.put( "generate.installer.for.platforms", sb.toString() );
 
         File javaHome = new File( System.getProperty( "java.home" ) );
-        if ( new File( javaHome, "lib/rt.jar" ).exists() && javaHome.getName().equals( "jre" ) ) //mkleint: does this work on mac? no rt.jar there
+        //mkleint: does this work on mac? no rt.jar there
+        if ( new File( javaHome, "lib/rt.jar" ).exists() && javaHome.getName().equals( "jre" ) )
         {
             javaHome = javaHome.getParentFile();
         }
diff --git a/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java b/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java
index f378763..68f7cbd 100644
--- a/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java
@@ -218,7 +218,8 @@
             Set<String> osgiImports = new HashSet<>( MAP_INITIALSIZE );
             Map<String, Set<String>> osgiImportsBacktraces = new HashMap<>( MAP_INITIALSIZE );
             Set<String> osgiExports = new HashSet<>( MAP_INITIALSIZE );
-            Set<String> osgiExportsSubs = new HashSet<>( MAP_INITIALSIZE ); //a way to deal with nb module declaring xxx.** (subpackages) declaration that is consumed by osgi imports
+            //a way to deal with nb module declaring xxx.** (subpackages) declaration that is consumed by osgi imports
+            Set<String> osgiExportsSubs = new HashSet<>( MAP_INITIALSIZE );
 
             List<BundleTuple> bundles = new ArrayList<>();
 
@@ -350,10 +351,11 @@
                                         }
                                     }
 
-                                    //TODO examine netbeans/config/Modules to see if the module is autoload/eager
+                                    // TODO examine netbeans/config/Modules to see if the module is autoload/eager
                                     // in verifyIntegrity these could be handled more gracefully than regular modules.
-                                    //eager is simpler, does not need to have module dependencies satisfied.
-                                    //autoload needs checking if any of the other modules declares a dependency on it. if not, also safe to ignore?
+                                    // eager is simpler, does not need to have module dependencies satisfied.
+                                    // autoload needs checking if any of the other modules declares a dependency on it.
+                                    // if not, also safe to ignore?
                                     // now figure which one of the jars is the module jar..
                                     if ( part.matches( "(modules|core|lib)/[^/]+[.]jar" ) )
                                     {
@@ -412,7 +414,8 @@
                                 }
                             }
                             if ( classPath != null )
-                            { //MNBMODULE-220 collect wrappedbundleCNBs, later useful in assignClustersToBundles(), these get removed from list of bundles.
+                            { // MNBMODULE-220 collect wrappedbundleCNBs, later useful in assignClustersToBundles(),
+                              // these get removed from list of bundles.
                                 String[] paths = StringUtils.split( classPath, " " );
                                 for ( String path : paths )
                                 {
@@ -447,8 +450,8 @@
                                         if ( art.getId().contains( groupIdPrefix
                                                 + ".modules:org-netbeans-modules-maven-embedder" ) )
                                         {
-                                            // in this case we dont want module-maven-embedder to be considered as wrapper for his libs                                                     
-                                            // guava is provided but ide have it also 
+                                            // in this case we dont want module-maven-embedder to be considered as
+                                            // wrapper for his libs guava is provided but ide have it also
                                         }
                                         else
                                         {
@@ -564,7 +567,8 @@
                     if ( !dependencyCNBs.isEmpty() )
                     {
                         getLog().error(
-                                "Some included modules/bundles depend on these codenamebases but they are not included. The application will fail starting up. The missing codenamebases are:" );
+                                "Some included modules/bundles depend on these codenamebases but they are not included."
+                                + " The application will fail starting up. The missing codenamebases are:" );
                         for ( String s : dependencyCNBs )
                         {
                             Set<String> back = dependencyCNBBacktraces.get( s );
@@ -575,7 +579,8 @@
                     if ( !osgiImports.isEmpty() )
                     {
                         getLog().error(
-                                "Some OSGi imports are not satisfied by included bundles' exports. The application will fail starting up. The missing imports are:" );
+                                "Some OSGi imports are not satisfied by included bundles' exports. "
+                                + "The application will fail starting up. The missing imports are:" );
                         for ( String s : osgiImports )
                         {
                             Set<String> back = osgiImportsBacktraces.get( s );
@@ -586,7 +591,8 @@
                     if ( !requireTokens.isEmpty() )
                     {
                         getLog().error(
-                                "Some tokens required by included modules are not provided by included modules. The application will fail starting up. The missing tokens are:" );
+                                "Some tokens required by included modules are not provided by included modules. "
+                                + "The application will fail starting up. The missing tokens are:" );
                         for ( String s : requireTokens )
                         {
                             Set<String> back = requireTokensBacktraces.get( s );
@@ -595,7 +601,10 @@
                         }
                     }
                     throw new MojoFailureException(
-                            "See above for consistency validation check failures. Either fix those by adding the relevant dependencies to the application or disable the check by setting the verifyIntegrity parameter to false or by running with -Dnetbeans.verify.integrity=false cmd line parameter." );
+                            "See above for consistency validation check failures. "
+                            + " Either fix those by adding the relevant dependencies to the application or "
+                            + "disable the check by setting the verifyIntegrity parameter to false or by running with "
+                            + "-Dnetbeans.verify.integrity=false cmd line parameter." );
                 }
                 else
                 {
@@ -608,7 +617,8 @@
             }
 
             //attempt to sort clusters based on the dependencies and cluster content.
-            Map<String, Set<String>> cluster2depClusters = computeClusterOrdering( clusterDependencies, clusterModules );
+            Map<String, Set<String>> cluster2depClusters =
+                    computeClusterOrdering( clusterDependencies, clusterModules );
             clusterModules.clear();
 
             //now assign the cluster to bundles based on dependencies..
@@ -638,7 +648,8 @@
                     updateTracking.mkdirs();
                     final String cnb = ex.getModule();
                     final String cnbDashed = cnb.replace( ".", "-" );
-                    final File moduleArt = new File( modules, cnbDashed + ".jar" ); //do we need the file in some canotical name pattern?
+                    //do we need the file in some canotical name pattern in moduleArt?
+                    final File moduleArt = new File( modules, cnbDashed + ".jar" );
                     final String specVer = ex.getSpecVersion();
                     try
                     {
@@ -850,7 +861,7 @@
             try ( ZipFile zip = new ZipFile( nbm ) )
             {
                 getLog().debug(
-                        "Using fallback executables from downloaded org-netbeans-modules-apisupport-harness nbm file." );
+                       "Using fallback executables from downloaded org-netbeans-modules-apisupport-harness nbm file." );
                 writeFromZip( zip, "netbeans/launchers/app.sh", destSh, true );
                 writeFromZip( zip, "netbeans/launchers/app.exe", destExe, true );
                 writeFromZip( zip, "netbeans/launchers/app64.exe", destExe64, false );
@@ -1047,14 +1058,16 @@
             if ( ( groupIdPrefix + ".modules" ).equals( a.getGroupId() ) && "org-netbeans-bootstrap".equals( a.
                     getArtifactId() ) )
             {
-                version = a.getBaseVersion(); //base version in non-snapshot should equals version, in snapshots to X-SNAPSHOT, not timestamp
+                 //base version in non-snapshot should equals version, in snapshots to X-SNAPSHOT, not timestamp
+                version = a.getBaseVersion();
                 break;
             }
         }
         if ( version == null )
         {
             throw new MojoExecutionException(
-                    "We could not find org-netbeans-bootstrap among the modules in the application. Launchers could not be found." );
+                    "We could not find org-netbeans-bootstrap among the modules in the application. "
+                    + "Launchers could not be found." );
         }
         Artifact nbmArt = artifactFactory.createArtifact(
                 groupIdPrefix + ".modules",
@@ -1126,13 +1139,19 @@
     }
 
     //the basic idea is that bundle's cluster can be determined by who depends on it.
-    //simplest case is when a module depends on it. If there are more, we need to pick one that is "lower in the stack, that's what cluster2depClusters is for.
+    //simplest case is when a module depends on it. If there are more, we need to pick one that is "lower in the stack,
+    //that's what cluster2depClusters is for.
     //the rest needs to be determined in more sofisticated manner.
-    //start from bundles with known cluster and see what other bundles they depend on. stamp all these with the same cluster. do it recursively.
-    //At the end process the remaining bundles in reverse order. Check if *they* depend on a bundle with known cluster and so on..
+    //start from bundles with known cluster and see what other bundles they depend on.
+    //stamp all these with the same cluster. do it recursively.
+    //At the end process the remaining bundles in reverse order.
+    //Check if *they* depend on a bundle with known cluster and so on..
     //A few unsolved cases:
-    // - we never update the cluster information once a match was found, but there is a possibility that later in the processing the cluster could be "lowered".
-    // - 2 or more modules from unrelated clusters we cannot easily decide, most likely should be in common denominator cluster but our cluster2depClusters map is not transitive, only lists direct dependencies
+    // - we never update the cluster information once a match was found,
+    //   but there is a possibility that later in the processing the cluster could be "lowered".
+    // - 2 or more modules from unrelated clusters we cannot easily decide,
+    //   most likely should be in common denominator cluster but our cluster2depClusters map is not transitive,
+    //   only lists direct dependencies
     static void assignClustersToBundles( List<BundleTuple> bundles, Set<String> wrappedBundleCNBs,
                                          Map<String, Set<String>> clusterDependencies,
                                          Map<String, Set<String>> cluster2depClusters, Log log )
@@ -1189,7 +1208,9 @@
                         it2.remove();
                     }
                 }
-                ent.cluster = depclusters.get( 0 ); //TODO still some free room there, what if they don't directly depend on each other but still are related
+                //TODO still some free room there,
+                //what if they don't directly depend on each other but still are related
+                ent.cluster = depclusters.get( 0 );
                 known.add( ent );
             }
         }
@@ -1369,7 +1390,7 @@
                 + "        <file crc=\"" + crcForFile( moduleConf ).getValue() + "\" name=\"config/Modules/" + cnb.
                 replace( ".", "-" ) + ".xml\"/>\n"
                 + "        <file crc=\"" + crcForFile( moduleArt ).getValue() + "\" name=\"modules/" + cnb.replace( ".",
-                                                                                                                    "-" )
+                                                                                                                   "-" )
                 + ".jar\"/>\n"
                 + "    </module_version>\n"
                 + "</module>";
diff --git a/src/main/java/org/apache/netbeans/nbm/CreateClusterMojo.java b/src/main/java/org/apache/netbeans/nbm/CreateClusterMojo.java
index fcacd66..fb14998 100644
--- a/src/main/java/org/apache/netbeans/nbm/CreateClusterMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/CreateClusterMojo.java
@@ -120,7 +120,8 @@
                                 = "The NetBeans binary directory structure for "
                                 + proj.getId()
                                 + " is not created yet."
-                                + "\n Please execute 'mvn install nbm:cluster' to build all relevant projects in the reactor.";
+                                + "\n Please execute 'mvn install nbm:cluster' "
+                                + "to build all relevant projects in the reactor.";
                         throw new MojoFailureException( error );
                     }
                     if ( "bundle".equals( proj.getPackaging() ) )
@@ -150,7 +151,8 @@
 
                         final String cnb = mnf.getModule();
                         final String cnbDashed = cnb.replace( ".", "-" );
-                        final File moduleArt = new File( modules, cnbDashed + ".jar" ); //do we need the file in some canotical name pattern?
+                        //do we need the file in some canotical name pattern for moduleArt?
+                        final File moduleArt = new File( modules, cnbDashed + ".jar" );
                         final String specVer = mnf.getSpecVersion();
                         try
                         {
diff --git a/src/main/java/org/apache/netbeans/nbm/CreateNbmMojo.java b/src/main/java/org/apache/netbeans/nbm/CreateNbmMojo.java
index 45fe227..72fb049 100644
--- a/src/main/java/org/apache/netbeans/nbm/CreateNbmMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/CreateNbmMojo.java
@@ -244,15 +244,15 @@
         if ( module.getLicenseName() != null )
         {
             licName = module.getLicenseName();
-            getLog().
-                    warn( "Module descriptor's licenseName field is deprecated, use plugin's configuration in pom.xml" );
+            getLog().warn(
+                    "Module descriptor's licenseName field is deprecated, use plugin's configuration in pom.xml" );
         }
         if ( module.getLicenseFile() != null )
         {
             File lf = new File( project.getBasedir(), module.getLicenseFile() );
             licFile = lf;
-            getLog().
-                    warn( "Module descriptor's licenseFile field is deprecated, use plugin's configuration in pom.xml" );
+            getLog().warn(
+                    "Module descriptor's licenseFile field is deprecated, use plugin's configuration in pom.xml" );
 
         }
         if ( licName != null && licFile != null )
@@ -282,8 +282,8 @@
         String hpUrl = homePageUrl;
         if ( module.getHomepageUrl() != null )
         {
-            getLog().
-                    warn( "Module descriptor's homePageUrl field is deprecated, use plugin's configuration in pom.xml" );
+            getLog().warn(
+                    "Module descriptor's homePageUrl field is deprecated, use plugin's configuration in pom.xml" );
             hpUrl = module.getHomepageUrl();
         }
         if ( hpUrl != null )
diff --git a/src/main/java/org/apache/netbeans/nbm/CreateNetBeansFileStructure.java b/src/main/java/org/apache/netbeans/nbm/CreateNetBeansFileStructure.java
index 9a3d230..35ffa20 100644
--- a/src/main/java/org/apache/netbeans/nbm/CreateNetBeansFileStructure.java
+++ b/src/main/java/org/apache/netbeans/nbm/CreateNetBeansFileStructure.java
@@ -286,7 +286,7 @@
 
         try ( JarInputStream jis = new JarInputStream( Files.newInputStream( jarFile.toPath() ) ) )
         {
-            Manifest m = jis.getManifest();               
+            Manifest m = jis.getManifest();
             Attributes a = m.getMainAttributes();
             String classPath = ( String ) a.remove( new Attributes.Name( "X-Class-Path" ) );
 
@@ -297,8 +297,10 @@
                 a.putValue( "Class-Path", classPath );
                 a.remove( new Attributes.Name( "Maven-Class-Path" ) );
 
-                try (FileSystem fs = FileSystems.newFileSystem(moduleFile.toPath(), (ClassLoader) null))                {
-                    try ( BufferedOutputStream mfWriter = new BufferedOutputStream( Files.newOutputStream( fs.getPath( JarFile.MANIFEST_NAME ) ) ) )
+                try ( FileSystem fs = FileSystems.newFileSystem( moduleFile.toPath(), ( ClassLoader ) null ) )
+                {
+                    try ( BufferedOutputStream mfWriter =
+                            new BufferedOutputStream( Files.newOutputStream( fs.getPath( JarFile.MANIFEST_NAME ) ) ) )
                     {
                         m.write( mfWriter );
                     }
@@ -317,7 +319,7 @@
         {
             throw new MojoExecutionException( "Could not read manifest of module JAR", x );
         }
-        
+
         ExamineManifest modExaminator = new ExamineManifest( getLog() );
         modExaminator.setJarFile( moduleFile );
         modExaminator.checkFile();
@@ -349,7 +351,9 @@
                         {
                             String name = target.getName();
                             getLog().info( "Using *.external replacement for " + name );
-                            try (PrintWriter external = new PrintWriter(new File(targetDir, name + ".external"), "UTF-8")) {
+                            try ( PrintWriter external =
+                                    new PrintWriter( new File( targetDir, name + ".external" ), "UTF-8" ) )
+                            {
                                 writeExternal( external, artifact );
                             }
                         }
@@ -473,8 +477,8 @@
         List<NbmResource> ress = module.getNbmResources();
         if ( ress.size() > 0 )
         {
-            getLog().warn(
-                    "NBM resources defined in module descriptor are deprecated. Please configure NBM resources in plugin configuration." );
+            getLog().warn( "NBM resources defined in module descriptor are deprecated. "
+                          + "Please configure NBM resources in plugin configuration." );
             Copy cp = (Copy) antProject.createTask( "copy" );
             cp.setTodir( clusterDir );
             HashMap<File, Collection<FileSet>> customPaths = new HashMap<>();
@@ -565,7 +569,10 @@
             fld.setAccessible( true );
             fld.set( null, null );
 
-        } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException | ClassNotFoundException ex) {
+        }
+        catch ( IllegalArgumentException | IllegalAccessException | NoSuchFieldException
+              | SecurityException | ClassNotFoundException ex )
+        {
             Logger.getLogger( CreateNetBeansFileStructure.class.getName() ).log( Level.SEVERE, null, ex );
         }
     }
diff --git a/src/main/java/org/apache/netbeans/nbm/CreateWebstartAppMojo.java b/src/main/java/org/apache/netbeans/nbm/CreateWebstartAppMojo.java
index 2fa3cb9..3e0e4fc 100644
--- a/src/main/java/org/apache/netbeans/nbm/CreateWebstartAppMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/CreateWebstartAppMojo.java
@@ -204,7 +204,8 @@
         Project antProject = antProject();
 
         getLog().warn(
-                "WARNING: Unsigned and self-signed WebStart applications are deprecated from JDK7u21 onwards. To ensure future correct functionality please use trusted certificate." );
+                "WARNING: Unsigned and self-signed WebStart applications are deprecated from JDK7u21 onwards. "
+                + "To ensure future correct functionality please use trusted certificate." );
 
         if ( keystore != null && keystorealias != null && keystorepassword != null )
         {
@@ -220,8 +221,8 @@
         }
         else if ( keystore != null || keystorepassword != null || keystorealias != null )
         {
-            throw new MojoFailureException(
-                    "If you want to sign the jnlp application, you need to define all three keystore related parameters." );
+            throw new MojoFailureException( "If you want to sign the jnlp application, "
+                                           + "you need to define all three keystore related parameters." );
         }
         else
         {
@@ -718,13 +719,13 @@
             {
                 continue;
             }
+
+            int slash = codenamebase.indexOf( '/' );
+            if ( slash >= 0 )
             {
-                int slash = codenamebase.indexOf( '/' );
-                if ( slash >= 0 )
-                {
-                    codenamebase = codenamebase.substring( 0, slash );
-                }
+                codenamebase = codenamebase.substring( 0, slash );
             }
+
             String dashcnb = codenamebase.replace( '.', '-' );
 
             buff.append( "    <extension name='" ).append( codenamebase ).append( "' href='" ).append( masterPrefix ).
diff --git a/src/main/java/org/apache/netbeans/nbm/NetBeansManifestUpdateMojo.java b/src/main/java/org/apache/netbeans/nbm/NetBeansManifestUpdateMojo.java
index 200da93..b826a7b 100644
--- a/src/main/java/org/apache/netbeans/nbm/NetBeansManifestUpdateMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/NetBeansManifestUpdateMojo.java
@@ -141,7 +141,8 @@
      *
      * @since 3.0
      */
-    @Parameter( required = true, readonly = true, defaultValue = "${project.build.outputDirectory}/META-INF/MANIFEST.MF" )
+    @Parameter( required = true, readonly = true,
+                defaultValue = "${project.build.outputDirectory}/META-INF/MANIFEST.MF" )
     private File targetManifestFile;
 
     /**
@@ -242,8 +243,8 @@
      * 3.11</p>
      *
      * For details, see
-     * <a href="http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#enablement">Netbeans
-     * Module system docs</a>
+     * <a href="http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#enablement">
+     * Netbeans Module system docs</a>
      *
      * Since 3.14, for autoload and eager modules, we automatically set AutoUpdate-Show-In-Client manifest entry to
      * false, if not defined already otherwise in the manifest. See issue
@@ -287,7 +288,7 @@
     private DependencyGraphBuilder dependencyGraphBuilder;
 
 // end of component params custom code folding
-// </editor-fold> 
+// </editor-fold>
     /**
      * execute plugin
      *
@@ -739,7 +740,9 @@
                                 "Project uses classes from transitive " + module + " " + wr.artifact.getId()
                                 + " which will not be accessible at runtime." );
                         getLog().info(
-                                "    To fix the problem, add this module as direct dependency. For OSGi bundles that are supposed to be wrapped in NetBeans modules, use the useOSGiDependencies=false parameter" );
+                                "To fix the problem, add this module as direct dependency. "
+                                + "For OSGi bundles that are supposed to be wrapped in NetBeans modules, "
+                                + "use the useOSGiDependencies=false parameter" );
                         deps.removeAll( classes[0] );
                     }
                     classes[1].retainAll( deps );
@@ -770,7 +773,10 @@
                 if ( !deps.isEmpty() )
                 {
                     throw new MojoFailureException(
-                            "Uncategorized problems with NetBeans dependency verification (maybe MNBMODULE-102 or wrong maven dependency metadata). Supposedly external classes are used in the project's binaries but the classes are not found on classpath. Class usages: "
+                            "Uncategorized problems with NetBeans dependency verification "
+                            + "(maybe MNBMODULE-102 or wrong maven dependency metadata). "
+                            + "Supposedly external classes are used in the project's binaries "
+                            + "but the classes are not found on classpath. Class usages: "
                             + deps );
                 }
                 else
diff --git a/src/main/java/org/apache/netbeans/nbm/RunNetBeansMojo.java b/src/main/java/org/apache/netbeans/nbm/RunNetBeansMojo.java
index 0fa1cd4..4af1292 100644
--- a/src/main/java/org/apache/netbeans/nbm/RunNetBeansMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/RunNetBeansMojo.java
@@ -98,7 +98,8 @@
         if ( !clusterBuildDir.exists() || clusterBuildDir.listFiles() == null )
         {
             throw new MojoExecutionException(
-                    "No clusters to include in execution found. Please run the nbm:cluster or nbm:cluster-app goals before this one." );
+                    "No clusters to include in execution found. "
+                    + "Please run the nbm:cluster or nbm:cluster-app goals before this one." );
         }
         File[] fls = clusterBuildDir.listFiles();
         for ( int i = 0; i < fls.length; i++ )
@@ -206,8 +207,8 @@
                 String jdkHome = System.getenv( "JAVA_HOME" );
                 if ( jdkHome != null )
                 {
-                    if ( new File( jdkHome, "jre\\lib\\amd64\\jvm.cfg" ).exists() ||
-                            new File( jdkHome, "bin\\windowsaccessbridge-64.dll" ).exists() )
+                    if ( new File( jdkHome, "jre\\lib\\amd64\\jvm.cfg" ).exists()
+                         || new File( jdkHome, "bin\\windowsaccessbridge-64.dll" ).exists() )
                     {
                         File exec64 = new File( netbeansInstallation, "bin\\" + appName + "64.exe" );
                         if ( exec64.isFile() )
@@ -268,7 +269,8 @@
     {
         if ( "true".equals( debugAdditionalArguments ) )
         {
-            return "-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005";
+            return "-Xdebug -Xnoagent -Djava.compiler=NONE "
+                   + "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005";
         }
         return debugAdditionalArguments;
     }
diff --git a/src/main/java/org/apache/netbeans/nbm/RunPlatformAppMojo.java b/src/main/java/org/apache/netbeans/nbm/RunPlatformAppMojo.java
index e73e068..749fa52 100644
--- a/src/main/java/org/apache/netbeans/nbm/RunPlatformAppMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/RunPlatformAppMojo.java
@@ -97,7 +97,8 @@
         if ( !"nbm-application".equals( project.getPackaging() ) )
         {
             throw new MojoFailureException(
-                    "The nbm:run-platform goal shall be used within a NetBeans Application project only ('nbm-application' packaging)" );
+                    "The nbm:run-platform goal shall be used within a NetBeans Application project only "
+                    + "('nbm-application' packaging)" );
         }
 
         netbeansUserdir.mkdirs();
@@ -198,7 +199,8 @@
     {
         if ( "true".equals( debugAdditionalArguments ) )
         {
-            return "-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005";
+            return "-Xdebug -Xnoagent -Djava.compiler=NONE "
+                   + "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005";
         }
         return debugAdditionalArguments;
     }