Skip to content

Commit

Permalink
Use Import-Package to reference third-party dependencies in templates
Browse files Browse the repository at this point in the history
And remove unnecessary dependencies.

Also remove them as explicitly content from template-products (they are
included implicitly if necessary).

Fixes #1224
  • Loading branch information
HannesWell committed May 9, 2023
1 parent b416453 commit d5faafa
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ protected List<String> getRCP3xDependencies() {

protected List<String> getRCP4xDependencies() {
return Arrays.asList(//
"javax.inject", //$NON-NLS-1$
"org.eclipse.core.runtime", //$NON-NLS-1$
"org.eclipse.swt", //$NON-NLS-1$
"org.eclipse.jface", //$NON-NLS-1$
Expand All @@ -186,8 +185,7 @@ protected List<String> getRCP4xDependencies() {
"org.eclipse.e4.core.contexts", //$NON-NLS-1$
"org.eclipse.passage.lic.equinox", //$NON-NLS-1$
"org.eclipse.passage.lic.e4.ui", //$NON-NLS-1$
"org.eclipse.passage.seal.demo", //$NON-NLS-1$
"org.apache.logging.log4j"); //$NON-NLS-1$
"org.eclipse.passage.seal.demo"); //$NON-NLS-1$
}

protected Requirement createProductRequirement(String product) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ public ITemplateSection[] createTemplateSections() {
new LicensedE4ProductTemplateSection(), //
};
}

@Override
public String[] getImportPackages() {
return new String[] { "javax.inject;version=\"[1.0.0,2.0.0)\"" }; //$NON-NLS-1$
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ public ITemplateSection[] createTemplateSections() {
new LicensedE4FullFeatherProductTemplateSection(), //
};
}

@Override
public String[] getImportPackages() {
return new String[] { "javax.annotation;version=\"[1.3.0,2.0.0)\"" }; //$NON-NLS-1$
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ private IPluginElement product(IPluginExtension extension) throws CoreException
@Override
protected List<String> getRCP4xDependencies() {
List<String> result = new ArrayList<>();
result.add("javax.annotation"); //$NON-NLS-1$
result.addAll(super.getRCP4xDependencies());
result.add("org.eclipse.passage.lic.execute"); //$NON-NLS-1$
result.remove("org.eclipse.passage.seal.demo"); //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
<plugin id="com.fasterxml.jackson.core.jackson-core"/>
<plugin id="com.fasterxml.jackson.core.jackson-databind"/>
<plugin id="com.github.oshi.oshi-core"/>
<plugin id="com.ibm.icu"/>
<plugin id="com.sun.jna"/>
<plugin id="com.sun.jna.platform"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
<plugin id="org.apache.batik.constants"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.i18n"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
<plugin id="com.fasterxml.jackson.core.jackson-core"/>
<plugin id="com.fasterxml.jackson.core.jackson-databind"/>
<plugin id="com.github.oshi.oshi-core"/>
<plugin id="com.ibm.icu"/>
<plugin id="com.sun.jna"/>
<plugin id="com.sun.jna.platform"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
<plugin id="org.apache.batik.constants"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.i18n"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
<plugin id="com.fasterxml.jackson.core.jackson-core"/>
<plugin id="com.fasterxml.jackson.core.jackson-databind"/>
<plugin id="com.github.oshi.oshi-core"/>
<plugin id="com.ibm.icu"/>
<plugin id="com.sun.jna"/>
<plugin id="com.sun.jna.platform"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
<plugin id="org.apache.batik.constants"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.i18n"/>
Expand Down

0 comments on commit d5faafa

Please sign in to comment.