Maven Unrecognized Tag: Executions

The problem is simple. I added a tag <executions></executions>to my pom.xml, however I got the following error:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project POM).


Project ID: MyProject
POM Location: MyPOM

Reason: Parse error reading POM. Reason: Unrecognised tag: 'executions' (position: START_TAG seen ...</version>  \t\n\t\t\t\t\t\t    <executions>... @2014:23)
for project MyProject

Could this be caused by the version of Maven I'm using? My version of Maven is 2.1.0. I could not find when the "executions" tag was implemented. Without the "executions" tag, everything is fine, and I tried some sample code from the Internet, but it didn’t work. Any ideas?

+4
source share
2 answers
   <executions> tag must be within the <build> </build> section 

if your plugin is not inside the main section of the assembly, move it there.

+7
source

, <extensions>true</extensions> <executions>. ,

.......    
</plugin>
     <plugin>
       <extensions>true</extensions>
       <executions>
         <execution>
           <phase></phase>
           <goals>
             <goal></goal>
           </goals>
         </execution>
       </executions>
     </plugin>    
   </plugins>   
</build>
-1

Source: https://habr.com/ru/post/1568326/


All Articles