• mvn install报错


    好不容易第一次部署运行报错:

    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 15:47 min
    [INFO] Finished at: 2019-03-10T21:26:26+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project hello1: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy failed: Failed to create deployer with implementation class org.codehaus.cargo.container.glassfish.GlassFish4xInstalledLocalDeployer for the parameters (container [id = [glassfish4x]], deployer type [installed]).: InvocationTargetException: The container configuration directory "c://glassfish5/glassfish/domains" does not exist. Please configure the container before attempting to perform any local deployment. Read more on: http://cargo.codehaus.org/Local+Configuration -> [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/PluginExecutionException

    解决:

    编辑下图文件

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <parent>
            <artifactId>jsf</artifactId>
            <groupId>org.glassfish.javaeetutorial</groupId>
            <version>8.1-SNAPSHOT</version>
        </parent>
        
        <groupId>org.glassfish.javaeetutorial</groupId>
        <artifactId>hello1</artifactId>
        <version>8.1-SNAPSHOT</version>
        <packaging>war</packaging>
    
        <name>${project.artifactId}</name>
    <build>
      <defaultGoal>compile</defaultGoal>
    </build>
    <profiles>
        <profile>
    		<id>windows</id>
    		<activation>
    			<os>
    				<family>windows</family>
    			</os>
    		</activation>
    		<properties>
    			<glassfish.home>E:Program Files (x86)glassfishglassfish5</glassfish.home>
    		</properties>
    	</profile>
    </profiles>  
    
    </project>
    

    增加16-31行

    更改下面的地址为自己的glassfish地址

    <glassfish.home>E:Program Files (x86)glassfishglassfish5</glassfish.home>
  • 相关阅读:
    【Java】IO流--文件夹的复制
    【Java】IO流--序列化与反序列化
    【Java】Java中的数组是对象吗?(转载)
    【Java】Java漫谈-数组(转载)
    【Java】IO流--对象流--ObjectInputStream、ObjectOutputStream
    【Java】IO流--数据流--DataInputStream、DataOutputStream
    【Java】IO流--打印流--PrintStream
    【Java】IO流--转换流--InpuStreamReader、OutputStreamWriter
    CentOS快速安装Nginx的方法,nginx如何启动重启停止
    Mac查看端口号是否被占用及释放
  • 原文地址:https://www.cnblogs.com/xiaohuomiao/p/10507809.html
Copyright © 2020-2023  润新知