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

[ERROR] No plugin found for prefix 'java2typescript' #45

Closed
ramaghanta opened this issue Aug 22, 2016 · 8 comments
Closed

[ERROR] No plugin found for prefix 'java2typescript' #45

ramaghanta opened this issue Aug 22, 2016 · 8 comments

Comments

@ramaghanta
Copy link

I have a java REST API for which I am trying to generate Typescript definitions. Following is my maven configuration, based on the available documentation.

...
<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>

<pluginRepositories>
  <pluginRepository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </pluginRepository>
</pluginRepositories>

<dependencies>
  <dependency>
    <groupId>com.github.raphaeljolivet.java2typescript</groupId>
    <artifactId>java2typescript-maven-plugin</artifactId>
    <version>v0.3.0.rc1</version>
  </dependency>
  ....
</dependencies>

<build>
  <plugins>
    ...
    <plugin>
      <groupId>java2typescript</groupId>
      <artifactId>java2typescript-maven-plugin</artifactId>
      <version>0.3-SNAPSHOT</version>
      <configuration>
        <serviceClass>com.checkdigit.luna.service.HSMService</serviceClass>
        <moduleName>HSMService</moduleName>
      </configuration>
    </plugin>
  </plugins>
</build>

When I execute 'mvn java2typescript:generate' I am getting the following error.

[INFO] Scanning for projects...
[WARNING] The POM for java2typescript:java2typescript-maven-plugin:jar:0.3-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for java2typescript:java2typescript-maven-plugin:0.3-SNAPSHOT: Plugin java2typescript:java2typescript-maven-plugin:0.3-SNAPSHOT or one of its dependencies could not be resolved: Failure to find java2typescript:java2typescript-maven-plugin:jar:0.3-SNAPSHOT in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io has elapsed or updates are forced
Downloading: https://jitpack.io/java2typescript/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/java2typescript/maven-metadata.xml
Downloading: https://jitpack.io/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://jitpack.io/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 25.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 1332.7 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.353 s
[INFO] Finished at: 2016-08-22T12:26:39-04:00
[INFO] Final Memory: 16M/619M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'java2typescript' in the current project and in the plugin groups [java2typescript, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/ramaghanta/.m2/repository), jitpack.io (https://jitpack.io), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException

I am not sure if something's wrong in my configuration. I really appreciate any help to fix this.

@atsu85
Copy link
Collaborator

atsu85 commented Aug 22, 2016

@ramaghanta,
I'm afraid You have incorrect groupId for plugin:
<groupId>java2typescript</groupId>.
That should be replaced with
<groupId>com.github.raphaeljolivet.java2typescript</groupId>.

Where did You get the groupId You used there? Are some instructions incorrect?

@ramaghanta
Copy link
Author

Unfortunately I couldn't find any documentation on the plugin configuration. So, I referred to https://github.com/raphaeljolivet/java2typescript/blob/master/sample-web-app/pom.xml.

Now, changing the groupId did not help fix the issue for me. Here is the log.

[INFO] Scanning for projects...
[WARNING] The POM for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:jar:0.3-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:0.3-SNAPSHOT: Plugin com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:0.3-SNAPSHOT or one of its dependencies could not be resolved: Failure to find com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:jar:0.3-SNAPSHOT in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io has elapsed or updates are forced
Downloading: https://jitpack.io/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/java2typescript/maven-metadata.xml
Downloading: https://jitpack.io/java2typescript/maven-metadata.xml
Downloading: https://jitpack.io/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 25.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 1249.5 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.341 s
[INFO] Finished at: 2016-08-22T13:32:15-04:00
[INFO] Final Memory: 16M/619M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'java2typescript' in the current project and in the plugin groups [java2typescript, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/ramaghanta/.m2/repository), jitpack.io (https://jitpack.io), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException

@atsu85
Copy link
Collaborator

atsu85 commented Aug 22, 2016

Another difference is
<version>0.3-SNAPSHOT</version>
compared to readme:

        <groupId>com.github.raphaeljolivet.java2typescript</groupId>
        <artifactId>java2typescript-maven-plugin</artifactId>
        <version>v0.3.0.rc1</version><!-- see notes bellow to get either snapshot or specific commit or tag or other version -->

@ramaghanta
Copy link
Author

ramaghanta commented Aug 22, 2016

@atsu85
Thanks for the quick response. I configured the 'dependencies' section based on readme. But since I couldn't find plugin instructions, I referred to the sample-web-app. Now, changing the version in plugin configuration didn't help either. Here is the error.

ramaghanta$ mvn java2typescript:generate
[INFO] Scanning for projects...
[WARNING] Failed to retrieve plugin descriptor for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:v0.3.0.rc1: Invalid plugin descriptor for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:v0.3.0.rc1 (/Users/ramaghanta/.m2/repository/com/github/raphaeljolivet/java2typescript/java2typescript-maven-plugin/v0.3.0.rc1/java2typescript-maven-plugin-v0.3.0.rc1.jar), Plugin's descriptor contains the wrong group ID: java2typescript, Plugin's descriptor contains the wrong version: 0.3-SNAPSHOT
Downloading: https://repo.maven.apache.org/maven2/java2typescript/maven-metadata.xml
Downloading: https://jitpack.io/java2typescript/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://jitpack.io/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://jitpack.io/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 25.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 1332.7 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.354 s
[INFO] Finished at: 2016-08-22T13:49:15-04:00
[INFO] Final Memory: 15M/619M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'java2typescript' in the current project and in the plugin groups [java2typescript, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/ramaghanta/.m2/repository), jitpack.io (https://jitpack.io), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException

atsu85 pushed a commit to atsu85/java2typescript that referenced this issue Aug 22, 2016
atsu85 pushed a commit to atsu85/java2typescript that referenced this issue Aug 22, 2016
atsu85 added a commit that referenced this issue Aug 22, 2016
@atsu85
Copy link
Collaborator

atsu85 commented Aug 22, 2016

Looks like maven plugins check group artifact and version of downloaded plugin metadata - if this doesn't match (as it was the case right now), then plugin won't be used.

I fixed this problem and updated the sample - take a look at it

@ramaghanta
Copy link
Author

Thank you for those updates @atsu85

For some strange reason, I can't get this to work and keep having the same issue [ERROR] No plugin found for prefix 'java2typescript' in the current project and in the plugin groups......

Just to rule out any dependencies or other issues, I just created a simple Java Hello World Program, copied the contents of sample-web-app/pom.xml into mine and tried to execute mvn -X java2typescript:generate and ended up with the same issue. Here is the complete log from executing mvn -X java2typescript:generate

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
Maven home: /usr/local/apache-maven-3.3.9
Java version: 1.8.0_102, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.4", arch: "x86_64", family: "mac"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
[DEBUG]   Imported: javax.enterprise.util.* < plexus.core
[DEBUG]   Imported: javax.inject.* < plexus.core
[DEBUG]   Imported: org.apache.maven.* < plexus.core
[DEBUG]   Imported: org.apache.maven.artifact < plexus.core
[DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
[DEBUG]   Imported: org.apache.maven.cli < plexus.core
[DEBUG]   Imported: org.apache.maven.configuration < plexus.core
[DEBUG]   Imported: org.apache.maven.exception < plexus.core
[DEBUG]   Imported: org.apache.maven.execution < plexus.core
[DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG]   Imported: org.apache.maven.model < plexus.core
[DEBUG]   Imported: org.apache.maven.monitor < plexus.core
[DEBUG]   Imported: org.apache.maven.plugin < plexus.core
[DEBUG]   Imported: org.apache.maven.profiles < plexus.core
[DEBUG]   Imported: org.apache.maven.project < plexus.core
[DEBUG]   Imported: org.apache.maven.reporting < plexus.core
[DEBUG]   Imported: org.apache.maven.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG]   Imported: org.apache.maven.settings < plexus.core
[DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
[DEBUG]   Imported: org.apache.maven.usability < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG]   Imported: org.codehaus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.* < plexus.core
[DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
[DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
[DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
[DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
[DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
[DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.version < plexus.core
[DEBUG]   Imported: org.slf4j.* < plexus.core
[DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
[DEBUG]   Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/local/apache-maven-3.3.9/conf/settings.xml
[DEBUG] Reading user settings from /Users/ramaghanta/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/local/apache-maven-3.3.9/conf/toolchains.xml
[DEBUG] Reading user toolchains from /Users/ramaghanta/.m2/toolchains.xml
[DEBUG] Using local repository at /Users/ramaghanta/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/ramaghanta/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project java2typescript.sample:java2typescript.sample:jar:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[WARNING]
[WARNING] Some problems were encountered while building the effective model for java2typescript.sample:java2typescript.sample:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 108, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[DEBUG] Resolving plugin prefix java2typescript from [java2typescript, org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Could not find metadata java2typescript:java2typescript:0.3-SNAPSHOT/maven-metadata.xml in local (/Users/ramaghanta/.m2/repository)
[DEBUG] Failure to find java2typescript:java2typescript:0.3-SNAPSHOT/maven-metadata.xml in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io2 has elapsed or updates are forced
[WARNING] Failed to retrieve plugin descriptor for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:v0.3.0.rc2: Plugin com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:v0.3.0.rc2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:jar:v0.3.0.rc2
org.apache.maven.plugin.PluginResolutionException: Plugin com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:v0.3.0.rc2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:jar:v0.3.0.rc2
        at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:117)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:179)
        at org.apache.maven.plugin.DefaultBuildPluginManager.loadPlugin(DefaultBuildPluginManager.java:83)
        at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject(DefaultPluginPrefixResolver.java:138)
        at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject(DefaultPluginPrefixResolver.java:121)
        at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:85)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:265)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:219)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        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: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.github.raphaeljolivet.java2typescript:java2typescript-maven-plugin:jar:v0.3.0.rc2
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:329)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:287)
        at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:103)
        ... 24 more
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Failure to find java2typescript:java2typescript:pom:0.3-SNAPSHOT in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io2 has elapsed or updates are forced
        at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:177)
        at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:226)
        at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:1000)
        at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:800)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:329)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:320)
        ... 27 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find java2typescript:java2typescript:pom:0.3-SNAPSHOT in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io2 has elapsed or updates are forced
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
        at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:173)
        ... 32 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find java2typescript:java2typescript:pom:0.3-SNAPSHOT in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io2 has elapsed or updates are forced
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
        ... 35 more
[DEBUG] Could not find metadata java2typescript/maven-metadata.xml in local (/Users/ramaghanta/.m2/repository)
[DEBUG] Failure to find java2typescript/maven-metadata.xml 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
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (/Users/ramaghanta/.m2/repository)
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/Users/ramaghanta/.m2/repository)
[DEBUG] Skipped remote request for org.codehaus.mojo/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://jitpack.io
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://jitpack.io
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://jitpack.io
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://jitpack.io
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://jitpack.io
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://jitpack.io
Downloading: https://jitpack.io/org/codehaus/mojo/maven-metadata.xml
Downloading: https://jitpack.io/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://jitpack.io/java2typescript/maven-metadata.xml
[DEBUG] Writing tracking file /Users/ramaghanta/.m2/repository/java2typescript/resolver-status.properties
[DEBUG] Writing tracking file /Users/ramaghanta/.m2/repository/org/apache/maven/plugins/resolver-status.properties
[DEBUG] Writing tracking file /Users/ramaghanta/.m2/repository/org/codehaus/mojo/resolver-status.properties
[DEBUG] Could not find metadata java2typescript/maven-metadata.xml in jitpack.io2 (https://jitpack.io)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in jitpack.io2 (https://jitpack.io)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in jitpack.io2 (https://jitpack.io)
[DEBUG] Could not find metadata java2typescript/maven-metadata.xml in local (/Users/ramaghanta/.m2/repository)
[DEBUG] Skipped remote request for java2typescript/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find java2typescript/maven-metadata.xml in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io2 has elapsed or updates are forced
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (/Users/ramaghanta/.m2/repository)
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io2 has elapsed or updates are forced
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/Users/ramaghanta/.m2/repository)
[DEBUG] Skipped remote request for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io2 has elapsed or updates are forced
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/java2typescript/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Writing tracking file /Users/ramaghanta/.m2/repository/java2typescript/resolver-status.properties
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 188.6 KB/sec)
[DEBUG] Writing tracking file /Users/ramaghanta/.m2/repository/org/apache/maven/plugins/resolver-status.properties
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 289.7 KB/sec)
[DEBUG] Writing tracking file /Users/ramaghanta/.m2/repository/org/codehaus/mojo/resolver-status.properties
[DEBUG] Could not find metadata java2typescript/maven-metadata.xml in central (https://repo.maven.apache.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.744 s
[INFO] Finished at: 2016-08-22T17:06:03-04:00
[INFO] Final Memory: 14M/619M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'java2typescript' in the current project and in the plugin groups [java2typescript, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/ramaghanta/.m2/repository), jitpack.io2 (https://jitpack.io), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'java2typescript' in the current project and in the plugin groups [java2typescript, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/ramaghanta/.m2/repository), jitpack.io2 (https://jitpack.io), central (https://repo.maven.apache.org/maven2)]
        at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:93)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:265)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:219)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        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)
[ERROR]
[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/NoPluginFoundForPrefixException

And my pom.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>java2typescript.sample</groupId>
    <artifactId>java2typescript.sample</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>sample-webapp</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <org.apache.cxf.version>2.7.2</org.apache.cxf.version>
        <org.springframework.version>3.2.0.RELEASE</org.springframework.version>
        <org.eclipse.jetty.version>8.1.8.v20121106</org.eclipse.jetty.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            <version>${org.apache.cxf.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-jaxrs</artifactId>
            <version>1.9.11</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.11</version>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>2.2</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${org.eclipse.jetty.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
            <version>${org.eclipse.jetty.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>${org.eclipse.jetty.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.raphaeljolivet.java2typescript</groupId>
                <artifactId>java2typescript-maven-plugin</artifactId>
                <version>v0.3.0.rc2</version>
                <configuration>
                    <serviceClass>com.checkdigit.sample.HelloWorld</serviceClass>
                    <moduleName>HelloWorld</moduleName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.example.Starter</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>jitpack.io2</id>
            <name>jitpack.io Plugin Repository</name>
            <url>https://jitpack.io</url>
            <layout>default</layout>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <updatePolicy>always</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>
</project>

@atsu85 atsu85 closed this as completed in c388b90 Aug 23, 2016
atsu85 added a commit that referenced this issue Aug 23, 2016
fix #45 - added maven project groupId prefix "com.github.raphaeljoliv…
@atsu85 atsu85 mentioned this issue Aug 23, 2016
@atsu85
Copy link
Collaborator

atsu85 commented Aug 23, 2016

@ramaghanta, sorry for the late answer. Now You should be able to use the plugin as well if You use version v0.3.0 (at least this time I got successful build of sample webapp even after wiping local maven repository that made me believe last time that everything was OK).

I had to change groupId and version for whole project, as the groupId, artifact and version used to download the maven plugin must match the plugin metadata (that doesn't seem to be the case for jar files that I use myself).

@atsu85 atsu85 mentioned this issue Aug 23, 2016
@ramaghanta
Copy link
Author

@atsu85, That worked for me. Thanks a lot for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants