【问题标题】:Start magnolia's project archetype from official catalog从官方目录开始 magnolia 的项目原型
【发布时间】:2018-03-14 08:15:04
【问题描述】:

场景 1

我正在按照official documentation 中描述的步骤进行操作,以便

  • 我从public catalog 中选择了 magnolia-project-archetype,版本 1.2.2
  • 项目结构与文档中的屏幕截图相匹配,eclipse 没有提示存在错误。
  • maven 全新安装构建成功。
  • 将 webapp 添加到 tomcat 服务器后,启动正常,控制台没有错误。

问题是,无论我尝试使用默认上下文根 (xyz-webapp),还是将其修改为 /,http://localhost:8080/ 仍然给出 404 错误,但在文档之后我应该进入安装页面。我做错了什么?


我正在使用

  • pom.xml:Magnolia 5.6 版和 java 1.8 版
  • 系统环境:Win10,tomcat 8.0.50 和 jre 1.8.0_161,mvn 3.5.2,eclipse 氧气

【问题讨论】:

    标签: maven magnolia


    【解决方案1】:

    发现这个旧的但 official screencast 正是我所追求的。在第一个场景中,在问题中提出,我从 Eclipse 添加了 Maven 原型模块。现在我跟着视频,所以我只使用 mvn 来设置项目:

    • mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/
    • cd 到基本目录
    • mvn 全新安装
    • cd 到 webapp 目录
    • mvn war:inplace
    • 删除 xyz-webapp\src\main\webapp\WEB-INF\lib

    现在将其导入 Eclipse 后,有一些问题需要解决

    • error unpacking magnolia-empty-webapp-5.6.war 我尝试运行 maven update 几次,不确定是否解决了它,但我不再得到这个了。
    • 像 groupId 这样的警告是在 parent 中定义的,在模块中不需要它,所以删除它们。
    • jackrabit-*.xml 文件中的 xml 错误,带有“引用的文件包含错误”。我不知道如何解决这些问题,让它们保持原样。
    • 无法将文件验证为 XML 定义 "...\templateModule\src\main\resources\META-INF\magnolia\module.dtd (The system cannot find the file specified)" that is specified as describing the syntax of the file cannot be located. templateModule.xml /templateModule/src/main/resources/META-INF/magnolia line 2 XML Problem
      • 第 2 行:<!DOCTYPE module SYSTEM "module.dtd" >
    • 现在运行服务器时,我至少收到一个错误:
      • ERROR info.magnolia.init.MagnoliaServletContextListener : Oops, Magnolia could not be started info.magnolia.module.model.reader.ModuleDependencyException: The following exceptions were found while checking Magnolia modules dependencies (i.e. those in META-INF/magnolia/my-module.xml): Module Magnolia Admincentral (version 5.6.0) is dependent on imaging (version 3.4/*), which was not found.
      • 所以我在/templateModule/pom.xml中添加了依赖magnolia-imaging

    现在它按预期启动了。

    【讨论】:

      猜你喜欢
      • 2013-09-23
      • 1970-01-01
      • 2012-08-18
      • 2017-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-24
      • 2011-03-15
      相关资源
      最近更新 更多