Sts4: Cannot install AJDT tools

Created on 26 Dec 2018  路  7Comments  路  Source: spring-projects/sts4

An AspectJ project shows this error:

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.10:compile (execution: default, phase: compile)

Try to follow the quick fix to install it and got:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Maven Integration for AJDT (Optional) 0.14.0.201506231302 (org.maven.ide.eclipse.ajdt.feature.feature.group 0.14.0.201506231302)
  Missing requirement: Maven Integration for AJDT (Optional) 0.14.0.201506231302 (org.maven.ide.eclipse.ajdt.feature.feature.group 0.14.0.201506231302) requires 'org.eclipse.equinox.p2.iu; org.eclipse.ajdt.core 1.5.0' but it could not be found

Most helpful comment

OK, the problem is not the AJDT m2e connector being outdated or the wrong one, but that it cannot be installed because there is no p2 repository configured from where it can get AJDT itself from (since that is NOT pre-installed in the STS4 distribution).

You can fix that quickly by adding this p2 repository to the Preferences -> Install/Update -> Available Update Sites:

If you hit the quick fix afterwards, it will install the AJDT tooling as well as the m2e connector for it.

All 7 comments

Can you share a sample project?

Forget my comment, found a simple way to create a project myself... :-)

The quick fix way to install the m2e connector seems indeed be super outdated... :-( Now need to find a way to fix the quick fix...

OK, the problem is not the AJDT m2e connector being outdated or the wrong one, but that it cannot be installed because there is no p2 repository configured from where it can get AJDT itself from (since that is NOT pre-installed in the STS4 distribution).

You can fix that quickly by adding this p2 repository to the Preferences -> Install/Update -> Available Update Sites:

If you hit the quick fix afterwards, it will install the AJDT tooling as well as the m2e connector for it.

That got me a bit further. THen it fails like this:

An error occurred while collecting items to be installed
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.aspectj.ajde,1.9.2.201811011643
No repository found containing: org.eclipse.update.feature,org.aspectj,1.9.2.201811011643
No repository found containing: osgi.bundle,org.aspectj.runtime,1.9.2.201811011643
No repository found containing: osgi.bundle,org.aspectj.weaver,1.9.2.201811011643
No repository found containing: osgi.bundle,org.eclipse.ajdt.core,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.ajdt.doc.user,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.ajdt.examples,2.2.4.201811011643
No repository found containing: org.eclipse.update.feature,org.eclipse.ajdt,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.ajdt.ui,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.aspectj,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.contribution.visualiser,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.contribution.weaving.jdt,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.contribution.xref.core,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.contribution.xref.ui,2.2.4.201811011643
No repository found containing: osgi.bundle,org.eclipse.equinox.weaving.aspectj,1.0.400.201811011643
No repository found containing: osgi.bundle,org.eclipse.equinox.weaving.caching,1.1.100.v20171221-2204
No repository found containing: osgi.bundle,org.eclipse.equinox.weaving.hook,1.2.100.v20171221-2204
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.weaving.sdk,1.2.0.201811011643****

That looks like a problem with stale cache data. The easiest way to solve that is to go to the preferences, export all the update sites from that Available Update Sites by selecting all and exporting them to a temp XML file, delete them all from the preferences, restart STS4, then re-import them all from that XML file (all from within that preference page, there are export and import buttons).

I managed to get it installed I think, without the XML trick - just hit "Reload" on the update site.

Sometimes that works, too, but only in rare cases. Glad to hear you got it working.

Was this page helpful?
0 / 5 - 0 ratings