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

Make m2e.core.ui host of archetype-fragments and delete archetype.common #1494

Merged
merged 1 commit into from
Aug 22, 2023
Merged
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
10 changes: 0 additions & 10 deletions org.eclipse.m2e.archetype.common/.classpath

This file was deleted.

28 changes: 0 additions & 28 deletions org.eclipse.m2e.archetype.common/.project

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

35 changes: 0 additions & 35 deletions org.eclipse.m2e.archetype.common/.settings/org.eclipse.pde.prefs

This file was deleted.

15 changes: 0 additions & 15 deletions org.eclipse.m2e.archetype.common/META-INF/MANIFEST.MF

This file was deleted.

14 changes: 0 additions & 14 deletions org.eclipse.m2e.archetype.common/META-INF/p2.inf

This file was deleted.

128 changes: 0 additions & 128 deletions org.eclipse.m2e.archetype.common/about.html

This file was deleted.

5 changes: 0 additions & 5 deletions org.eclipse.m2e.archetype.common/build.properties

This file was deleted.

10 changes: 8 additions & 2 deletions org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Require-Bundle: org.eclipse.m2e.core;bundle-version="[2.0.0,3.0.0)",
org.eclipse.core.runtime;bundle-version="3.5.0",
org.eclipse.m2e.model.edit;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.m2e.maven.runtime;bundle-version="[3.8.6,4.0.0)",
org.eclipse.m2e.archetype.common;bundle-version="[3.2.1,4.0.0)",
org.eclipse.ui.console;bundle-version="3.4.0",
org.eclipse.ui.ide;bundle-version="3.18.0",
org.eclipse.core.filesystem;bundle-version="1.2.1",
Expand All @@ -43,7 +42,14 @@ Require-Bundle: org.eclipse.m2e.core;bundle-version="[2.0.0,3.0.0)",
org.eclipse.core.filebuffers,
org.eclipse.ui,
org.eclipse.ui.navigator
Import-Package: org.eclipse.compare.rangedifferencer,
Import-Package: org.apache.maven.archetype.catalog;provider=m2e;version="[3.2.1,4.0.0)",
org.apache.maven.archetype.catalog.io.xpp3;provider=m2e;version="[3.2.1,4.0.0)",
org.apache.maven.archetype.common;provider=m2e;version="[3.2.1,4.0.0)",
org.apache.maven.archetype.exception;provider=m2e;version="[3.2.1,4.0.0)",
org.apache.maven.archetype.metadata;provider=m2e;version="[3.2.1,4.0.0)",
org.apache.maven.archetype.source;provider=m2e;version="[3.2.1,4.0.0)",
org.apache.maven.shared.transfer.artifact;provider=m2e;version="[0.13.1,1.0.0)",
org.eclipse.compare.rangedifferencer,
org.eclipse.ltk.core.refactoring,
org.slf4j;version="[1.7.0,3.0.0)"
Service-Component: OSGI-INF/component.xml,
Expand Down
1 change: 1 addition & 0 deletions org.eclipse.m2e.feature/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
bin.includes = feature.xml,\
feature.properties,\
p2.inf
pom.model.property.tycho.baseline.skip = true
28 changes: 27 additions & 1 deletion org.eclipse.m2e.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,33 @@
id="org.eclipse.m2e.archetype.common"
download-size="0"
install-size="0"
version="0.0.0"/>
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.m2e.archetype.catalog"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.m2e.archetype.descriptor"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.eclipse.m2e.archetype.maven-artifact-transfer"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
Comment on lines +29 to +55
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laeubi do you see any reason that speaks against including the archetype bundles in this feature?
I would prefer it over the p2.inf file since it is less magic.

Copy link
Member

@laeubi laeubi Aug 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The p2.inf ensures that all fragments are always installed together (especially for cases like tests).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The p2.inf ensures that all fragments are always installed together (especially for cases like tests).

This can also be achieved by corresponding Import-Packages and is less magic and even less to type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this can't work because a fragment is always optional, so a consumer would need to import a package from each fragment even if it is never used.

Copy link
Contributor Author

@HannesWell HannesWell Aug 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this can't work because a fragment is always optional, so a consumer would need to import a package from each fragment even if it is never used.

That's right, a fragment is optional but m2e.core.ui already needs to import a package from each of the archetype artifacts (if one does not use require-bundle). The only import that would not be necessary from a class-loading/compiling point of view is the maven-transfer. But I think one not so necessary import is IMHO ok. And just to save that I wouldn't add/keep the p2.inf.


<plugin
id="org.eclipse.m2e.model.edit"
Expand Down
10 changes: 0 additions & 10 deletions org.eclipse.m2e.repository/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@
<bundle id="org.apache.commons.cli"/>
<bundle id="org.apache.commons.cli.source"/>
<bundle id="jakarta.servlet-api"/>
<bundle id="org.eclipse.m2e.archetype.jdom2"/>
<bundle id="org.eclipse.m2e.archetype.jdom2.source"/>
<bundle id="org.eclipse.m2e.archetype.archetype-catalog"/>
<bundle id="org.eclipse.m2e.archetype.archetype-catalog.source"/>
<bundle id="org.eclipse.m2e.archetype.archetype-common"/>
<bundle id="org.eclipse.m2e.archetype.archetype-common.source"/>
<bundle id="org.eclipse.m2e.archetype.archetype-descriptor"/>
<bundle id="org.eclipse.m2e.archetype.archetype-descriptor.source"/>
<bundle id="org.eclipse.m2e.archetype.maven-artifact-transfer"/>
<bundle id="org.eclipse.m2e.archetype.maven-artifact-transfer.source"/>
<iu>
<query>
<expression type="match">
Expand Down
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

<module>org.eclipse.m2e.maven.runtime</module>

<module>org.eclipse.m2e.archetype.common</module>
<module>org.eclipse.m2e.model.edit</module>
<module>org.eclipse.m2e.core</module>
<module>org.eclipse.m2e.core.ui</module>
Expand Down
Loading
Loading