11

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

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's 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

May it be caused by the version of Maven that I use? My Maven version is 2.1.0. I couldn't find when "executions" tag have been implemented. Without the "executions" tag everything is OK and I tried a few examples of code from the web but didn't work either. Any ideas?

2
  • 1
    First why have you added them and please show your full pom file? And why in havens name do you use an such archaic Maven version ? Please see EoL of Maven 2.2.1
    – khmarbaise
    Dec 19, 2014 at 17:12
  • 1
    the <executions> tag is used to configure the behavior of plugins. They belong in a specific place in your POM file. Like the previous person said, show the full POM file.
    – Ryan J
    Dec 19, 2014 at 22:34

2 Answers 2

20
   <executions> tag must be within the <build> </build> section 

if your plugin not inside the main build section , move it there.

-1

I just solved the problem by inserting <extensions>true</extensions> before <executions> tag. The structure just as

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.