Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Hack m2e-core jar into a standard Eclipse install

So the m2e-core sources are easy to build locally.  In the root of the repo there is a `buildall.sh` script that works.  So after you make your changes, run the buildall.sh script and there will be a local update site created as a zip file located here:  

You can point your eclipse install to this new updatesite zip file to do an update. 

However, when I tried to run the buildall.sh script just now, I get this error:

[INFO] Resolving dependencies of MavenProject: org.eclipse.m2e:org.eclipse.m2e.editor.lemminx:1.16.0-SNAPSHOT @ /Users/greg/repos/git.eclipse.org/m2e-core/org.eclipse.m2e.editor.lemminx/pom.xml
[INFO] {osgi.os=macosx, osgi.ws=cocoa, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: org.eclipse.m2e.editor.lemminx 1.16.0.qualifier
[ERROR]   Missing requirement: org.eclipse.m2e.editor.lemminx 1.16.0.qualifier requires 'osgi.bundle; org.eclipse.wildwebdeveloper.xml [0.8.0,0.9.0)' but it could not be found
[ERROR]
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: org.eclipse.m2e:org.eclipse.m2e.editor.lemminx:1.16.0-SNAPSHOT @ /Users/greg/repos/git.eclipse.org/m2e-core/org.eclipse.m2e.editor.lemminx/pom.xml: See log for details -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

So it seems there is a bug on master once the lemminx dependency was added.  Maybe one of the committers can help clean that up.

On Mon, Dec 21, 2020 at 10:21 AM Benoît Lacelle <benoit.lacelle@xxxxxxxxx> wrote:
Hello,

To test some developments in m2e-core, I was used to directly hack a .class into relevant jars. It seems that m2e jars are now signed. I tried removing the signature files, and the md5 from MANIFEST.MF, but m2e-core jar (i.e. the one I'm trying to hack) is not loading at all.

This process seems to work with Eclipse 2020-09 (and previous versions), but not anymore with Eclipse 2020-12.

I also tried replacing the jar in /plugins with a SNAPSHOT jar produced by a proper 'mvn clean verify' (which seems NOT to sign the jar), but without success:

org.osgi.framework.BundleException: Could not resolve module: org.eclipse.m2e.core.ui [252]
  Unresolved requirement: Require-Bundle: org.eclipse.m2e.core; bundle-version="[1.16.0,2.0.0)"

at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

The behavior is the same when I hacked a class, but kelt the signature files ( META-INF/*.RSA , META-INF/*.SF )

How can I easily test a small change over a class of m2e-core into a standard Eclipse install?

Thanks
--
Benoit Lacelle
+33 6 78 83 92 66
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/m2e-dev


--
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

Back to the top