Questions tagged [maven-mojo]

A mojo is a Maven plain Old Java Object. Each mojo is an executable goal in Maven, and a plugin is a distribution of one or more related mojos.

25 questions
0
votes
0 answers

Mask sensitive data in maven mojo parameter

I have a Maven Mojo where you have to pass user credentials. Now when you run the plugin with debug output these credentials are output on the StdOut. [DEBUG] Configuring mojo 'plugin:1.2.0-SNAPSHOT:plugin' with basic configurator --> [DEBUG] (f)…
Manu Zi
  • 2,300
  • 6
  • 33
  • 67
0
votes
0 answers

Why MavenProject.addCompileSourceRoot() is not working as expected?

I have a custom plugin with the following configuration, but I can't understand why the outputDir folder is not added to the classpath of the project running the goal generate-sources. Mojo class package testing.sources.maven; import…
un0tec
  • 170
  • 1
  • 11
0
votes
1 answer

Load project class within maven mojo

I am trying to load a projects class during the execution of a maven mojo. Unfortunately this operation fails, since the class loader is missing a referenced class. Looking around I found already the approaches Maven mojo plugin to load class from…
Martin Ackermann
  • 884
  • 6
  • 15
0
votes
1 answer

Pass special characters to Maven Mojo Map key

I have the following property in my Maven MOJO plugin: @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true) public class GraphQLCodegenMojo extends AbstractMojo { @Parameter private Map
Bogdan Kobylynskyi
  • 1,150
  • 1
  • 12
  • 34
0
votes
1 answer

Unable to find classes using org.reflections.Reflections from inside custom Maven plugin

I have created a custom Maven plugin like so: @Mojo(name="generate", defaultPhase = LifecyclePhase.PREPARE_PACKAGE) public class HandlerGeneratorMojo extends AbstractMojo { ... } And I am using it like this: