You must specify a valid lifecyle or a goal in mvn Build

33 views Asked by At

When I run MVN Build I get the following error you must specify a valid lifecycle phase or a goal in the format : The below is my Build tag , Have tried to put default goal etc. Every time I run using maven build it is asking me to enter goal when I run from eclipse I am trying to run from command line - mvn build

   <build>

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

               </plugin>
           </plugins>
       </pluginManagement>
       <plugins>
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>2.12.4</version>
              
               <inherited>true</inherited>
            
                
            <configuration>
                   <includes>
                       <include>**/AARMAPI/*</include>
                   </includes>
               </configuration>
           </plugin>
       </plugins>
       
          
   </build>
   
    <properties>
            <java.version>1.8.0_261</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

To have a successful maven build

1

There are 1 answers

0
J Fabian Meier On

There is no command mvn build.

Use mvn clean verify.