Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2022-06 compatibility #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.configuration.maven.userSettings": "~/.m2/settings-plugins.xml",
"maven.view": "hierarchical"
}
1 change: 1 addition & 0 deletions io.takari.m2e.jenkins.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<requires>
<import feature="org.jboss.tools.maven.apt.feature" version="1.2.0" match="greaterOrEqual"/>
<import feature="org.eclipse.m2e.feature" version="1.20.0" match="greaterOrEqual"/>
</requires>

<plugin
Expand Down
37 changes: 30 additions & 7 deletions io.takari.m2e.jenkins.plugin/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
Expand Down Expand Up @@ -114,11 +121,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
Expand Down Expand Up @@ -149,6 +157,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
Expand All @@ -173,13 +183,17 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
Expand Down Expand Up @@ -227,6 +241,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
Expand Down Expand Up @@ -263,9 +279,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
Expand All @@ -291,7 +310,11 @@ org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=2
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
8 changes: 5 additions & 3 deletions io.takari.m2e.jenkins.plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Jenkins Plugin Development Environment
Bundle-Vendor: Takari.io - m2e jenkins
Bundle-SymbolicName: io.takari.m2e.jenkins.plugin;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7,
JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.resources,
org.eclipse.core.runtime,
Expand All @@ -30,5 +30,7 @@ Require-Bundle: org.eclipse.core.resources,
com.ibm.icu,
org.jboss.tools.maven.apt.core,
org.eclipse.jdt.apt.core,
io.takari.m2e.jdt.core;resolution:=optional
io.takari.m2e.jdt.core;resolution:=optional,
org.apache.xml.resolver;bundle-version="1.2.0"
Bundle-Activator: io.takari.m2e.jenkins.internal.JenkinsPlugin
Automatic-Module-Name: io.takari.m2e.jenkins.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;

import io.takari.m2e.jenkins.JenkinsPluginProject;
import io.takari.m2e.jenkins.internal.idx.AnnotationIndexer;
import io.takari.m2e.jenkins.internal.idx.HudsonAnnIndexer;
import io.takari.m2e.jenkins.internal.idx.SezpozIndexer;
import io.takari.m2e.jenkins.plugin.JenkinsPluginProject;

public class JenkinsBuilder extends IncrementalProjectBuilder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;

import io.takari.m2e.jenkins.JenkinsPluginProject;
import io.takari.m2e.jenkins.plugin.JenkinsPluginProject;

public class JenkinsLocalizerProjectConfigurator extends AbstractProjectConfigurator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.jboss.tools.maven.apt.preferences.IPreferencesManager;
import org.osgi.framework.Bundle;

import io.takari.m2e.jenkins.JenkinsPluginProject;
import io.takari.m2e.jenkins.plugin.JenkinsPluginProject;

public class JenkinsProjectConfigurator extends AbstractProjectConfigurator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
Expand All @@ -34,14 +36,18 @@
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.internal.Bundles;
import org.osgi.framework.Bundle;
import org.osgi.framework.namespace.BundleNamespace;
import org.osgi.framework.namespace.PackageNamespace;
import org.osgi.framework.wiring.BundleWire;
import org.osgi.framework.wiring.BundleWiring;

import io.takari.m2e.jenkins.IJenkinsPlugin;
import io.takari.m2e.jenkins.JenkinsPluginProject;
import io.takari.m2e.jenkins.PluginDependenciesCalculator;
import io.takari.m2e.jenkins.PluginDependenciesCalculator.DependenciesResult;
import io.takari.m2e.jenkins.internal.JenkinsPlugin;
import io.takari.m2e.jenkins.launcher.desc.Descriptor;
import io.takari.m2e.jenkins.launcher.desc.PluginDesc;
import io.takari.m2e.jenkins.plugin.IJenkinsPlugin;
import io.takari.m2e.jenkins.plugin.JenkinsPluginProject;
import io.takari.m2e.jenkins.plugin.PluginDependenciesCalculator;
import io.takari.m2e.jenkins.plugin.PluginDependenciesCalculator.DependenciesResult;
import io.takari.m2e.jenkins.runtime.JenkinsRuntimePlugin;
import io.takari.m2e.jenkins.runtime.PluginUpdateCenter;

Expand Down Expand Up @@ -174,14 +180,37 @@ private static String concat(String args1, String args2) {
private List<String> getRuntimeClasspath() {
if (CLASSPATH == null) {
LinkedHashSet<String> allentries = new LinkedHashSet<String>();
Bundle runtimeBundle = Bundles.findDependencyBundle(JenkinsPlugin.getInstance().getBundle(),
RUNTIME_BUNDLE_SYMBOLICNAME);
Bundle runtimeBundle = findDependencyBundle(JenkinsPlugin.getInstance().getBundle(),
RUNTIME_BUNDLE_SYMBOLICNAME, new HashSet<>());
allentries.addAll(Bundles.getClasspathEntries(runtimeBundle));
CLASSPATH = new ArrayList<>(allentries);
}
return CLASSPATH;
}

private static Bundle findDependencyBundle(Bundle bundle, String dependencyName, Set<Bundle> visited) {
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
if (bundleWiring == null) {
return null;
}
ArrayList<BundleWire> dependencies = new ArrayList<BundleWire>();
dependencies.addAll(bundleWiring.getRequiredWires(BundleNamespace.BUNDLE_NAMESPACE));
dependencies.addAll(bundleWiring.getRequiredWires(PackageNamespace.PACKAGE_NAMESPACE));
for (BundleWire wire : dependencies) {
Bundle requiredBundle = wire.getProviderWiring().getBundle();
if (requiredBundle != null && visited.add(requiredBundle)) {
if (dependencyName.equals(requiredBundle.getSymbolicName())) {
return requiredBundle;
}
Bundle required = findDependencyBundle(requiredBundle, dependencyName, visited);
if (required != null) {
return required;
}
}
}
return null;
}

private Descriptor createDescriptor(JenkinsLaunchConfig config, IProgressMonitor monitor) throws CoreException {
// locate all used plugins' hpl files, those should have been generated by
// test-hpl mojo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorPart;

import io.takari.m2e.jenkins.JenkinsPluginProject;
import io.takari.m2e.jenkins.internal.JenkinsPlugin;
import io.takari.m2e.jenkins.plugin.JenkinsPluginProject;

public class LaunchShortcutAction implements ILaunchShortcut {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;

import io.takari.m2e.jenkins.JenkinsPluginProject;
import io.takari.m2e.jenkins.internal.JenkinsPlugin;
import io.takari.m2e.jenkins.internal.launch.JenkinsLaunchConfig;
import io.takari.m2e.jenkins.internal.launch.LaunchingUtils;
import io.takari.m2e.jenkins.internal.ui.databinding.IntegerToStringConverter;
import io.takari.m2e.jenkins.internal.ui.databinding.IntegerValidator;
import io.takari.m2e.jenkins.internal.ui.databinding.SetSelectionObservable;
import io.takari.m2e.jenkins.internal.ui.databinding.StringToIntegerConverter;
import io.takari.m2e.jenkins.plugin.JenkinsPluginProject;

public class JenkinsMainTab extends JavaLaunchTab {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.takari.m2e.jenkins;
package io.takari.m2e.jenkins.plugin;

import java.io.File;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.takari.m2e.jenkins;
package io.takari.m2e.jenkins.plugin;

import java.io.File;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.takari.m2e.jenkins;
package io.takari.m2e.jenkins.plugin;

import java.io.File;
import java.io.FileOutputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.takari.m2e.jenkins;
package io.takari.m2e.jenkins.plugin;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.takari.m2e.jenkins;
package io.takari.m2e.jenkins.plugin;

public class PluginDependency {
private IJenkinsPlugin plugin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.takari.m2e.jenkins;
package io.takari.m2e.jenkins.plugin;

import io.takari.m2e.jenkins.runtime.PluginUpdateCenter;

Expand Down
Loading