You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2019/06/04 09:27:42 UTC

[netbeans-mavenutils-nb-repository-plugin] branch master updated (c9a4d59 -> 1659a7b)

This is an automated email from the ASF dual-hosted git repository.

skygo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nb-repository-plugin.git.


    from c9a4d59  fix scm
     new 65c69d0  make more checkstyle compatible
     new 1659a7b  use groupid, and release material

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            |  4 +-
 src/it/folder/pom.xml                              |  4 +-
 src/it/pom.xml                                     |  2 +-
 .../netbeans/nbm/repository/DownloadIndexMojo.java | 83 ++++++++++++----------
 .../nbm/repository/PopulateRepositoryMojo.java     | 81 ++++++++++++---------
 .../nbm/repository/PopulateRepositoryMojoTest.java |  4 +-
 6 files changed, 97 insertions(+), 81 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-mavenutils-nb-repository-plugin] 02/02: use groupid, and release material

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nb-repository-plugin.git

commit 1659a7b5bb6eb46cf3f796bdbea3cdcbbcdeffa8
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Tue Jun 4 11:27:28 2019 +0200

    use groupid, and release material
---
 pom.xml               | 4 ++--
 src/it/folder/pom.xml | 4 ++--
 src/it/pom.xml        | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index cdd3c93..19c2e2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,7 +271,7 @@ under the License.
                                 <goal>install</goal>
                             </goals>
                             <filterProperties>
-                                <netbeans.version>RELEASE82</netbeans.version> 
+                                <netbeans.version>RELEASE110</netbeans.version> 
                             </filterProperties>
                         </configuration>
                         <executions>
@@ -385,7 +385,7 @@ under the License.
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>nb-shared</artifactId>
-            <version>1.3-SNAPSHOT</version>
+            <version>1.3</version>
         </dependency>
         <dependency>
             <groupId>org.apache.maven.wagon</groupId>
diff --git a/src/it/folder/pom.xml b/src/it/folder/pom.xml
index 52bf830..6013933 100644
--- a/src/it/folder/pom.xml
+++ b/src/it/folder/pom.xml
@@ -18,7 +18,7 @@ under the License.
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.codehaus.mojo</groupId>
+        <groupId>org.apache.netbeans.utilities</groupId>
         <artifactId>nb-repository-plugin-it-root</artifactId>
         <version>1.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
@@ -37,7 +37,7 @@ under the License.
                         </goals>
                         <configuration>
                             <nexusIndexDirectory>${project.build.directory}/indextest</nexusIndexDirectory>
-                            <repositoryUrl>http://repo1.maven.org/maven2</repositoryUrl>
+                            <repositoryUrl>https://repo1.maven.org/maven2</repositoryUrl>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/src/it/pom.xml b/src/it/pom.xml
index 84b1664..fd5d5d2 100644
--- a/src/it/pom.xml
+++ b/src/it/pom.xml
@@ -17,7 +17,7 @@ under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.codehaus.mojo</groupId>
+    <groupId>org.apache.netbeans.utilities</groupId>
     <artifactId>nb-repository-plugin-it-root</artifactId>
     <version>1.0-SNAPSHOT</version>
     <packaging>pom</packaging>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-mavenutils-nb-repository-plugin] 01/02: make more checkstyle compatible

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nb-repository-plugin.git

commit 65c69d00144578919a6844f57d717216d55b88f4
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Tue Jun 4 11:26:57 2019 +0200

    make more checkstyle compatible
---
 .../netbeans/nbm/repository/DownloadIndexMojo.java | 83 ++++++++++++----------
 .../nbm/repository/PopulateRepositoryMojo.java     | 81 ++++++++++++---------
 .../nbm/repository/PopulateRepositoryMojoTest.java |  4 +-
 3 files changed, 92 insertions(+), 76 deletions(-)

diff --git a/src/main/java/org/apache/netbeans/nbm/repository/DownloadIndexMojo.java b/src/main/java/org/apache/netbeans/nbm/repository/DownloadIndexMojo.java
index e74d2b3..e2c9eff 100644
--- a/src/main/java/org/apache/netbeans/nbm/repository/DownloadIndexMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/repository/DownloadIndexMojo.java
@@ -1,3 +1,5 @@
+package org.apache.netbeans.nbm.repository;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.netbeans.nbm.repository;
-
 import java.io.File;
 import java.net.URI;
 import java.util.ArrayList;
@@ -50,70 +50,73 @@ import org.codehaus.plexus.context.ContextException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 
 /**
- * Goal for retrieving and expanding the lucene index of the given repository. That in turn is used by the <code>populate</code>
- * goal.
+ * Goal for retrieving and expanding the lucene index of the given repository. 
+ * That in turn is used by the <code>populate</code> goal.
  * @author Milos Kleint
  */
-@Mojo(name="download", aggregator=true, requiresProject=false)
-public class DownloadIndexMojo extends AbstractMojo implements Contextualizable {
-    
+@Mojo( name = "download", aggregator = true, requiresProject = false )
+public class DownloadIndexMojo extends AbstractMojo implements Contextualizable 
+{
+
     /**
      * url of the repository to download index from. Please note that if you already have
      * an existing index at <code>nexusIndexDirectory</code>, you should always use the same url for that directory.
      */
-    @Parameter(required=true, property="repositoryUrl")
+    @Parameter( required = true, property = "repositoryUrl" )
     private String repositoryUrl;
-    
+
     /**
-     * location on disk where the index should be created. either empty or with existing index from same repository. then only update check will
-     * be performed.
+     * location on disk where the index should be created. either empty or with existing index from same repository. 
+     * Then only update check will be performed.
      */
-    @Parameter(required=true, property="nexusIndexDirectory")
+    @Parameter( required = true, property = "nexusIndexDirectory" )
     private File nexusIndexDirectory;
  
     @Component
     IndexUpdater remoteIndexUpdater;
-    
+
     @Component
     NexusIndexer indexer;
-    
+
     PlexusContainer container;
-    
-    
+
+
     @Component
     WagonManager wagonManager;
-    
+
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException
     {
-        try        
+        try
         {
             List<IndexCreator> creators = new ArrayList<IndexCreator>();
-            creators.addAll(container.lookupList(IndexCreator.class));
-            String indexurl = repositoryUrl + (!repositoryUrl.endsWith( "/") ? "/" : "") + ".index";
+            creators.addAll( container.lookupList( IndexCreator.class ) );
+            String indexurl = repositoryUrl + ( !repositoryUrl.endsWith( "/" ) ? "/" : "" ) + ".index";
             IndexingContext indexingContext = indexer.addIndexingContextForced(
                                     "central", // context id
                                     "central", // repository id
                                     null, // repository folder
                                     nexusIndexDirectory,
-                                    repositoryUrl,// repositoryUrl
+                                    repositoryUrl, // repositoryUrl
                                     indexurl,
-                                    creators);
+                                    creators );
 
-            String protocol = URI.create(repositoryUrl).getScheme();
+            String protocol = URI.create( repositoryUrl ).getScheme();
             ProxyInfo wagonProxy = wagonManager.getProxy( protocol );
-            TransferListener tr = new TransferListener() {
+            TransferListener tr = new TransferListener() 
+            {
 
                 @Override
                 public void transferInitiated( TransferEvent transferEvent )
                 {
-                    getLog().info( "Initiated connection to " + repositoryUrl);
+                    getLog().info( "Initiated connection to " + repositoryUrl );
                 }
 
                 @Override
                 public void transferStarted( TransferEvent transferEvent )
                 {
-                    getLog().info( "Started transfer of " + repositoryUrl + "/.index/" + transferEvent.getResource().toString());
+                    getLog().info( "Started transfer of " + repositoryUrl + "/.index/" 
+                            + transferEvent.getResource().toString() );
                 }
 
                 @Override
@@ -124,13 +127,15 @@ public class DownloadIndexMojo extends AbstractMojo implements Contextualizable
                 @Override
                 public void transferCompleted( TransferEvent transferEvent )
                 {
-                    getLog().info( "Finished transfer of " + repositoryUrl + "/.index/" + transferEvent.getResource().toString());
+                    getLog().info( "Finished transfer of " + repositoryUrl + "/.index/" 
+                            + transferEvent.getResource().toString() );
                 }
 
                 @Override
                 public void transferError( TransferEvent transferEvent )
                 {
-                    getLog().error( "Failed transfer of " + repositoryUrl + "/.index/" + transferEvent.getResource().toString(), transferEvent.getException());
+                    getLog().error( "Failed transfer of " + repositoryUrl + "/.index/" 
+                            + transferEvent.getResource().toString(), transferEvent.getException() );
                 }
 
                 @Override
@@ -139,32 +144,32 @@ public class DownloadIndexMojo extends AbstractMojo implements Contextualizable
                 }
             };
             // MINDEXER-42: cannot use WagonHelper.getWagonResourceFetcher
-            Wagon wagon = container.lookup(Wagon.class, protocol);
-            if (wagon instanceof HttpWagon) { //#216401
+            Wagon wagon = container.lookup( Wagon.class, protocol );
+            if ( wagon instanceof HttpWagon ) 
+            { //#216401
                 HttpWagon httpwagon = (HttpWagon) wagon;
                 //#215343
                 Properties p = new Properties();
-                p.setProperty("User-Agent", "mojo/nb-repository-plugin");
-                httpwagon.setHttpHeaders(p);
+                p.setProperty( "User-Agent", "mojo/nb-repository-plugin" );
+                httpwagon.setHttpHeaders( p );
             }
 
-            ResourceFetcher fetcher = new WagonHelper.WagonFetcher(wagon, tr, null, wagonProxy);
-            IndexUpdateRequest iur = new IndexUpdateRequest(indexingContext, fetcher);
+            ResourceFetcher fetcher = new WagonHelper.WagonFetcher( wagon, tr, null, wagonProxy );
+            IndexUpdateRequest iur = new IndexUpdateRequest( indexingContext, fetcher );
 
-            remoteIndexUpdater.fetchAndUpdateIndex(iur);
-            indexer.removeIndexingContext(indexingContext, false);
+            remoteIndexUpdater.fetchAndUpdateIndex( iur );
+            indexer.removeIndexingContext( indexingContext, false );
         }
         catch ( Exception ex )
         {
-            throw new MojoExecutionException( "Cannot download index", ex);
+            throw new MojoExecutionException( "Cannot download index", ex );
         }
     }
 
     @Override
     public void contextualize( Context context ) throws ContextException
     {
-        this.container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+        this.container = ( PlexusContainer ) context.get( PlexusConstants.PLEXUS_KEY );
     }
 
-    
 }
diff --git a/src/main/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojo.java b/src/main/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojo.java
index df4c1c5..d193031 100644
--- a/src/main/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojo.java
+++ b/src/main/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojo.java
@@ -1,3 +1,5 @@
+package org.apache.netbeans.nbm.repository;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.netbeans.nbm.repository;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -106,7 +106,7 @@ import org.codehaus.plexus.util.StringUtils;
  *
  * @author Milos Kleint
  */
-@Mojo(name="populate", aggregator=true, requiresProject=false)
+@Mojo( name = "populate", aggregator = true, requiresProject = false )
 public class PopulateRepositoryMojo
     extends AbstractNetbeansMojo
 {
@@ -121,14 +121,14 @@ public class PopulateRepositoryMojo
      * eg. for org.netbeans value will generate org.netbeans.cluster groupId for clusters and org.netbeans.modules for module artifacts.
      * @since 1.2
      */
-    @Parameter(property="groupIdPrefix", defaultValue = "org.netbeans")
+    @Parameter( property = "groupIdPrefix", defaultValue = "org.netbeans" )
     private String groupIdPrefix;
     
     /**
      * an url where to deploy the NetBeans artifacts. Optional, if not specified, the artifacts will be only installed
      * in local repository, if you need to give credentials to access remote repo, the id of the server is hardwired to "netbeans".
      */
-    @Parameter(property="deployUrl")
+    @Parameter( property = "deployUrl" )
     private String deployUrl;
 
     /**
@@ -137,14 +137,14 @@ public class PopulateRepositoryMojo
      * a defined "deployUrl" parameter.
      * @since 3.0
      */
-    @Parameter(defaultValue="false", property="skipInstall")
+    @Parameter( defaultValue = "false", property = "skipInstall" )
     private boolean skipLocalInstall;
 
 
     /**
      * Location of NetBeans installation
      */
-    @Parameter(property="netbeansInstallDirectory", required=true)
+    @Parameter( property = "netbeansInstallDirectory", required = true )
     protected File netbeansInstallDirectory;
 
     /**
@@ -152,13 +152,13 @@ public class PopulateRepositoryMojo
      * expand it to a directory, it should contain multiple zip files. Define this parameter as absolute path to the zip files folder.
      *
      */
-    @Parameter(property="netbeansJavadocDirectory")
+    @Parameter( property = "netbeansJavadocDirectory" )
     protected File netbeansJavadocDirectory;
 
     /**
      * Assumes a folder with &lt;code-name-base&gt;.zip files containing sources for modules.
      */
-    @Parameter(property="netbeansSourcesDirectory")
+    @Parameter( property = "netbeansSourcesDirectory" )
     protected File netbeansSourcesDirectory;
 
     /**
@@ -168,7 +168,7 @@ public class PopulateRepositoryMojo
      * Assumes a folder with &lt;code-name-base&gt;.nbm files containing nbm files for modules.
      * @since 3.0
      */
-    @Parameter(property="netbeansNbmDirectory", required=true)
+    @Parameter( property = "netbeansNbmDirectory", required = true )
     protected File netbeansNbmDirectory;
 
     /**
@@ -180,7 +180,7 @@ public class PopulateRepositoryMojo
      * Highly Recommended!
      * </p>
      */
-    @Parameter(property="forcedVersion")
+    @Parameter( property = "forcedVersion" )
     protected String forcedVersion;
 
     /**
@@ -193,7 +193,7 @@ public class PopulateRepositoryMojo
      * Use the {@code download} goal to retrieve the index.
      * @since 3.0
      */
-    @Parameter(property="nexusIndexDirectory")
+    @Parameter( property = "nexusIndexDirectory" )
     private File nexusIndexDirectory;
 
     /**
@@ -201,7 +201,7 @@ public class PopulateRepositoryMojo
      * Only meaningful when {@code forcedVersion} is defined.
      * @since 3.7
      */
-    @Parameter(defaultValue="true", property="defineCluster")   
+    @Parameter( defaultValue = "true", property = "defineCluster" )   
     private boolean defineCluster;
 
     /**
@@ -211,7 +211,7 @@ public class PopulateRepositoryMojo
      * Currently only supported when {@code forcedVersion} is defined.
      * @since 3.7
      */
-    @Parameter(property="dependencyRepositoryUrl")
+    @Parameter( property = "dependencyRepositoryUrl" )
     private String dependencyRepositoryUrl;
 
     /**
@@ -219,7 +219,7 @@ public class PopulateRepositoryMojo
      * Only meaningful when {@code dependencyRepositoryUrl} is defined.
      * @since 3.7
      */
-    @Parameter(defaultValue="temp", property="dependencyRepositoryId")
+    @Parameter( defaultValue = "temp", property = "dependencyRepositoryId" )
     private String dependencyRepositoryId;
 
     /**
@@ -228,14 +228,14 @@ public class PopulateRepositoryMojo
      *
      * @since 1.4
      */
-    @Parameter(property = "parentGAV", required = false)
+    @Parameter( property = "parentGAV", required = false )
     private String parentGAV;
     
     // <editor-fold defaultstate="collapsed" desc="Component parameters">
     /**
      * Local maven repository.
      */
-    @Parameter(required=true, readonly=true, defaultValue="${localRepository}")
+    @Parameter( required = true, readonly = true, defaultValue = "${localRepository}" )
     protected ArtifactRepository localRepository;
 
     /**
@@ -289,12 +289,13 @@ public class PopulateRepositoryMojo
         Project antProject = antProject();
         ArtifactRepository deploymentRepository = null;
 
-        if (parentGAV != null) 
+        if ( parentGAV != null ) 
         {
             // populate artefactParent
             artefactParent = new Parent();
-            String[] split = parentGAV.split(":");
-            if (split.length != 3) {
+            String[] split = parentGAV.split( ":" );
+            if ( split.length != 3 ) 
+            {
                 throw new MojoExecutionException(
                     "parentGAV should respect the following format groupId:artefactId:version" );
             }
@@ -408,7 +409,7 @@ public class PopulateRepositoryMojo
                     artifact = "org-netbeans-core-startup-base";
                 }                
                 String version = forcedVersion == null ? examinator.getSpecVersion() : forcedVersion;
-                String group = groupIdPrefix + (examinator.isOsgiBundle() ? GROUP_EXTERNAL : examinator.hasPublicPackages() ? GROUP_API : GROUP_IMPL);
+                String group = groupIdPrefix + ( examinator.isOsgiBundle() ? GROUP_EXTERNAL : examinator.hasPublicPackages() ? GROUP_API : GROUP_IMPL );
                 Artifact art = createArtifact( artifact, version, group );
                 if ( examinator.isOsgiBundle() )
                 {
@@ -553,8 +554,9 @@ public class PopulateRepositoryMojo
                                             b.append( ' ' );
                                         }
                                         b.append( dep.getGroupId() ).append( ':' ).append( dep.getArtifactId() ).append( ':' ).append( dep.getVersion() );
-                                        if (dep.getClassifier() != null) {
-                                            b.append(":").append(dep.getClassifier());
+                                        if ( dep.getClassifier() != null ) 
+                                        {
+                                            b.append( ":" ).append( dep.getClassifier() );
                                         }
                                     }
                                     mani.getMainAttributes().putValue( "Maven-Class-Path", b.toString() );
@@ -785,7 +787,8 @@ public class PopulateRepositoryMojo
         mavenModel.setVersion( wrapper.getVersion() );
         mavenModel.setPackaging( "jar" );
         mavenModel.setModelVersion( "4.0.0" );
-        if ( artefactParent != null ) {
+        if ( artefactParent != null ) 
+        {
             mavenModel.setParent( artefactParent );
         }
         ExamineManifest man = wrapper.getModuleManifest();
@@ -807,7 +810,8 @@ public class PopulateRepositoryMojo
                     dep.setType( "jar" );
                     //we don't want the API modules to depend on non-api ones..
                     // otherwise the transitive dependency mechanism pollutes your classpath..
-                    if ( wrapper.getModuleManifest().hasPublicPackages() && !wr.getModuleManifest().hasPublicPackages() )
+                    if ( wrapper.getModuleManifest().hasPublicPackages() 
+                            && !wr.getModuleManifest().hasPublicPackages() )
                     {
                         dep.setScope( "runtime" );
                     }
@@ -826,10 +830,14 @@ public class PopulateRepositoryMojo
                     dep.setVersion( forcedVersion );
                     ArtifactRepositoryPolicy policy = new ArtifactRepositoryPolicy();
                     List<ArtifactRepository> repos = Collections.singletonList(
-                            repositoryFactory.createArtifactRepository( dependencyRepositoryId, dependencyRepositoryUrl, artifactRepositoryLayout, policy, policy) );
+                            repositoryFactory.createArtifactRepository( 
+                                    dependencyRepositoryId, dependencyRepositoryUrl, artifactRepositoryLayout, policy, policy ) );
                     try
                     {
-                        artifactResolver.resolve( artifactFactory.createBuildArtifact( groupIdPrefix + GROUP_API, artifactId, forcedVersion, "pom" ), repos, localRepository );
+                        artifactResolver.resolve(
+                                artifactFactory.createBuildArtifact( groupIdPrefix + GROUP_API, artifactId, forcedVersion, "pom" ),
+                                repos, 
+                                localRepository );
                         dep.setGroupId( groupIdPrefix + GROUP_API );
                     }
                     catch ( AbstractArtifactResolutionException x )
@@ -958,7 +966,8 @@ public class PopulateRepositoryMojo
         {
             MessageDigest shaDig = MessageDigest.getInstance( "SHA1" );
             InputStream is = new FileInputStream( f );
-            try {
+            try
+            {
                 OutputStream os = new DigestOutputStream( new NullOutputStream(), shaDig );
                 IOUtil.copy( is, os );
                 os.close();
@@ -970,12 +979,12 @@ public class PopulateRepositoryMojo
             String sha = encode( shaDig.digest() );
             TermQuery q = new TermQuery( new Term( "1", sha ) );
             TopScoreDocCollector collector = TopScoreDocCollector.create( 5 );
-            searcher.search(q, collector);
+            searcher.search( q, collector );
             ScoreDoc[] hits = collector.topDocs().scoreDocs;
             if ( hits.length >= 1 )
             {
-                int docId = hits[0].doc;    
-                Document doc = searcher.doc(docId);                
+                int docId = hits[0].doc;
+                Document doc = searcher.doc( docId );
                 IndexableField idField = doc.getField( "u" );
                 if ( idField != null )
                 {
@@ -1019,7 +1028,8 @@ public class PopulateRepositoryMojo
         mavenModel.setVersion( wrapper.getVersion() );
         mavenModel.setPackaging( "jar" );
         mavenModel.setModelVersion( "4.0.0" );
-        if ( artefactParent != null ) {
+        if ( artefactParent != null ) 
+        {
             mavenModel.setParent( artefactParent );
         }
         mavenModel.setName( 
@@ -1068,7 +1078,8 @@ public class PopulateRepositoryMojo
 //        mavenModel.setPackaging("nbm-application");
         mavenModel.setPackaging( "pom" );
         mavenModel.setModelVersion( "4.0.0" );
-        if ( artefactParent != null ) {
+        if ( artefactParent != null ) 
+        {
             mavenModel.setParent( artefactParent );
         }
         List<Dependency> deps = new ArrayList<Dependency>();
@@ -1126,8 +1137,8 @@ public class PopulateRepositoryMojo
     {
         return artifactFactory.createBuildArtifact( groupIdPrefix + GROUP_CLUSTER, artifact, version, "pom" );
     }
-
-    private static Pattern PATTERN_CLUSTER = Pattern.compile( "([a-zA-Z]+)[0-9\\.]*" );
+    
+    private static final Pattern PATTERN_CLUSTER = Pattern.compile( "([a-zA-Z]+)[0-9\\.]*" );
     static String stripClusterName( String key )
     {
         Matcher m = PATTERN_CLUSTER.matcher( key );
diff --git a/src/test/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojoTest.java b/src/test/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojoTest.java
index 2b01e36..516c4a1 100644
--- a/src/test/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojoTest.java
+++ b/src/test/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojoTest.java
@@ -1,3 +1,5 @@
+package org.apache.netbeans.nbm.repository;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.apache.netbeans.nbm.repository;
-
 import org.apache.netbeans.nbm.repository.PopulateRepositoryMojo;
 import java.io.File;
 import junit.framework.TestCase;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists