Community
Participate
Working Groups
In the org.eclipse.m2e.core there is an extensions point that allows a plugin to contribute a set of predefined indexes. This extension point is marked as deprecated, but it only seems to work for browsing within the Maven Repositories View. The added repositories are never considered when trying to resolve dependencies. While the work around is to have people create a settings.xml or add the repositories to their existing settings.xml, this isn't ideal for getting people up and running quickly. Ideally, I'd like to have an extension point that could be contributed to the maven indexer, and then used during the build as if it was part of settings.xml, but the plugin contributes the location. Since m2e eclipse is not backwards compatible with the 0.12 series or before, I'd suggest removing the indexes extension point all together since it seems to be worthless at this point.
(In reply to comment #0) > > Ideally, I'd like to have an extension point that could be contributed to the > maven indexer, and then used during the build as if it was part of > settings.xml, but the plugin contributes the location. > Can you explain a usecase that requires this behaviour? If we enable this, projects that build inside eclipse will not build on command line. I don't see when this can be useful.
JBoss Tools uses that extension point to let users quickly search for JBoss artefacts (https://issues.jboss.org/browse/JBIDE-9688). For JBoss artifacts (org.jboss.*) which are not resolvable by maven, we have a quick fix that explains the user how to set up his settings.xml (https://issues.jboss.org/browse/JBIDE-9921), along with code completion templates to add the JBoss repos to the <repositories> section in settings.xml or pom.xml (https://issues.jboss.org/browse/JBIDE-9321). All that to say we (JBoss) are in favor of keeping the existing extension point;
(In reply to comment #1) > (In reply to comment #0) > > > > Ideally, I'd like to have an extension point that could be contributed to the > > maven indexer, and then used during the build as if it was part of > > settings.xml, but the plugin contributes the location. > > > > Can you explain a usecase that requires this behaviour? If we enable this, > projects that build inside eclipse will not build on command line. I don't see > when this can be useful. We have a set of eclipse plugins that work with maven, they add items to the pom.xml files for the builds. The end client wants to get people up and running within eclipse quickly without having to have the user change their settings.xml to include the repositories needed. Unfortunately the items aren't deployed to Maven Central which would be the ideal solution and eliminate the need to modify the settings.xml file or provide a custom settings.xml. Basically they want to do everything within the IDE and aren't as concerned about the command line build. In general they setup a settings.xml file for the build system, and consider. They also don't want to add the repository entries to the pom.xml. Given these constraints it would be nice to have the option of adding custom repositories to dependency resolution within the IDE. Even if this is just a preference setting.
(In reply to comment #2) > JBoss Tools uses that extension point to let users quickly search for JBoss > artefacts (https://issues.jboss.org/browse/JBIDE-9688). For JBoss artifacts > (org.jboss.*) which are not resolvable by maven, we have a quick fix that > explains the user how to set up his settings.xml > (https://issues.jboss.org/browse/JBIDE-9921), along with code completion > templates to add the JBoss repos to the <repositories> section in settings.xml > or pom.xml (https://issues.jboss.org/browse/JBIDE-9321). > > All that to say we (JBoss) are in favor of keeping the existing extension > point; Well the existing index extension point is marked as Deprecated with documentation saying it is going to be replaced. However this has been like this since 0.9 of m2eclipse. If the index extension point isn't really deprecated then the exsd should be updated to indicate it as such and add the missing documentation around it's usage.
(In reply to comment #3) > > Basically they want to do everything within the IDE and aren't as concerned > about the command line build. In general they setup a settings.xml file for > the build system, and consider. They also don't want to add the repository > entries to the pom.xml. This seems like an odd attitude, to be honest. Why bother with Maven if you can't use it to actually build the projects? It may make sense for this particular project or set of projects, but I don't think this is generally useful. > Given these constraints it would be nice to have the option of adding custom > repositories to dependency resolution within the IDE. Even if this is just a > preference setting. m2e-specific repository configuration will be too confusing. You need to either modify pom.xml, like jbosstools does, or modify settings.xml, if the client insists on semi-broken project configuration.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/