2014-11-08 22 views
0

我試圖用命令mvn appengine:gcloud_app_run運行https://github.com/GoogleCloudPlatform/appengine-java-vm-hello。 appengine-maven-plugin使用gcloud command line tools。但是,在1.9.15版本中,目前有一個錯誤,它不允許您使用unix:\\\套接字作爲您的$DOCKER_HOST。一個補丁已經寫好,我被要求測試它;消息如下。如何使用SNAPSHOT進行測試,並在何處放置<pluginRepository>?

Can you test 1.9.16-SNAPSHOT with 

    <pluginRepositories> 
    <pluginRepository> 
     <id>sonatype-nexus-snapshots</id> 
     <name>Sonatype Nexus Snapshots</name> 
     <url>https://oss.sonatype.org/content/repositories/google-snapshots/</url> 
     <snapshots> 
     <enabled>true</enabled> 
     <updatePolicy>always</updatePolicy> 
     </snapshots> 
    </pluginRepository> 
    </pluginRepositories> 
? 

我曾嘗試把<pluginRepositories><project>水平我pom.xml的直接孩子;它似乎接受,雖然我仍然有故障運行mvn appengine:gcloud_app_run時:

[INFO] File "/home/stephen/google-cloud-sdk/lib/docker/docker/tls.py", line 41, in init [INFO] 'Path to a certificate and key files must be provided' [INFO] docker.docker.errors.TLSParameterError: Path to a certificate and key files must be provided through the client_config param. TLS configurations should map the Docker CLI client configurations. See http://docs.docker.com/examples/https/ for API details. [ERROR] Error: gcloud app run exit code= 1

然後我想在我的pom.xml文件改變<appengine.target.version>1.9.15</appengine.target.version>1.9.16-SNAPSHOT;這個時候運行mvn appengine:gcloud_app_run我得到:

[ERROR] Failed to execute goal on project hello: Could not resolve dependencies for project com.google.appengine.demos:hello:war:1.0-SNAPSHOT: Could not find artifact com.google.appengine:appengine-api-1.0-sdk:jar:1.9.16-SNAPSHOT -> [Help 1]

所以,我不知道我在做什麼。具體來說,我不知道如何升級到SNAPSHOT或者我把這個<pluginRepositories>的東西。如果你能解決這個問題,我會非常感激這裏的解釋或鏈接,因爲顯然有一些我沒有的背景知識。

回答

0

我想通過隨機嘗試的東西。這是我的pom.xml,更改的部分是包含<pluginRepository>和字符串1.9.15更改爲1.9.16-SNAPSHOT

<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> 
    <packaging>war</packaging> 
    <version>1.0-SNAPSHOT</version> 

    <groupId>com.google.appengine.demos</groupId> 
    <artifactId>hello</artifactId> 

    <pluginRepositories> 
    <pluginRepository> 
     <id>sonatype-nexus-snapshots</id> 
     <name>Sonatype Nexus Snapshots</name> 
     <url>https://oss.sonatype.org/content/repositories/google-snapshots/</url> 
     <snapshots> 
     <enabled>true</enabled> 
     <updatePolicy>always</updatePolicy> 
     </snapshots> 
    </pluginRepository> 
    </pluginRepositories> 

    <properties> 
    <appengine.target.version>1.9.15</appengine.target.version> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    </properties> 

    <dependencies> 
    <!-- Compile/runtime dependencies --> 
    <dependency> 
     <groupId>com.google.appengine</groupId> 
     <artifactId>appengine-api-1.0-sdk</artifactId> 
     <version>${appengine.target.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>servlet-api</artifactId> 
     <version>2.5</version> 
     <scope>provided</scope> 
    </dependency> 
    </dependencies> 

    <build> 
    <outputDirectory>target/${project.artifactId}-${project.version}/WEB-INF/classes</outputDirectory> 
    <plugins> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <version>2.5.1</version> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <configuration> 
      <source>1.7</source> 
      <target>1.7</target> 
     </configuration> 
     </plugin> 

     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-war-plugin</artifactId> 
     <version>2.5</version> 
     <configuration> 
      <archiveClasses>true</archiveClasses> 
      <webResources> 
      <!-- in order to interpolate version from pom into appengine-web.xml --> 
      <resource> 
       <directory>${basedir}/src/main/webapp/WEB-INF</directory> 
       <filtering>true</filtering> 
       <targetPath>WEB-INF</targetPath> 
      </resource> 
      </webResources> 
     </configuration> 
     </plugin> 

     <plugin> 
     <groupId>com.google.appengine</groupId> 
     <artifactId>appengine-maven-plugin</artifactId> 
     <version>1.9.16-SNAPSHOT</version> 
     <configuration> 
     </configuration> 
     </plugin> 
    </plugins> 
    </build> 

</project> 
相關問題