Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4708

struts2-archetype-blank not found for struts v2.5.5

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.5
    • Fix Version/s: 2.5.8
    • Component/s: None
    • Labels:
      None

      Description

      Following the steps in the developer guide, I tried to generate the "blank" sample app using the archetype catalog, but I receive an error when choosing any of the options.

      For example, when I run the following command:

      mvn archetype:generate -DarchetypeCatalog=http://struts.apache.org/
      

      I get a list of archetypes, as expected.

      Choose archetype:
      1: http://struts.apache.org/ -> org.apache.struts:struts2-archetype-blank (Struts 2 Archetypes - Blank)
      2: http://struts.apache.org/ -> org.apache.struts:struts2-archetype-convention (Struts 2 Archetypes - Blank Convention)
      3: http://struts.apache.org/ -> org.apache.struts:struts2-archetype-dbportlet (Struts 2 Archetypes - Database Portlet)
      4: http://struts.apache.org/ -> org.apache.struts:struts2-archetype-plugin (Struts 2 Archetypes - Plugin)
      5: http://struts.apache.org/ -> org.apache.struts:struts2-archetype-portlet (Struts 2 Archetypes - Portlet)
      6: http://struts.apache.org/ -> org.apache.struts:struts2-archetype-starter (Struts 2 Archetypes - Starter)
      Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): :

      However, when choosing any of the options (e.g. the "blank" webapp), I get the following response:

      Downloading: https://repository.apache.org/content/groups/public/org/apache/struts/struts2-archetype-blank/2.5.5/struts2-archetype-blank-2.5.5.jar
      Downloading: https://repo.maven.apache.org/maven2/org/apache/struts/struts2-archetype-blank/2.5.5/struts2-archetype-blank-2.5.5.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 29.977 s
      [INFO] Finished at: 2016-11-01T14:22:59-07:00
      [INFO] Final Memory: 17M/305M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.struts:struts2-archetype-blank:2.5.5) -> [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/MojoFailureException
      

      The archtype:generate goal does work when I specify v2.5.1 instead.

        Issue Links

          Activity

          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Yeah, it's a bug. I have already fixed it but didn't release a new version of archetypes

          Show
          lukaszlenart Lukasz Lenart added a comment - Yeah, it's a bug. I have already fixed it but didn't release a new version of archetypes
          Hide
          jtdevos Jim deVos added a comment -

          Hi Lukasz, thanks for the update. It looks like the maven successfully generates the archetype app (I chose the option 1, the 'blank' webapp). However, when I try to build (e.g. 'mvn install jetty:run') I get the following error:

          [ERROR] The build could not read 1 project -> [Help 1]
          [ERROR]   
          [ERROR]   The project us.youfailed:blankapp:1.0-SNAPSHOT (/Users/jimdevos/temp/struts/blankapp/pom.xml) has 3 errors
          [ERROR]     Resolving expression: '${log4j2.version}': Detected the following recursive expression cycle in 'log4j2.version': [log4j2.version] -> [Help 2]
          [ERROR]     Resolving expression: '${log4j2.version}': Detected the following recursive expression cycle in 'log4j2.version': [log4j2.version] -> [Help 2]
          [ERROR]     'dependencies.dependency.version' for org.apache.logging.log4j:log4j-core:jar must be a valid version but is '${log4j2.version}'. @ line 41, column 22
          

          Indeed, it does look like the log4j property definition is circular (unless it's meant to be a sub-project?).

              <properties>
                  <struts2.version>2.5.5</struts2.version>
                  <log4j2.version>${log4j2.version}</log4j2.version>
                  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
              </properties>
          

          It's not a big deal as I can easily change the property to a valid log4j version number. Still, is this a bug, or am I doing something wrong?

          Show
          jtdevos Jim deVos added a comment - Hi Lukasz, thanks for the update. It looks like the maven successfully generates the archetype app (I chose the option 1, the 'blank' webapp). However, when I try to build (e.g. 'mvn install jetty:run') I get the following error: [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project us.youfailed:blankapp:1.0-SNAPSHOT (/Users/jimdevos/temp/struts/blankapp/pom.xml) has 3 errors [ERROR] Resolving expression: '${log4j2.version}': Detected the following recursive expression cycle in 'log4j2.version': [log4j2.version] -> [Help 2] [ERROR] Resolving expression: '${log4j2.version}': Detected the following recursive expression cycle in 'log4j2.version': [log4j2.version] -> [Help 2] [ERROR] 'dependencies.dependency.version' for org.apache.logging.log4j:log4j-core:jar must be a valid version but is '${log4j2.version}'. @ line 41, column 22 Indeed, it does look like the log4j property definition is circular (unless it's meant to be a sub-project?). <properties> <struts2.version>2.5.5</struts2.version> <log4j2.version>${log4j2.version}</log4j2.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> It's not a big deal as I can easily change the property to a valid log4j version number. Still, is this a bug, or am I doing something wrong?
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          Done, new archetypes were published

          Show
          lukaszlenart Lukasz Lenart added a comment - Done, new archetypes were published
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          This broken by separating archetypes from the main project, Vote in progress to release the new version of archetypes
          http://markmail.org/thread/bob7jx7yur6fjve7

          Show
          lukaszlenart Lukasz Lenart added a comment - This broken by separating archetypes from the main project, Vote in progress to release the new version of archetypes http://markmail.org/thread/bob7jx7yur6fjve7
          Hide
          jtdevos Jim deVos added a comment -

          I'm not sure if this is relevant or not, but after getting an older v2.5.1 archetype to successfully build I tried "cheating" by changing the dependencies in the sample app's pom.xml to use struts v.2.5.5 (hoping that the application source would build using the v2.5.5 libraries). I can successfully run "mvn clean install", but when I try "mvn jetty:run" I get numerous InvocationTargetException's.

          Show
          jtdevos Jim deVos added a comment - I'm not sure if this is relevant or not, but after getting an older v2.5.1 archetype to successfully build I tried "cheating" by changing the dependencies in the sample app's pom.xml to use struts v.2.5.5 (hoping that the application source would build using the v2.5.5 libraries). I can successfully run "mvn clean install", but when I try "mvn jetty:run" I get numerous InvocationTargetException's.

            People

            • Assignee:
              Unassigned
              Reporter:
              jtdevos Jim deVos
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development