Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] How a maven plugin can know about m2e?

I'd suggest against putting knowledge of m2e into maven plugin.
Instead, you could add a flag to your mojo configuration which controls the mode of operation (copying vs. pointing to m2 repo), and control it from your project's pom.xml using m2e profile.
Something along the lines of:

default value somewhere in parent pom

in the plugins/pluginManagement section

in project's pom

2015-05-29 14:24 GMT+03:00 Cristiano Gavião <cvgaviao@xxxxxxxxx>:

What is the best way for a maven plugin to know it is being run inside eclipse?

I'm looking for a way of plugin's output file to be generated different when running in or out eclipse.
More precisely, when running inside eclipse I want to generate a xml containing the location of the project's dependencies in the local repository. But when running outside I want to copy such artifacts to target folder and generate the xml pointing to those copied artifacts.

could someone give me a tip how to achieve that?

many thanks,


m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit


Back to the top