Skip to content

Commit

Permalink
[#1323] lic.equinox plug-in to be renamed
Browse files Browse the repository at this point in the history
* reworked dependencies to equinox
* moved helper types to LIC Execute
* extracted LIC CLI bundle

Fixes #1323
  • Loading branch information
ruspl-afed authored and eparovyshnaya committed May 25, 2024
1 parent 73aaa5c commit c603c54
Show file tree
Hide file tree
Showing 53 changed files with 218 additions and 63 deletions.
4 changes: 2 additions & 2 deletions bundles/org.eclipse.passage.lbc.base/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.passage.lic.base;bundle-version="0.0.0",
Require-Bundle: org.eclipse.emf.ecore.xmi;bundle-version="0.0.0",
org.eclipse.passage.lic.base;bundle-version="0.0.0",
org.eclipse.passage.lic.net;bundle-version="0.0.0",
org.eclipse.passage.lic.licenses.model;bundle-version="0.0.0",
org.eclipse.emf.ecore.xmi;bundle-version="0.0.0",
org.eclipse.passage.lic.emf;bundle-version="0.0.0",
org.eclipse.passage.lic.oshi;bundle-version="0.0.0",
org.eclipse.passage.lic.equinox;bundle-version="0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import org.eclipse.passage.lic.base.registry.ReadOnlyRegistry;
import org.eclipse.passage.lic.equinox.acquire.ConfigurationLicenseAcquisitionService;
import org.eclipse.passage.lic.equinox.acquire.InstallationLicenseAcquisitionService;
import org.eclipse.passage.lic.equinox.conditions.ConfigurationResidentConditions;
import org.eclipse.passage.lic.equinox.conditions.InstallationResidentConditions;
import org.eclipse.passage.lic.execute.BaseAccessCycleConfiguration;
import org.eclipse.passage.lic.execute.ConfigurationResidentConditions;
import org.eclipse.passage.lic.execute.InstallationResidentConditions;
import org.osgi.framework.FrameworkUtil;

final class SealedAccessCycleConfiguration extends BaseAccessCycleConfiguration {
Expand Down
1 change: 1 addition & 0 deletions bundles/org.eclipse.passage.lic.api/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Export-Package: org.eclipse.passage.lic.api,
org.eclipse.passage.lic.api.agreements;
x-friends:="org.eclipse.passage.lic.base,
org.eclipse.passage.lic.base.tests,
org.eclipse.passage.lic.cli,
org.eclipse.passage.lic.jface,
org.eclipse.passage.lic.equinox",
org.eclipse.passage.lic.api.conditions,
Expand Down
7 changes: 7 additions & 0 deletions bundles/org.eclipse.passage.lic.cli/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
46 changes: 46 additions & 0 deletions bundles/org.eclipse.passage.lic.cli/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.passage.lic.cli</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
<linkedResources>
<link>
<name>.settings</name>
<type>2</type>
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/.settings</locationURI>
</link>
</linkedResources>
</projectDescription>
14 changes: 14 additions & 0 deletions bundles/org.eclipse.passage.lic.cli/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Automatic-Module-Name: org.eclipse.passage.lic.cli
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.passage.lic.cli
Bundle-Version: 3.0.0.qualifier
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.equinox;bundle-version="0.0.0";visibility:=reexport
Export-Package: org.eclipse.passage.lic.cli;x-friends:="org.eclipse.passage.lic.jetty"
Import-Package: org.slf4j;version="1.7.36"
Bundle-ActivationPolicy: lazy
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
###############################################################################
# Copyright (c) 2018, 2024 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/.
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# ArSysOp - initial API and implementation
###############################################################################

Bundle-Name = Passage LIC CLI
Bundle-Vendor = Eclipse Passage
Bundle-Copyright = Copyright (c) 2018, 2024 ArSysOp and others.\n\
\n\
This program and the accompanying materials are made\n\
available under the terms of the Eclipse Public License 2.0\n\
which is available at https://www.eclipse.org/legal/epl-2.0/\n\
\n\
SPDX-License-Identifier: EPL-2.0\n\
36 changes: 36 additions & 0 deletions bundles/org.eclipse.passage.lic.cli/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>November 30, 2017</p>
<h3>License</h3>

<p>
The Eclipse Foundation makes available all content in this plug-in
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>

<p>
If you did not receive this Content directly from the Eclipse
Foundation, the Content is being redistributed by another party
(&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the
Redistributor's license that was provided with the Content. If no such
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
href="http://www.eclipse.org/">http://www.eclipse.org</a>.
</p>

</body>
</html>
19 changes: 19 additions & 0 deletions bundles/org.eclipse.passage.lic.cli/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###############################################################################
# Copyright (c) 2018, 2024 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/.
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# ArSysOp - initial API and implementation
###############################################################################

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
OSGI-INF/,\
about.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

abstract class BaseOption<D extends Enum<?>> implements Option<D> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

enum CoverageCheckOptionDecision {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.util.Optional;
import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

public interface Option<D extends Enum<?>> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.util.Arrays;
import java.util.Collection;
Expand All @@ -19,8 +19,8 @@
import org.eclipse.passage.lic.api.LicensedProduct;
import org.eclipse.passage.lic.api.agreements.AgreementAcceptanceService;
import org.eclipse.passage.lic.api.agreements.AgreementToAccept;
import org.eclipse.passage.lic.cli.Interaction.Smart;
import org.eclipse.passage.lic.equinox.SuppliedFrameworkAware;
import org.eclipse.passage.lic.equinox.access.Interaction.Smart;
import org.eclipse.passage.lic.internal.base.access.Libraries;
import org.eclipse.passage.lic.internal.equinox.access.AgreementAcceptanceDelegate;
import org.eclipse.passage.lic.internal.equinox.access.RegisteredLibraries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import org.eclipse.passage.lic.api.diagnostic.Diagnostic;
import org.eclipse.passage.lic.base.diagnostic.DiagnosticExplained;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.io.IOException;
import java.nio.file.Files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

final class OptionProceed extends BaseOption<CoverageCheckOptionDecision> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

final class OptionQuit extends BaseOption<CoverageCheckOptionDecision> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.util.Collection;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.equinox.access;
package org.eclipse.passage.lic.cli;

import java.util.List;
import java.util.Optional;
Expand Down
5 changes: 3 additions & 2 deletions bundles/org.eclipse.passage.lic.equinox/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";visibility:=reexport,
Require-Bundle: org.eclipse.equinox.app;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.equinox.registry;bundle-version="0.0.0",
org.eclipse.osgi;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.api;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.base;bundle-version="0.0.0";visibility:=reexport
Export-Package: org.eclipse.passage.lic.equinox;x-internal:=true,
org.eclipse.passage.lic.equinox.access;x-friends:="org.eclipse.passage.lic.jetty",
org.eclipse.passage.lic.equinox.acquire;x-internal:=true,
org.eclipse.passage.lic.equinox.conditions;x-internal:=true,
org.eclipse.passage.lic.equinox.io;x-internal:=true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 ArSysOp
* Copyright (c) 2022, 2024 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -22,7 +22,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.RegistryFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -64,7 +64,7 @@ public List<S> get() {
}

private IExtension[] extensions() {
return Platform.getExtensionRegistry().getExtensionPoint(namespace, point).getExtensions();
return RegistryFactory.getRegistry().getExtensionPoint(namespace, point).getExtensions();
}

private Optional<S> service(IConfigurationElement config) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2020 ArSysOp and others
* Copyright (c) 2019, 2024 ArSysOp and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -27,7 +27,6 @@ public class EquinoxMessages extends NLS {
public static String LicensedApplication_application_context_service_unregistered;
public static String LicensedApplication_no_application_context_service_ref;
public static String LicensedApplication_no_bundle_context;
public static String ProductContacts_defaults;
public static String RequirementsFromCapability_no_attributes;
public static String RequirementsFromCapability_no_feature_id;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2019, 2021 ArSysOp and others
# Copyright (c) 2019, 2024 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -20,6 +20,5 @@ BundleVendor_unknown_vendor=Unknown vendor
LicensedApplication_application_context_service_unregistered=Severe runtime insufficiency error: IApplicationContext service is unregistered or unavailable
LicensedApplication_no_application_context_service_ref=Severe runtime insufficiency error: no service reference for IApplicationContext
LicensedApplication_no_bundle_context=Severe runtime insufficiency error: no bundle context
ProductContacts_defaults=Protected by Eclipse Passage. Please visit https://eclipse-passage.github.io/passage-docs/#support
RequirementsFromCapability_no_attributes=Attributes for capability {0} in bundle {1} is required
RequirementsFromCapability_no_feature_id=Configuration of a feature identifier in capability {0} of bundle {1} is required
3 changes: 2 additions & 1 deletion bundles/org.eclipse.passage.lic.execute/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.passage.lic.api;bundle-version="0.0.0",
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0",
org.eclipse.passage.lic.api;bundle-version="0.0.0",
org.eclipse.passage.lic.base;bundle-version="0.0.0",
org.eclipse.passage.lic.bc;bundle-version="0.0.0",
org.eclipse.passage.lic.equinox;bundle-version="0.0.0",
Expand Down
Loading

0 comments on commit c603c54

Please sign in to comment.