eclipse-ee4j / starter

Eclipse Starter for Jakarta EE
Eclipse Public License 2.0
50 stars 40 forks source link

The command in the official tutorial to generate an example project just gives "No plugin found for prefix 'payara-micro'" error #166

Closed liyi93319 closed 1 year ago

liyi93319 commented 1 year ago

env: Maven 3.3.3 Java 17.0.5

The following command from the official tutorial (https://start.jakarta.ee/)

mvn archetype:generate -DarchetypeGroupId=org.eclipse.starter -DarchetypeArtifactId=jakartaee10-minimal -DarchetypeVersion=1.1.0 -DgroupId=com.example -DartifactId=demo -Dprofile=api -Dversion=1.0.0-SNAPSHOT -DinteractiveMode=false

generates a Jakarta EE project under the directory demo rather than jakartaee-cafe as the tutorial describes.

It does make sense since -DartifactId=demo.

steps enter the demo directory and run mvn clean package payara-micro:start

expected result the example project starts up as the tutorial describes

actual result

[ERROR] No plugin found for prefix 'payara-micro' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]

How do I get a runnable example project?

scottkurz commented 1 year ago

Noticing the same thing, you could do:

mvn clean package fish.payara.maven.plugins:payara-micro-maven-plugin:start

liyi93319 commented 1 year ago

@scottkurz thanks for your reply. with your suggestion I got this

[INFO] Resolving fish.payara.extras:payara-micro:jar:5.2021.5
[WARNING] Error injecting: org.apache.maven.shared.transfer.artifact.resolve.internal.Maven31ArtifactResolver
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting: private org.eclipse.aether.spi.log.Logger org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger
  while locating org.apache.maven.repository.internal.DefaultVersionRangeResolver
  while locating java.lang.Object annotated with *
  at org.eclipse.sisu.wire.LocatorWiring
  while locating org.eclipse.aether.impl.VersionRangeResolver
    for parameter 2 at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.<init>(Unknown Source)
  while locating org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector
  while locating java.lang.Object annotated with *
  at org.eclipse.sisu.wire.LocatorWiring
  while locating org.eclipse.aether.impl.DependencyCollector
    for parameter 5 at org.eclipse.aether.internal.impl.DefaultRepositorySystem.<init>(Unknown Source)
  while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
  while locating java.lang.Object annotated with *
  while locating org.apache.maven.shared.transfer.artifact.resolve.internal.Maven31ArtifactResolver
Caused by: java.lang.IllegalArgumentException: Can not set org.eclipse.aether.spi.log.Logger field org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger to org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory

Am I missing something?

scottkurz commented 1 year ago

@liyi93319 I'm not sure. I did reach out to the JakartaEE Slack channel and heard back that there seem to be a number of changes piled up at the moment, but not sure how close they are to completion. (If you want to look: https://eclipsefoundationhq.slack.com/archives/C047MCS83FT/p1671128565880809)

m-reza-rahman commented 1 year ago

I think we have a number of bugs that need to be holistically looked at. We should be able to do that shortly. Right now we are trying to figure out overall project direction. That’s almost done in my view.

m-reza-rahman commented 1 year ago

This should be all sorted now. Can you please check the master branch content and probably close this?

scottkurz commented 1 year ago

I think we can close this (if we ignore the https://start.jakarta.ee/ content and just build and install the archetypes locally from master and test).

E.g. I did:

  1. mvn archetype:generate -DarchetypeGroupId="org.eclipse.starter" -DarchetypeArtifactId="jakarta-starter" -DarchetypeVersion="2.0-SNAPSHOT" -Druntime=payara -DartifactId=p1 -DjakartaVersion=9.1 -Dprofile=web
  2. ./mvnw clean package payara-micro:start

and it worked fine

m-reza-rahman commented 1 year ago

Closing as fixed, please re-open if needed. We are working on updating the UI shortly and doing a 2.0 release to update start.jakarta.ee.