储存库元素 [英] repository element

查看:62
本文介绍了储存库元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project mysticpaste: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

POM.xml

<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/maven-v4_0_0.xsd">

 <modelVersion>4.0.0</modelVersion>
 <groupId>com.mysticcoders</groupId>
 <artifactId>mysticpaste</artifactId>
 <packaging>war</packaging>
 <version>1.0-SNAPSHOT</version>
 <!-- TODO project name  -->
 <name>quickstart</name>
 <description></description>

 <!-- TODO
  <organization>
  <name>company name</name>
  <url>company url</url>
  </organization>
 -->

 <licenses>
  <license>
   <name>The Apache Software License, Version 2.0</name>
   <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
   <distribution>repo</distribution>
  </license>
 </licenses>

 <dependencies>
  <!--  WICKET DEPENDENCIES -->

  <dependency>
   <groupId>org.apache.wicket</groupId>
   <artifactId>wicket</artifactId>
   <version>${wicket.version}</version>
  </dependency>

  <!--  SPRING DEPENDENCIES -->

  <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring</artifactId>
       <version>2.5.5</version>
     </dependency>

      <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-webmvc</artifactId>
          <version>2.5.5</version>
       </dependency> 

       <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>2.5.5</version>
         </dependency>

         <dependency> 
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
       <version>2.5.5</version>
  </dependency>


        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.2</version>
        </dependency>

      <!-- Hibernate framework -->
 <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>3.3.0.GA</version>
 </dependency>

  <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.6.ga</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

 <dependency>
    <groupId>javassist</groupId>
    <artifactId>javassist</artifactId>
    <version>3.8.0.GA</version>
 </dependency>

 <!-- MySQL database driver -->
 <dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>5.1.9</version>
 </dependency>


  <!-- OPTIONAL 
   <dependency>
   <groupId>org.apache.wicket</groupId>
   <artifactId>wicket-extensions</artifactId>
   <version>${wicket.version}</version>
   </dependency>
  -->

  <!-- LOGGING DEPENDENCIES - LOG4J -->

  <dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-log4j12</artifactId>
   <version>1.4.2</version>
  </dependency>
  <dependency>
   <groupId>log4j</groupId>
   <artifactId>log4j</artifactId>
   <version>1.2.14</version>
  </dependency>

  <!--  JUNIT DEPENDENCY FOR TESTING -->
   <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>3.8.2</version>
     <scope>test</scope>
   </dependency>

  <!--  JETTY DEPENDENCIES FOR TESTING  -->

  <dependency>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty</artifactId>
   <version>${jetty.version}</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty-util</artifactId>
   <version>${jetty.version}</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty-management</artifactId>
   <version>${jetty.version}</version>
   <scope>provided</scope>
  </dependency>
 </dependencies>

 <build>
 <filters>
        <filter>src/main/filters/filters-${env}.properties</filter>
    </filters>
  <resources>
   <resource>
    <filtering>true</filtering>
    <directory>src/main/resources</directory>
   </resource>
   <resource>
    <filtering>false</filtering>
    <directory>src/main/java</directory>
    <includes>
     <include>**</include>
    </includes>
    <excludes>
     <exclude>**/*.java</exclude>
    </excludes>
   </resource>
  </resources>
  <testResources>
   <testResource>
    <filtering>false</filtering>
    <directory>src/test/java</directory>
    <includes>
     <include>**</include>
    </includes>
    <excludes>
     <exclude>**/*.java</exclude>
    </excludes>
   </testResource>
  </testResources>
  <plugins>
   <plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>maven-jetty-plugin</artifactId>
   </plugin>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
    <configuration>
     <downloadSources>true</downloadSources>
    </configuration>
   </plugin>   
  </plugins>
 </build>

 <properties>
  <wicket.version>1.3.5</wicket.version>
  <jetty.version>6.1.4</jetty.version>
     <env>DEV</env>
 </properties>

 <profiles>
      <profile>
          <id>DEV</id>
          <properties>
              <env>DEV</env>
          </properties>
      </profile>

      <profile>
          <id>QA</id>
          <properties>
              <env>QA</env>
          </properties>
      </profile>

      <profile>
          <id>PROD</id>
          <properties>
              <env>PROD</env>
          </properties>
      </profile>
 </profiles>
</project>

推荐答案

我相信您要尝试的是将Web应用程序部署到应用程序服务器.
为此,您使用的是mvn ... deploy命令.

I believe what you are trying to do is deploy the webapp to application server.
And to do this you are using the mvn ... deploy command.

问题是mvn deploy旨在将您的项目(工件)的输出部署到Maven存储库.例如,与其他同事共享您的课程.

The problem is mvn deploy is meant for deploying the output of your project (artifact) to maven repository. For example to share your classes with other co-workers.

如果我是对的,则需要某种mvn jetty:runmvn tomcat:run命令来执行所需的操作.

If I'm correct you need some kind of mvn jetty:run or mvn tomcat:run command to do what you want.

这篇关于储存库元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆