lkishalmi closed pull request #415: [NETBEANS-365] Allow Harness to be more 
Friendly 
URL: https://github.com/apache/incubator-netbeans/pull/415
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java 
b/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java
index b88933f591..76623ed132 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java
@@ -64,6 +64,7 @@
 import org.apache.tools.ant.AntClassLoader;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.taskdefs.Ant;
 import org.apache.tools.ant.types.Path;
@@ -85,6 +86,7 @@
     static final String PROJECT_NS = "http://www.netbeans.org/ns/project/1";;
     static final String NBM_NS2 = 
"http://www.netbeans.org/ns/nb-module-project/2";;
     static final String NBM_NS3 = 
"http://www.netbeans.org/ns/nb-module-project/3";;
+    static final String PROP_FRIENDLY_MODULES = "netbeans.friendly.modules";
 
     private File moduleProject;
     /**
@@ -991,7 +993,16 @@ private String computeClasspath(String myCNB, 
ModuleListParser modules, Dep[] de
                 if (!dep.impl && /* #71807 */ dep.run && !recursive && 
!runtime) {
                     String friends = attr.getValue("OpenIDE-Module-Friends");
                     if (friends != null && !Arrays.asList(friends.split(" *, 
*")).contains(myCNB)) {
-                        throw new BuildException("The module " + myCNB + " is 
not a friend of " + depJar, getLocation());
+                        String friendIssue = "The module " + myCNB + " is not 
a friend of " + depJar;
+                        if 
(Boolean.parseBoolean(getProject().getProperty(PROP_FRIENDLY_MODULES))) {
+                            log(friendIssue, Project.MSG_WARN);
+                        } else {                           
+                            log("The " + depJar.getName() + " is a non-stable 
API/SPI. It is only available for its friends.", Project.MSG_ERR);
+                            log("Add project following property, in order to 
overcome this restriction:", Project.MSG_ERR);
+                            log("\t" + PROP_FRIENDLY_MODULES + "=true", 
Project.MSG_ERR);
+                            log("Remember, runtime support of the friendship 
is still required. See: https://bitbucket.org/jglick/yenta";, Project.MSG_ERR);
+                            throw new BuildException(friendIssue, 
getLocation());
+                        }
                     }
                     String pubpkgs = 
attr.getValue("OpenIDE-Module-Public-Packages");
                     if ("-".equals(pubpkgs)) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to