Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Passing additional parameters to maven buildet

you can either create a m2e profile in your pom.xml, that will only be active when working within eclipse, like : 


<profiles>
 <profile>
   <id>m2e</id>
   <activation>
     <property>
       <name>m2e.version</name>
     </property>
   </activation>
   <properties>
     <abc>foo</abc>
   </properties>
 </profile>
</profiles>
Or set a similar profile in your settings.xml

HIH

Fred Bricon


On Fri, Nov 30, 2012 at 4:23 PM, Andrey Rusak <rusak@xxxxxx> wrote:

 Hi there,

I am trying to use custom variables in my project’s POM like ${abc}.

Normally this variable initialized from command line arguments when maven build starts, e.g. mvn –Dabc=123

However, when the variable in not initialized with value (I will not explain too much details why the variable is used for) build fails because the variable is used for dependency management. Actually it’s fine for me when projects built in Bamboo/Jenkins/etc. But we got problems in Eclipse workspace when it can not resolve dependencies due to missing parameter.

So, summary of my question is how to pass custom arguments/parameters in Eclipse maven builder, which resolves dependencies on workspace.

 

Thanks in advance for any assistance.

 

 

 

Best regards,

Andrey Rusak

 




Sent from Samsung mobile

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev




--
"Have you tried turning it off and on again" - The IT Crowd

Back to the top