GithubHelp home page GithubHelp logo

m2e-discovery-catalog's Introduction

M2E Discovery Catalog

The M2E discovery catalog is a document that describes an association between specific Maven plugins and M2E connectors that cooperate with those Maven plugins to make integration between Maven on the CLI and Maven in Eclipse smoother. An example of an M2E connector is the the Tycho Configurator which tries to bridge the gap between Maven Tycho on the CLI and PDE within Eclipse. The discovery catalog attempts to assist users when they importing Maven projects by suggesting connectors that are relevant to the projects they are importing. If, for example, you import a Maven project using Tycho into your Eclipse workspace, the Tycho Configurator will be offered to you in order meld Maven with PDE.

As a normal Maven user in Eclipse there is nothing special you have to do. If you import a project type that has available connectors, they will be offered to you. The sections below are for those who want to add entries to the discovery catalog. You may be a developer of Maven plugins and have additionally created a M2E connector, or you might be adding an entry for some existing Eclipse integration that is known to work in conjunction with existing Maven plugins.

Testing the M2E Discovery Catalog as a User

If you know that one of the connectors you use has been updated in the staging catalog then you can try the new connector by specifying the staged catalog during the startup of Eclipse. by updating the eclipse.ini file in your Eclipse installation:

-vmargs
...
...
-Dm2e.discovery.url=http://download.eclipse.org/technology/m2e/discovery/directory-test-1.5.xml                                                                         

Adding New Discovery Catalog Entries

Adding new entries to the discovery catalog is a matter of creating a pull request with your new, well tested, entry. The process consists of making the appropriate edits to the connectors document, building the catalog, and testing the that the connector is available for your target project types and the import process works correctly.

While we would like to fully streamline the process of testing and pushing connectors into the publicly available catalog, this is what we have right now. As a developer of a connector, with the following instructions, you should be able to build the catalog locally with your changes and test that your connector is available from a publicly accessible site, will install, and works as expected.

New Connector Addition Process

Update the catalog with your entry

Clone the Git repository containing the catalog entries and publishing mechanism:

git clone [email protected]:takari/m2e-discovery-catalog.git

Edit the connectors.xml file with your catalog entry which is here.

Build the catalog

In the top level of the Git repository execute the following command:

mvn clean package

This will create the catalog and validate that all the update sites specified are accessible. This will also produce two catalog files that you can use for testing locally with only the file system.

Test your connector with Eclipse

Specify your newly built catalog by updating the eclipse.ini file in your Eclipse installation:

-vmargs
...
...

-Dm2e.discovery.url=file:/path/to/m2e-discovery-catalog/org.eclipse.m2e.discovery.oss/target/classes/catalog-1.5.xml                                                                              

Once you have tested your connector and feel that it's working as intended then submit a pull request and we will merge your catalog entry and publish a new catalog.

m2e-discovery-catalog's People

Contributors

andham avatar aneesh-joseph avatar belaeroess avatar bimargulies avatar bindul avatar bitstrings avatar davidb avatar dhuebner avatar fbricon avatar gamerson avatar hgschmie avatar ifedorenko avatar laeubi avatar martinlippert avatar mickaelistria avatar mpiggott avatar pyvesb avatar rgladwell avatar rtack avatar theit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m2e-discovery-catalog's Issues

build fails with Cannot find installable unit with id=org.codehaus.groovy.m2eclipse.feature.group

Loading bundle p2RepoUrl=http://dist.springsource.org/snapshot/GRECLIPSE/e4.3/, iuId=org.codehaus.groovy.m2eclipse, iuVersion=null
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] org.eclipse.m2e.discovery-directory ............... SUCCESS [ 0.003 s]
[INFO] org.eclipse.m2e.discovery.oss ..................... FAILURE [ 54.145 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.471 s
[INFO] Finished at: 2014-04-25T00:40:09+01:00
[INFO] Final Memory: 17M/331M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:0.0.1-SNAPSHOT:generate (catalog) on project org.eclipse.m2e.discovery.oss: Cannot find installable unit with id=org.codehaus.groovy.m2eclipse.feature.group, version=2.9.0.xx-20130828-1400-e43-RELEASE -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:0.0.1-SNAPSHOT:generate (catalog) on project org.eclipse.m2e.discovery.oss: Cannot find installable unit with id=org.codehaus.groovy.m2eclipse.feature.group, version=2.9.0.xx-20130828-1400-e43-RELEASE

still can not build the catalog locally

I get

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] org.eclipse.m2e.discovery-directory ................ SUCCESS [  0.155 s]
[INFO] org.eclipse.m2e.discovery.oss ...................... FAILURE [  0.525 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.094 s
[INFO] Finished at: 2014-09-12T12:15:34-07:00
[INFO] Final Memory: 15M/587M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.takari.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:0.1.0:generate (catalog) on project org.eclipse.m2e.discovery.oss: org.apache.maven.MavenExecutionException: Could not resolve tycho-p2-runtime: Missing:
[ERROR] ----------
[ERROR] 1) org.sonatype.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.p2.facade:jar:0.0.1-SNAPSHOT
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.sonatype.m2e.discovery.publisher -DartifactId=org.sonatype.m2e.discovery.publisher.p2.facade -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.sonatype.m2e.discovery.publisher -DartifactId=org.sonatype.m2e.discovery.publisher.p2.facade -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR] 
[ERROR] for artifact:
[ERROR] org.sonatype.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.p2.facade:jar:0.0.1-SNAPSHOT
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] c-central (http://nexus-dev/content/groups/public, releases=true, snapshots=false),
[ERROR] c-snapshots (http://nexus-dev/content/groups/public-snapshots, releases=false, snapshots=true),
[ERROR] central (http://nexus-dev/content/groups/public, releases=true, snapshots=false),
[ERROR] central-snapshots (http://nexus-dev/content/groups/public-snapshots, releases=false, snapshots=true),
[ERROR] tesla-snapshots (http://repository.takari.io:8081/nexus/content/repositories/snapshots/, releases=true, snapshots=true)
[ERROR] -> [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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.eclipse.m2e.discovery.oss

I can fix this locally by adding

diff --git a/pom.xml b/pom.xml
index a31b4ec..b430524 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,5 +85,21 @@
         <enabled>true</enabled>
       </snapshots>
     </pluginRepository>
+    <pluginRepository>
+      <id>sonatype-snapshots</id>
+      <url>https://repository.sonatype.org/content/repositories/snapshots/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </pluginRepository>
   </pluginRepositories>
-</project>
\ No newline at end of file
+  <repositories>
+    <repository>
+      <id>sonatype-snapshots</id>
+      <url>https://repository.sonatype.org/content/repositories/snapshots/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+</project>

to the main pom but that is clearly not the right fix (because there is an io.takari...:org.sonatype.m2e.discovery.publisher.p2.facade available but for whatever reason it is not used).

Create catalog for m2e 1.4

Seems that m2e v1.4 requires a separate catalog. It would be good to prepare for this before the release.

org.sonatype.plugins:maven-tinkerbell-plugin:0.0.1-SNAPSHOT not found in repo

/tmp/m2e-discovery-catalog$ mvn clean package
[INFO] Scanning for projects...
Downloading: http://repository.tesla.io:8081/nexus/content/repositories/snapshots/org/sonatype/plugins/maven-tinkerbell-plugin/0.0.1-SNAPSHOT/maven-metadata.xml
Downloading: http://repository.tesla.io:8081/nexus/content/repositories/snapshots/org/sonatype/plugins/maven-tinkerbell-plugin/0.0.1-SNAPSHOT/maven-tinkerbell-plugin-0.0.1-SNAPSHOT.pom
[WARNING] The POM for org.sonatype.plugins:maven-tinkerbell-plugin:jar:0.0.1-SNAPSHOT is missing, no dependency information available
Downloading: http://repository.tesla.io:8081/nexus/content/repositories/snapshots/org/sonatype/plugins/maven-tinkerbell-plugin/0.0.1-SNAPSHOT/maven-tinkerbell-plugin-0.0.1-SNAPSHOT.jar
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.eclipse.m2e:org.eclipse.m2e.discovery.oss:1.0.0-SNAPSHOT (/home/acraphae/devel/tmp/m2e-discovery-catalog/org.eclipse.m2e.discovery.oss/pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.sonatype.plugins:maven-tinkerbell-plugin:0.0.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.sonatype.plugins:maven-tinkerbell-plugin:jar:0.0.1-SNAPSHOT in tesla-snapshots (http://repository.tesla.io:8081/nexus/content/repositories/snapshots/) -> [Help 2]

Same problem as experienced in #26

mvn package isn't working due to undefined property

[INFO] Total time: 2.865s
[INFO] Finished at: Sun Nov 04 17:11:53 EST 2012
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:0.0.1-SNAPSHOT:generate (catalog) on project org.eclipse.m2e.discovery.oss: java.net.URISyntaxException: Illegal character in path at index 1: ${connectorUrl}/m2eclipse-tycho/0.6.0/N/0.6.0.201207302152/ -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :org.eclipse.m2e.discovery.oss

catalog no longer building

seems that the required snapshot is gone:

[ERROR] Plugin org.sonatype.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:0.0.1-SNAPSHOT or one of its dependencies could not be resolved: Failure to find org.sonatype.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:jar:0.0.1-SNAPSHOT in http://repository.tesla.io:8081/nexus/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of tesla-snapshots has elapsed or updates are forced -> [Help 1]

Trying to rebuild the plugin locally fails with

[ERROR] Internal error: java.lang.IllegalArgumentException: Comparison method violates its general contract! -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Comparison method violates its general contract!
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:166)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:835)
at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:453)
at java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:392)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:191)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
at java.util.Arrays.sort(Arrays.java:472)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector.hasValidMirror(MirrorSelector.java:317)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:517)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:576)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.getArtifact(MirrorRequest.java:248)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:223)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:179)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:115)
at org.sonatype.tycho.p2.maven.repository.MavenMirrorRequest.perform(MavenMirrorRequest.java:69)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:565)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifacts(SimpleArtifactRepository.java:616)
at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:305)
at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:305)
at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:305)
at org.sonatype.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:372)
at org.sonatype.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:319)
at org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:472)
at org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:151)
at org.codehaus.tycho.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:86)
at org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:94)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:310)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

Build failing due to missing dependency

Call to mvn clean package as per build instructions in README fails with the following error message:

[ERROR] Plugin io.takari.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:0.4.1 or one of its dependencies could not be resolved: Failure to find io.takari.m2e.discovery.publisher:org.sonatype.m2e.discovery.publisher.maven-plugin:jar:0.4.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

m2e-wtp in 1.1 catalog not compatible with m2e 1.3

Tried to install m2e-wtp from the 1.1 discovery catalog (which m2e v1.3 uses) in Juno SR2, but it doesn't work. I think it's because it's m2e-wtp 1.0.0 that is listed which requires m2e 1.4.
We should change so that a m2e-wtp version compatible with m2e 1.1-1.3 is listed in this discovery catalog.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.