ECM
ECM
总版主
总版主
  • 社区居民
  • 忠实会员
  • 原创写手
阅读:902回复:0

repository element

楼主#
更多 发布于:2016-05-15 13:59
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>
answer(解决方案):

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. 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. If I'm correct you need some kind of mvn jetty:run or mvn tomcat:run command to do what you want.

 

 

 

 

 

 

 

异常中心网是一家专门收集整理程序员编程过程中遇到的常见异常(exception)以及各种异常问答中心的网站。异常中心网旨在,减少程序员在编码遇到异常,处理各种异常时间和痛苦,让程序员能更愉快的、快速的定位异常并查找对应的异常解决方案。异常中心网诚心打造最完美的编程社区为程序员用户服务,努力成为最好的程序员乐园程序员社区程序异常中心程序bug中心异常问答中心

 

喜欢0 评分0
游客

返回顶部