2013-12-22 3 views
-2

Я написалОшибка сборки в мавена

mvn -f pom.xml compile exec:java -Dexec.classpathScope=Compile-Dexec.main Class=storm.starter.WordCountTopology 

Вот эта ошибка

[INFO] One or more required plugin parameters are invalid/missing for 'exec:java' 

вот что в pom.xml

<project 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> 
     <groupId>storm.starter</groupId> 
     <artifactId>storm-starter</artifactId> 
     <version>0.0.1-SNAPSHOT</version> 
     <packaging>jar</packaging> 
     <name>storm-starter</name> 
     <url>https://github.com/nathanmarz/storm-starter</url> 

     <properties> 
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     </properties> 
     <repositories> 
     <repository> 
       <id>github-releases</id> 
       <url>http://oss.sonatype.org/content/repositories/github-releases/</url> 
     </repository> 
     <repository> 
       <id>clojars.org</id> 
       <url>http://clojars.org/repo</url> 
     </repository> 
     </repositories> 
      <dependencies> 
       <dependency> 
        <groupId>junit</groupId> 
        <artifactId>junit</artifactId> 
        <version>3.8.1</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.testng</groupId> 
        <artifactId>testng</artifactId> 
        <version>6.8.5</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.mockito</groupId> 
        <artifactId>mockito-all</artifactId> 
        <version>1.9.0</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.easytesting</groupId> 
        <artifactId>fest-assert-core</artifactId> 
        <version>2.0M8</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>org.jmock</groupId> 
        <artifactId>jmock</artifactId> 
        <version>2.6.0</version> 
        <scope>test</scope> 
       </dependency> 
       <dependency> 
        <groupId>storm</groupId> 
        <artifactId>storm</artifactId> 
        <version>0.9.0.1</version> 
        <!-- keep storm out of the jar-with-dependencies-->     
        <scope>provided</scope> 
       </dependency> 
       <dependency> 
        <groupId>commons-collections</groupId> 
        <artifactId>commons-collections</artifactId> 
        <version>3.2.1</version> 
       </dependency> 
       <dependency> 
        <groupId>com.google.guava</groupId> 
        <artifactId>guava</artifactId> 
        <version>15.0</version> 
       </dependency> 
      </dependencies> 
      <build> 
       <sourceDirectory>src/jvm</sourceDirectory> 
       <testSourceDirectory>test/jvm</testSourceDirectory> 
       <resources> 
        <resource> 
         <directory>${basedir}/multilang</directory> 
        </resource> 
       </resources> 
       <plugins> 
       <!-- Bind the maven-assembly-plugin to the package phase this will create a jar file without the storm dependencies suitable for deployment to a cluster.--> 
        <plugin> 
         <artifactId>maven-assembly-plugin</artifactId> 
         <configuration> 
          <descriptorRefs> 
           <descriptorRef>jar-with-dependencies</descriptorRef>   
          </descriptorRefs> 
          <archive> 
           <manifest> 
            <mainClass/> 
           </manifest> 
          </archive> 
         </configuration> 
         <executions> 
          <execution> 
           <id>make-assembly</id> 
           <phase>package</phase> 
           <goals> 
           <goal>single</goal> 
           </goals> 
          </execution> 
         </executions> 
        </plugin> 
        <plugin> 
         <groupId>com.theoryinpractise</groupId> 
         <artifactId>clojure-maven-plugin</artifactId> 
         <version>1.3.12</version> 
         <extensions>true</extensions> 
         <configuration> 
          <sourceDirectories> 
           <sourceDirectory>src/clj</sourceDirectory> 
          </sourceDirectories> 
         </configuration> 
        <executions> 
         <execution> 
          <id>compile</id> 
          <phase>compile</phase> 
          <goals> 
           <goal>compile</goal> 
          </goals> 
        </execution> 
        <execution> 
          <id>test</id> 
          <phase>test</phase> 
          <goals> 
           <goal>test</goal> 
          </goals> 
        </execution> 
        </executions> 
      </plugin> 
      <plugin> 
        <groupId>org.codehaus.mojo</groupId> 
        <artifactId>exec-maven-plugin</artifactId> 
        <version>1.2.1</version> 
        <executions> 
         <execution> 
           <goals> 
            <goal>exec</goal> 
           </goals> 
         </execution> 
        </executions> 
        <configuration> 
         <executable>java</executable> 
         <includeProjectDependencies>true</includeProjectDependencies> 
         <includePluginDependencies>false</includePluginDependencies> 
         <classpathScope>compile</classpathScope> 
         <mainClass>${storm.topology}</mainClass> 
        </configuration> 
       </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <configuration> 
        <source>1.6</source> 
        <target>1.6</target> 
       </configuration> 
      </plugin> 
      </plugins> 
    </build> 

+0

Более подробную информацию отладки, если вы используете опцию -X. – tucuxi

+0

Если вы вставили свою командную строку дословно, попробуйте различный интервал: 'mvn -f pom.xml compile exec: java -Dexec.classpathScope = compile -Dexec.mainClass = storm.starter.WordCountTopology' – tucuxi

+0

Я пробовал эту команду, чтобы вы написал, но все еще та же проблема – user1

ответ

0

Как ваш POM взгляд как? Вы должны включить Exec-плагин, так что ваш POM будет выглядеть как-то вроде этого:

<project> 
    ... 
    <build> 
    <plugins> 
     <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>exec-maven-plugin</artifactId> 
     <version>1.2.1</version> 
     <executions> 
      <execution> 
      ... 
      <goals> 
       <goal>exec</goal> 
      </goals> 
      </execution> 
     </executions> 
     <configuration> 
      <executable>maven</executable> 
      <!-- optional --> 
      <workingDirectory>/tmp</workingDirectory> 
      <arguments> 
      <argument>-X</argument> 
      <argument>myproject:dist</argument> 
      ... 
      </arguments> 
     </configuration> 
     </plugin> 
    </plugins> 
    </build> 
    ... 
</project> 

(Source)

+0

я отправил содержимое pom.xml на моем посту. Спасибо – user1

+0

Пожалуйста, отредактируйте свой POM, он не читается. –

+0

здесь ссылка моего pom.xml http://www.2shared.com/document/yZPU74go/pom.html – user1

Смежные вопросы