Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Unrecognised Tag: 'executions'

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?

like image 323
leventunver Avatar asked Dec 19 '14 13:12

leventunver


People also ask

What is execution tag in POM xml?

The execution IDs are used when creating the effective POM from the POM itself, any parent POMs (including the Maven super POM), and settings. xml. Maven merges configuration for plugin executions having the same ID across these POMs.

Where do I put reporting tag in POM xml?

Using <dependencies> tag within <reporting> in Maven pom.

What is plugin management in Maven?

From Maven documentation: pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one.


1 Answers

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

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

like image 105
ameen Avatar answered Sep 20 '22 11:09

ameen