在本地lean up是启动正常的
当使用lean deploy就出现部署失败,怎么破

✓ 获取应用信息
✓ 准备部署至目标应用:crab-social-dev (××××××××××)
✓ 获取应用分组信息
✓ 准备部署应用到生产环境: web
✓ 正在检测运行时
✓ 检测到 Java 运行时
✓ 压缩项目文件
✓ 上传应用文件 24.62 KB / 24.62 KB [=====================================] 100.00% 0s
✓ 开始构建 20161201-205032
✓ 正在下载应用代码 ...
✓ 正在解压缩应用代码 ...
✓ 运行环境: java-war (leanengine/java-war-base-8)
✓ 正在下载和安装依赖项 ...
部署失败:The command '/bin/sh -c chown leanengine:leanengine . && su leanengine -c 'mvn dependency:tree'' returned a non-zero code: 1:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for cn.leancloud.demo:java-war-getting-started:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 74, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
{ 一大段 下载 信息}

✓ 删除临时文件
部署失败


【12.02 上午10:00补充】
对于waring的信息,我已经在pom里面 添加了插件版本解决,
但是这个问题依然存在,盼回复:
The command '/bin/sh -c chown leanengine:leanengine . && su leanengine -c 'mvn dependency:tree'' returned a non-zero code: 1:


【12.02 上午10:10补充】
手动执行 mvn dependency:tree 是可以build成功的

你好,是因为我们的 mvn.leancloud.cn 的 Maven 仓库在同步公共仓库时撞墙了,我们做了处理,现在可以了。

怎么把应用部署到云代码

已经修改好了吗 为啥现在我还出现和楼主一样的问题

我尝试了自己的项目是可以的,麻烦提供下你的 pom.xml 我试试看。

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0

<groupId>cn.leancloud.demo</groupId>
<artifactId>java-war-getting-started</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<name>java-war-getting-started</name>

<properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<jettyVersion>9.3.10.v20160621</jettyVersion>
</properties>

<dependencies>
	<dependency>
		<groupId>cn.leancloud</groupId>
		<artifactId>leanengine</artifactId>
		<version>0.1.11</version>
	</dependency>
	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>4.12</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>javax.servlet</groupId>
		<artifactId>javax.servlet-api</artifactId>
		<version>3.1.0</version>
		<scope>provided</scope>
	</dependency>
	<dependency>  
        <groupId>commons-httpclient</groupId>  
        <artifactId>commons-httpclient</artifactId>  
    	<version>3.1</version>  
	</dependency> 
	<dependency>
	    <groupId>javax.ws.rs</groupId>
	    <artifactId>jsr311-api</artifactId>
	    <version>1.1.1</version>
	</dependency> 
	<dependency>
	    <groupId>org.springframework</groupId>
	    <artifactId>org.springframework.web</artifactId>
	    <version>3.2.0.RELEASE</version>
	</dependency> 
	<dependency>
	    <groupId>com.sun.jersey</groupId>
	    <artifactId>jersey-server</artifactId>
	    <version>1.15</version>
	</dependency>
</dependencies>

<build>
	<plugins>
		<plugin>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-maven-plugin</artifactId>
			<version>${jettyVersion}</version>
			<configuration>
				<webAppSourceDirectory>${project.basedir}/src/main/webapp</webAppSourceDirectory>
				<scanIntervalSeconds>3</scanIntervalSeconds>
				<stopKey>foo</stopKey>
				<stopPort>9999</stopPort>
				<httpConnector>
					<port>${env.LEANCLOUD_APP_PORT}</port>
				</httpConnector>
			</configuration>
			<executions>
				<execution>
					<id>start-jetty</id>
					<phase>pre-integration-test</phase>
					<goals>
						<goal>run</goal>
					</goals>
					<configuration>
						<scanIntervalSeconds>0</scanIntervalSeconds>
						<daemon>true</daemon>
					</configuration>
				</execution>
				<execution>
					<id>stop-jetty</id>
					<phase>post-integration-test</phase>
					<goals>
						<goal>stop</goal>
					</goals>
				</execution>
			</executions>
		</plugin>

		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
			</configuration>
		</plugin>
	</plugins>
</build>

你好,我尝试使用你提供的 pom 文件,本地执行 mvn package 结果如下:

[INFO] ------------------------------------------------------------------------
[INFO] Building java-war-getting-started 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/springframework/org.springframework.web/3.2.0.RELEASE/org.springframework.web-3.2.0.RELEASE.pom
[WARNING] The POM for org.springframework:org.springframework.web:jar:3.2.0.RELEASE is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/org/springframework/org.springframework.web/3.2.0.RELEASE/org.springframework.web-3.2.0.RELEASE.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.682 s
[INFO] Finished at: 2017-02-08T11:46:35+08:00
[INFO] Final Memory: 9M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project java-war-getting-started: Could not resolve dependencies for project cn.leancloud.demo:java-war-getting-started:war:0.0.1-SNAPSHOT: Could not find artifact org.springframework:org.springframework.web:jar:3.2.0.RELEASE in central (https://repo.maven.apache.org/maven2) -> [Help 1]

看起来是 org.springframework:org.springframework.web:jar:3.2.0.RELEASE 这个包有问题,看看能不能换一个版本,确认本地 package 的时候,能从 https://repo.maven.apache.org/maven2 顺利打包完成再尝试部署。

好的 谢谢了 已经解决了 本地能启动成功是因为本地的远程仓库用的阿里云的,阿里云有这个包官方远程仓库没有这个包