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.
import java.util.Arrays;
import java.util.List;
import org.netbeans.modules.maven.spi.queries.ForeignClassBundler;
/**
* Various constants used across the integration, Maven property names with a meaning in the IDE,
public static final String HINT_DISPLAY_NAME = "netbeans.hint.displayName";
* Maven property instructing NetBeans whether to prefer sources to binaries when scanning classpaths.
* The default is generally true (barring a {@link ForeignClassBundler} claiming otherwise),
* so this property can be set to {@code false} to indicate that a project uses an idiosyncratic means of producing its primary JAR artifact
* which then does not correspond completely (or at all) to {@code src/main/java/}.
* @since 2.84
*/
String HINT_PREFER_SOURCES = "netbeans.hint.prefer.sources";
* apache maven default groupid for maven plugins.
public static final String GROUP_APACHE_PLUGINS = "org.apache.maven.plugins"; //NOI18N
import org.netbeans.spi.project.ProjectServiceProvider;
import org.openide.util.NbBundle;
import static org.netbeans.modules.maven.queries.Bundle.*;
import org.netbeans.spi.project.AuxiliaryProperties;
* Indicates that a shaded JAR should be consulted in preference to sources.
* Also checks {@link Constants#HINT_PREFER_SOURCES}.
@ProjectServiceProvider(service=ForeignClassBundler.class, projectType="org-netbeans-modules-maven")
@NbBundle.Messages({
if (nbmp == null) {
return true;
}
String hint = project.getLookup().lookup(AuxiliaryProperties.class).get(Constants.HINT_PREFER_SOURCES, true);
if (hint != null) {
return Boolean.parseBoolean(hint);
if (PluginPropertyUtils.getPluginVersion(nbmp.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, "maven-shade-plugin") == null) {