DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008

    Maven embedder issue

    I am using MavenEmbedder 2.1 to parse my pom.xml. I have attached two files with this mail.

    One is my java program which is try to parse pom.xml and get MavenProject out of it
    Next one is my pom.xml.

    My question is, how to pass runtime arguments to MavenEmbedder?

    If you see in pom.xml, for one dependency I have mentioned $ variable which will be resolved at runtime.


    This ${dep.version} is available as a property within pom.xml. If you see the properties section, you can find dep.version


    Value for this dep.version is ${prop.version} which will be resolved only at runtime. If we are using maven from command prompt, then we can run install goal like this

    mvn install -Dprop.version=1.2

    Maven will resolve the ${prop.version} using command line parameters.

    I just to want to know how to pass this in Maven Embedder.

    Actually using Configuration class we can set system properties. In this case System property get appended to JVM System property which will affect our multi threaded build process (Our build machine sit on top up of solaris box where only one JVM is running and build process is a multi threaded one) If a system property is added to JVM, then it will have an effect on all other threads which are simulatenously running)
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2008

    Did you get any success with this, I am hitting the same problem, and the request's setProperties do not seem to be applicable for this.



Similar Threads

  1. Deadlock issue in SQL Server
    By manumishra in forum Database
    Replies: 5
    Last Post: 06-09-2008, 04:28 PM
  2. Replies: 1
    Last Post: 07-18-2007, 09:34 AM
  3. They created J#, why couldn't they do VB#?
    By Thomas Eyde in forum .NET
    Replies: 290
    Last Post: 12-22-2001, 02:13 PM
  4. Replies: 0
    Last Post: 09-19-2001, 06:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.