This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 208411
Collapse All | Expand All

(-)a/maven/src/org/netbeans/modules/maven/api/Constants.java (+10 lines)
Lines 43-48 Link Here
43
43
44
import java.util.Arrays;
44
import java.util.Arrays;
45
import java.util.List;
45
import java.util.List;
46
import org.netbeans.modules.maven.spi.queries.ForeignClassBundler;
46
47
47
/**
48
/**
48
 * Various constants used across the integration, Maven property names with a meaning in the IDE,
49
 * Various constants used across the integration, Maven property names with a meaning in the IDE,
Lines 92-97 Link Here
92
    public static final String HINT_DISPLAY_NAME = "netbeans.hint.displayName";
93
    public static final String HINT_DISPLAY_NAME = "netbeans.hint.displayName";
93
94
94
    /**
95
    /**
96
     * Maven property instructing NetBeans whether to prefer sources to binaries when scanning classpaths.
97
     * The default is generally true (barring a {@link ForeignClassBundler} claiming otherwise),
98
     * so this property can be set to {@code false} to indicate that a project uses an idiosyncratic means of producing its primary JAR artifact
99
     * which then does not correspond completely (or at all) to {@code src/main/java/}.
100
     * @since 2.84
101
     */
102
    String HINT_PREFER_SOURCES = "netbeans.hint.prefer.sources";
103
104
    /**
95
     * apache maven default groupid for maven plugins. 
105
     * apache maven default groupid for maven plugins. 
96
     */ 
106
     */ 
97
    public static final String GROUP_APACHE_PLUGINS = "org.apache.maven.plugins"; //NOI18N
107
    public static final String GROUP_APACHE_PLUGINS = "org.apache.maven.plugins"; //NOI18N
(-)a/maven/src/org/netbeans/modules/maven/queries/ShadePluginDetector.java (+6 lines)
Lines 48-56 Link Here
48
import org.netbeans.spi.project.ProjectServiceProvider;
48
import org.netbeans.spi.project.ProjectServiceProvider;
49
import org.openide.util.NbBundle;
49
import org.openide.util.NbBundle;
50
import static org.netbeans.modules.maven.queries.Bundle.*;
50
import static org.netbeans.modules.maven.queries.Bundle.*;
51
import org.netbeans.spi.project.AuxiliaryProperties;
51
52
52
/**
53
/**
53
 * Indicates that a shaded JAR should be consulted in preference to sources.
54
 * Indicates that a shaded JAR should be consulted in preference to sources.
55
 * Also checks {@link Constants#HINT_PREFER_SOURCES}.
54
 */
56
 */
55
@ProjectServiceProvider(service=ForeignClassBundler.class, projectType="org-netbeans-modules-maven")
57
@ProjectServiceProvider(service=ForeignClassBundler.class, projectType="org-netbeans-modules-maven")
56
@NbBundle.Messages({
58
@NbBundle.Messages({
Lines 78-83 Link Here
78
        if (nbmp == null) {
80
        if (nbmp == null) {
79
            return true;
81
            return true;
80
        }
82
        }
83
        String hint = project.getLookup().lookup(AuxiliaryProperties.class).get(Constants.HINT_PREFER_SOURCES, true);
84
        if (hint != null) {
85
            return Boolean.parseBoolean(hint);
86
        }
81
        if (PluginPropertyUtils.getPluginVersion(nbmp.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, "maven-shade-plugin") == null) {
87
        if (PluginPropertyUtils.getPluginVersion(nbmp.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, "maven-shade-plugin") == null) {
82
            return true;
88
            return true;
83
        }
89
        }

Return to bug 208411