Questions tagged [maven-embedder]

Maven is a project development management and comprehension tool.

Maven is a project development management and comprehension tool.

Based on the concept of a project object model: builds, dependency management, documentation creation, site publication, and distribution publication are all controlled from the declarative file.

Maven can be extended by plugins to utilise a number of other development tools for reporting or the build process.

Source:http://maven.apache.org/ref/3.0.2/maven-embedder/index.html

24 questions
0
votes
0 answers

Why does Maven Embedded throws error on my Maven project?

I have a simple Maven project I use for IT tests and I'm trying to make it compile as part of my tests. I'm trying to use this code: System.setProperty("maven.multiModuleProjectDirectory", projectRoot.getAbsolutePath()); MavenCli cli = new…
javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
0
votes
0 answers

Run own maven plugin from local classes folder or jar but not from local repo

I develop a Maven plugin and trying to find an easy way to test it. One of the ways is to use embedder, and it works great (I run it from JUnit). My scenario requires more real-time testing rather than maven-testing-harness approach but I use…
Vladimir I
  • 111
  • 2
  • 5
0
votes
0 answers

Heroku not allowing MavenCli do maven install (NoSuchElementException)

I'm working on a project where I need to run the maven install command in other projects. To resolve this, I used MavenCli which allows the execution of Maven commands by a Java Spring Boot project. A snippet of the executed code: private int…
0
votes
1 answer

How to Deploy an artifact programmatically using Maven

I have a mission to develop an integration tool which allows from a source code folder to generate a WAR or OSGI Bundle and then deploys it in Tomcat or Karaf. I used Maven Embedder to create the artifacts, now my problem is how to configure my…
Belgacem
  • 183
  • 9
0
votes
2 answers

Making a java project integrate with maven

I am trying to integrate maven with a old style java project to manage dependencies. To simply download the jars, I could use mvn dependency:get -DrepoUrl=https://mvnrepository.com -Dartifact=artifactId:groupId:version But due to some product…
user578219
  • 597
  • 2
  • 9
  • 32
0
votes
1 answer

Maven Embedder: how to add command option

I'm using Maven Embedder followingly: MavenCli cli = new MavenCli(); int result = cli.doMain(new String[] { "process-resources" }, "tmp/projectdir", System.out, System.err); This works, and is equivalent to running command line command mvn…
simon
  • 12,666
  • 26
  • 78
  • 113
0
votes
1 answer

Running maven goals from Java without a Maven executable installed on the machine

I am trying to build a project to checkout code from SCM and build it using maven. Is there a way we can achieve running maven goals from java without a maven home being provided(no maven installation). For SVN, I am using svnkit to achieve the…
Upen
  • 1,388
  • 1
  • 22
  • 49
0
votes
0 answers

Get the cause of a maven build failure with Maven embedder

I am able to run maven build with the following code MavenCli mavenCli = new MavenCli(); int result = mavenCli.doMain(goals.toArray(new String[goals.size()]), pom, System.out, System.out); Basically result is equal to 0 if build is successful, and…
user1745356
  • 4,462
  • 7
  • 42
  • 70
0
votes
1 answer

Maven Embedder - getting a list of profiles

How do I get a list of all the profiles for a project in maven inside of a maven plugin? Would it be: MavenEmbedder.readModel(new File("path to pom.xml")).getProfiles(); Walter
Walter White
1
2