private boolean usingSurefire28(MavenProject prj) { String v = PluginPropertyUtils.getPluginVersion(prj, Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE); return v != null && new ComparableVersion(v).compareTo(new ComparableVersion("2.8")) >= 0; }
private boolean isSurefireRunningInParallel() { String parallel = PluginPropertyUtils.getPluginProperty(config.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, "parallel", "test", "parallel"); //NOI18N if (parallel != null) { return true; String forkMode = PluginPropertyUtils.getPluginProperty(config.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, "forkMode", "test", "forkMode"); //NOI18N if ("perthread".equals(forkMode)) { String threadCount = PluginPropertyUtils.getPluginProperty(config.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, "threadCount", "test", "threadCount"); if (threadCount != null) { String forkCount = PluginPropertyUtils.getPluginProperty(config.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, "forkCount", "test", "forkCount"); if (forkCount != null) {
public FelixExportPersister (Project project, ModelHandle2 handle) { this.project = project; this.handle = handle; String[] exports = PluginPropertyUtils.getPluginPropertyList(project, OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN, OSGiConstants.PARAM_INSTRUCTIONS, OSGiConstants.EXPORT_PACKAGE, OSGiConstants.GOAL_MANIFEST); String exportInstruction = null; if (exports != null && exports.length == 1) { exportInstruction = exports[0]; isDefined = true; } else { isDefined = false; } String[] privates = PluginPropertyUtils.getPluginPropertyList(project, OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN, OSGiConstants.PARAM_INSTRUCTIONS, OSGiConstants.PRIVATE_PACKAGE, OSGiConstants.GOAL_MANIFEST); String privateInstruction = null; if (privates != null && privates.length == 1) { privateInstruction = privates[0]; } Map<Integer, String> instructions = new HashMap<Integer, String>(2); instructions.put(InstructionsConverter.EXPORT_PACKAGE, exportInstruction); instructions.put(InstructionsConverter.PRIVATE_PACKAGE, privateInstruction); defaultValue = InstructionsConverter.computeExportList(instructions, project); }
try { MavenProject mp = nbmp.getMavenProject(); Properties props = PluginPropertyUtils.getPluginPropertyParameter(project, "org.apache.felix", "maven-bundle-plugin", "instructions", "bundle"); if (props != null) {
String loc = PluginPropertyUtils.getReportPluginProperty(project, Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_CHECKSTYLE, "configLocation", null); if (loc == null && definesCheckStyle(project)) { loc = "config/sun_checks.xml"; //this is the default NOI18N
private boolean usingSurefire2121(MavenProject prj) { String v = PluginPropertyUtils.getPluginVersion(prj, Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE); return v != null && new ComparableVersion(v).compareTo(new ComparableVersion("2.12.1")) >= 0; }
private Boolean check(String value) { String[] exps = PluginPropertyUtils.getPluginPropertyList(prj, OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN, OSGiConstants.PARAM_INSTRUCTIONS, OSGiConstants.EXPORT_PACKAGE, OSGiConstants.GOAL_MANIFEST); String[] imps = PluginPropertyUtils.getPluginPropertyList(prj, OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN, OSGiConstants.PARAM_INSTRUCTIONS, OSGiConstants.PRIVATE_PACKAGE,
private void generateTest() { String reportNameSuffix = PluginPropertyUtils.getPluginProperty(config.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, "reportNameSuffix", "test", "surefire.reportNameSuffix"); String suffix = reportNameSuffix; if (suffix == null) {
plugin.setGroupId(OSGiConstants.GROUPID_FELIX); plugin.setArtifactId(OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN); String ver = PluginPropertyUtils.getPluginVersion(prj.getMavenProject(), OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN); if (ver == null) {
@Override public Category createCategory(Lookup context) { Project project = context.lookup(Project.class); NbMavenProject watcher = project.getLookup().lookup(NbMavenProject.class); String effPackaging = watcher.getPackagingType(); String[] types = PluginPropertyUtils.getPluginPropertyList(project, OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN, "supportedProjectTypes", "supportedProjectType", /*"bundle" would not work for GlassFish parent POM*/null); if (types != null) { for (String type : types) { if (effPackaging.equals(type)) { effPackaging = NbMavenProject.TYPE_OSGI; } } } if (NbMavenProject.TYPE_OSGI.equalsIgnoreCase(effPackaging)) { return ProjectCustomizer.Category.create( ModelHandle2.PANEL_COMPILE, org.openide.util.NbBundle.getMessage(PackagesPanelProvider.class, "TIT_Packages"), null); } return null; }
private void checkContent(Project prj, InstanceContent ic, AccessQueryImpl access, ForeignClassBundlerImpl bundler, RecommendedTemplates templates) { NbMavenProject nbprj = prj.getLookup().lookup(NbMavenProject.class); String effPackaging = nbprj.getPackagingType(); String[] types = PluginPropertyUtils.getPluginPropertyList(prj, OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN, "supportedProjectTypes", "supportedProjectType", /*"bundle" would not work for GlassFish parent POM*/null); if (types != null) { for (String type : types) { if (effPackaging.equals(type)) { effPackaging = NbMavenProject.TYPE_OSGI; } } } if (NbMavenProject.TYPE_OSGI.equals(effPackaging)) { ic.add(access); ic.add(bundler); ic.add(templates); } else { ic.remove(access); ic.remove(bundler); ic.remove(templates); } }