[hg] main-silver: get rid of deprecated calls , have the express...

  • From: Milos Kleint < >
  • To: ,
  • Subject: [hg] main-silver: get rid of deprecated calls , have the express...
  • Date: Fri, 07 Dec 2012 16:07:26 -0800

changeset 59e1b45e04f9 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/59e1b45e04f9
description:
        get rid of deprecated calls , have the expression property included 
in the method calls.

diffstat:

 
maven.apisupport/src/org/netbeans/modules/maven/apisupport/NetBeansRunParamsIDEChecker.java
 |  2 +-
 
maven.junit/src/org/netbeans/modules/maven/junit/JUnitOutputListenerProvider.java
           |  2 +-
 maven/src/org/netbeans/modules/maven/api/PluginPropertyUtils.java            
               |  9 +++++++--
 maven/src/org/netbeans/modules/maven/cos/CosChecker.java                     
               |  6 +++---
 maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java  
               |  2 +-
 5 files changed, 13 insertions(+), 8 deletions(-)

diffs (92 lines):

diff --git 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NetBeansRunParamsIDEChecker.java
 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NetBeansRunParamsIDEChecker.java
--- 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NetBeansRunParamsIDEChecker.java
+++ 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NetBeansRunParamsIDEChecker.java
@@ -96,7 +96,7 @@
         }
         String text = null;
         for (String goal : config.getGoals()) {
-            text = PluginPropertyUtils.getPluginProperty(prj, 
MavenNbModuleImpl.GROUPID_MOJO, MavenNbModuleImpl.NBM_PLUGIN, 
ADDITIONAL_ARGUMENTS, goal);
+            text = PluginPropertyUtils.getPluginProperty(prj, 
MavenNbModuleImpl.GROUPID_MOJO, MavenNbModuleImpl.NBM_PLUGIN, 
ADDITIONAL_ARGUMENTS, goal, "netbeans.run.params");
             if (text != null) {
                 break;
             }
diff --git 
a/maven.junit/src/org/netbeans/modules/maven/junit/JUnitOutputListenerProvider.java
 
b/maven.junit/src/org/netbeans/modules/maven/junit/JUnitOutputListenerProvider.java
--- 
a/maven.junit/src/org/netbeans/modules/maven/junit/JUnitOutputListenerProvider.java
+++ 
b/maven.junit/src/org/netbeans/modules/maven/junit/JUnitOutputListenerProvider.java
@@ -347,7 +347,7 @@
 
     
     private void generateTest() {
-        String reportNameSuffix = 
PluginPropertyUtils.getPluginProperty(config.getMavenProject(), 
Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, 
"reportNameSuffix", null);
+        String reportNameSuffix = 
PluginPropertyUtils.getPluginProperty(config.getMavenProject(), 
Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, 
"reportNameSuffix", "test", "surefire.reportNameSuffix");
         String suffix = reportNameSuffix;
         if (suffix == null) {
             suffix = "";
diff --git 
a/maven/src/org/netbeans/modules/maven/api/PluginPropertyUtils.java 
b/maven/src/org/netbeans/modules/maven/api/PluginPropertyUtils.java
--- a/maven/src/org/netbeans/modules/maven/api/PluginPropertyUtils.java
+++ b/maven/src/org/netbeans/modules/maven/api/PluginPropertyUtils.java
@@ -103,7 +103,7 @@
      * tries to figure out if the property of the given plugin is customized 
in the
      * current project and returns it's value if so, otherwise null
      * @param parameter the name of the plugin parameter to look for
-     * @param expressionProperty expression property that once defined (and 
plugin configuration is omited) is used.
+     * @param expressionProperty expression property that once defined (and 
plugin configuration is omited) is used. only value, no ${}
      */
     public static @CheckForNull String getPluginProperty(@NonNull Project 
prj, @NonNull String groupId, @NonNull String artifactId, @NonNull String 
parameter, @NullAllowed String goal, @NullAllowed String expressionProperty) {
         NbMavenProjectImpl project = 
prj.getLookup().lookup(NbMavenProjectImpl.class);
@@ -122,7 +122,12 @@
     public static @CheckForNull String getPluginProperty(@NonNull 
MavenProject prj, @NonNull String groupId, @NonNull String artifactId, 
@NonNull String parameter, @NullAllowed String goal) {
         return getPluginProperty(prj, groupId, artifactId, parameter, goal, 
null);
     }
-    
+    /**
+     * tries to figure out if the property of the given plugin is customized 
in the
+     * current project and returns it's value if so, otherwise null
+     * @param parameter the name of the plugin parameter to look for
+     * @param expressionProperty expression property that once defined (and 
plugin configuration is omited) is used. only value, no ${}
+     */
     public static @CheckForNull String getPluginProperty(@NonNull 
MavenProject prj, @NonNull String groupId, @NonNull String artifactId, 
@NonNull String parameter, @NullAllowed String goal, @NullAllowed String 
expressionProperty) {
         return getPluginPropertyImpl(prj, createEvaluator(prj), groupId, 
artifactId, parameter, goal, expressionProperty);
     }
diff --git a/maven/src/org/netbeans/modules/maven/cos/CosChecker.java 
b/maven/src/org/netbeans/modules/maven/cos/CosChecker.java
--- a/maven/src/org/netbeans/modules/maven/cos/CosChecker.java
+++ b/maven/src/org/netbeans/modules/maven/cos/CosChecker.java
@@ -315,7 +315,7 @@
         }
         if (RunUtils.hasTestCompileOnSaveEnabled(config)) {
             String testng = 
PluginPropertyUtils.getPluginProperty(config.getMavenProject(), 
Constants.GROUP_APACHE_PLUGINS,
-                    Constants.PLUGIN_SUREFIRE, "testNGArtifactName", 
"test"); //NOI18N
+                    Constants.PLUGIN_SUREFIRE, "testNGArtifactName", "test", 
"testNGArtifactName"); //NOI18N
             if (testng == null) {
                 testng = "org.testng:testng"; //NOI18N
             }
@@ -416,7 +416,7 @@
             Set<String> jvmPropNames = new HashSet<String>();
             params.put(JavaRunner.PROP_PROJECT_NAME, 
config.getExecutionName() + "/CoS");
             String dir = 
PluginPropertyUtils.getPluginProperty(config.getMavenProject(), 
Constants.GROUP_APACHE_PLUGINS,
-                    Constants.PLUGIN_SUREFIRE, "basedir", "test"); //NOI18N
+                    Constants.PLUGIN_SUREFIRE, "basedir", "test", 
"basedir"); //NOI18N
             //TODO there's another property named workingDirectory that 
overrides  basedir.
             // basedir is also assumed to end up as system property for 
tests..
             jvmPropNames.add("basedir"); //NOI18N
@@ -463,7 +463,7 @@
             }
 
             String argLine = 
PluginPropertyUtils.getPluginProperty(config.getMavenProject(), 
Constants.GROUP_APACHE_PLUGINS,
-                    Constants.PLUGIN_SUREFIRE, "argLine", "test"); //NOI18N
+                    Constants.PLUGIN_SUREFIRE, "argLine", "test", 
"argLine"); //NOI18N
             if (argLine != null) {
                 try {
                     String[] arr = 
CommandLineUtils.translateCommandline(argLine);
diff --git 
a/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java 
b/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java
--- 
a/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java
+++ 
b/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java
@@ -219,7 +219,7 @@
                     return;
                 }
             
-                String reportNameSuffix = 
PluginPropertyUtils.getPluginProperty(nbprj.getOriginalMavenProject(), 
Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, 
"reportNameSuffix", null);
+                String reportNameSuffix = 
PluginPropertyUtils.getPluginProperty(nbprj.getOriginalMavenProject(), 
Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, 
"reportNameSuffix", "test", "surefire.reportNameSuffix");
                 String suffix = reportNameSuffix;
                 if (suffix == null) {
                     suffix = "";

[hg] main-silver: get rid of deprecated calls , have the express...

Milos Kleint 12/08/2012

Project Features

About this Project

APIsupport was started in November 2009, is owned by Antonin Nebuzelsky, and has 43 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close