【问题标题】:In tomcat i write tomcat:run , what should be in case of glass fish when building maven project in eclipse?在 tomcat 中我写 tomcat:run ,在 eclipse 中构建 maven 项目时玻璃鱼应该怎么办?
【发布时间】:2018-04-04 12:34:55
【问题描述】:

当我在 eclipse 中构建 maven 项目时,如果我在目标文本字段中使用 Glasss Fish,我应该写什么,就像我在使用 tomcat 服务器时写 tomcat:run 一样?

虚拟代码:

 FileWriter fstream = new FileWriter("F:\\vector_documents\\DevTest.txt", true);
        BufferedWriter fbw = new BufferedWriter(fstream);
        for (int i = 1; i <= 5; i++) {
            fbw.write(""+ colList.get(i).get(0)+"");
            fbw.write("^");
            fbw.write(""+ colList.get(i).get(1)+"");
            fbw.write("^");
            fbw.write(""+ colList.get(i).get(2)+"");
            fbw.write("^");
            fbw.write(""+ colList.get(i).get(3)+"");
            fbw.write("^");
            fbw.write(""+ colList.get(i).get(4)+"");
            fbw.newLine();

【问题讨论】:

  • 请忽略上面的代码,只有我需要更换 tomcat:run for glassfish 服务器

标签: java tomcat aero-glass


【解决方案1】:

这取决于您为 Glassfish 集成配置的 maven 插件。

如果您使用 org.glassfish:maven-embedded-glassfish-plugin 来提供嵌入式 Glassfish 服务器,则为:

mvn clean package embedded-glassfish:run

根据docs,插件为您提供了一些其他选项。

【讨论】:

  • 最后我通过以下步骤解决了我的问题:1.右键单击项目,2。转到运行方式,3.Maven Clean 然后,4。安装 Maven 然后重新启动 glassfish 服务器。
【解决方案2】:

最后我通过以下步骤解决了我的问题:

  1. 右键项目,

  2. 转到运行方式,

3.Maven 清洁,

4.Maven安装,

5.重新启动glassfish服务器

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-01-18
    • 1970-01-01
    • 2010-12-31
    • 1970-01-01
    • 2012-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多