Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3875

Jersey project creation from archetype fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 11.3
    • None
    • projects - Maven
    • None

    Description

      1. New Project > Java with Maven > Project from Archetype
      2. Search forĀ jersey
      3. Select the first jersey-quickstart-archetype archetype item (group id: org.glassfish.jersey.archetypes version: 2.30)
      4. Press Next
      5. Choose foobar as Project Name
      6. Fill the other field and choose an empty directory as Project Location
      7. Press Finish

      The project generation fails complaining a folder with name foobar exists. An empty foobar folder is left in the choosen project location.

      ------------------------------------------------------------------------
      Building Maven Stub Project (No POM) 1
      ------------------------------------------------------------------------>>> maven-archetype-plugin:2.4:generate (default-cli) > generate-sources @ standalone-pom >>><<< maven-archetype-plugin:2.4:generate (default-cli) < generate-sources @ standalone-pom <<<--- maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom ---
      Generating project in Batch mode
      Archetype defined by properties
      ----------------------------------------------------------------------------
      Using following parameters for creating project from Old (1.x) Archetype: jersey-quickstart-webapp:2.30
      ----------------------------------------------------------------------------
      Parameter: basedir, Value: C:\Users\falappa\Documents\NetBeansProjects
      Parameter: package, Value: af.foobar
      Parameter: groupId, Value: af
      Parameter: artifactId, Value: foobar
      Parameter: packageName, Value: af.foobar
      Parameter: version, Value: 1.0-SNAPSHOT
      ------------------------------------------------------------------------
      BUILD FAILURE
      ------------------------------------------------------------------------
      Total time: 1.484 s
      Finished at: 2020-02-13T14:16:58+01:00
      Final Memory: 11M/40M
      ------------------------------------------------------------------------
      Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: Directory foobar already exists - please run from a clean directory -> [Help 1]To see the full stack trace of the errors, re-run Maven with the -e switch.
      Re-run Maven using the -X switch to enable full debug logging.For more information about the errors and possible solutions, please read the following articles:
      [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

      Probably the Maven from archetype wizard creates the folder prior to maven archetype execution.

      Not sure if this can be considered a bug in the jersey archetype instead.

      Attachments

        1. jersey-quickstart.PNG
          6 kB
          Ernie Rael

        Issue Links

          Activity

            People

              Unassigned Unassigned
              AlexFalappa Alessandro Falappa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: