Questions tagged [plexus]

Plexus is a software framework for building modular applications using dependency injection.

[Plexus][1] provides a number of pre-built modules for achieving common tasks such as i18n and interacting with frameworks such as Hibernate and Velocity.

The aims of the project are similar to that of Spring. It supports the following [features][5]:

  • Component lifecycles
  • Component instantiation strategies
  • Nested containers
  • Component configuration
  • Auto-wiring
  • Component dependencies
  • Various dependency injection techniques including constructor injection, setter injection, and private field injection.

Plexus is perhaps most widely known because of its use in [Maven][2].

Useful Links

  • [An example][3] showing how dependencies are wired together with Plexus
  • [The Plexus FAQ][4]
  • [Plexus – Plexus Feature Comparison][5] [1]: https://codehaus-plexus.github.io/ [2]: http://maven.apache.org/ [3]: http://www.sonatype.com/people/2009/05/plexus-container-five-minute-tutorial/ [4]: https://codehaus-plexus.github.io/faq.html [5]: https://codehaus-plexus.github.io/ref/feature-comparison.html
49 questions
58
votes
1 answer

How to get the current MavenSession or MavenExecutionRequest from a Plexus Component

I created a Plexus component to house common logic for several Mojos I want to create. I have been able to pass information like localRepository and project from the Mojo (and test cases). I was wondering if there is a way to get the MavenSession or…
Thomas
  • 2,095
  • 18
  • 24
25
votes
1 answer

What is 'plexus' and how is it related to maven?

Can someone explain to me what Plexus is http://plexus.codehaus.org/ ? How is it related to Maven?
jcm
  • 5,499
  • 11
  • 49
  • 78
9
votes
2 answers

CompilerMojo#execute() caused a linkage error (java.lang.NoSuchMethodError) and may be out-of-date

I've searched google and reviewed answers on StackOverflow, but cannot seem to resolve this problem. I recently joined this project and added a few things to the POM. Being a relative neophyte with Maven, I am not grasping the issue and the response…
Bill Turner
  • 869
  • 1
  • 13
  • 27
5
votes
1 answer

Difference between (plain) Classworlds and Plexus Classworlds?

Can anyone please explain the difference between plexus-classworlds and (plain) classworlds? These two are confusing and can't see the difference. Plexus classworlds contains almost no description. Apparently, a maven-based Java project uses both,…
ravana
  • 157
  • 1
  • 2
  • 9
5
votes
2 answers

Replace plexus component in Maven 3

I need to replace some Maven default functionality with my own implementation, and I am looking for a clean way to do that. I have extended org.apache.maven.repository.internal.DefaultVersionRangeResolver and registered my extended component using a…
Sean Patrick Floyd
  • 292,901
  • 67
  • 465
  • 588
5
votes
0 answers

Incomplete plexus container injection when moving items in a separate thread

I have the following simplified example involving a plexus container: package de.vogel612.depanalyzer; import de.vogel612.depanalyzer.dependency.MavenResolutionTaskReal; import…
Vogel612
  • 5,620
  • 5
  • 48
  • 73
5
votes
1 answer

Infinite recursion bug in Maven release / scm tag / Plexus DirectoryScanner?

I'm seeing my Maven release fail at the scm tagging phase with an apparent infinite recursion inside the release plugin: ... (hundreds more times) at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:491) at…
Sean Owen
  • 66,182
  • 23
  • 141
  • 173
4
votes
1 answer

Calling maven goal from within another goal

I'm trying to create a wrapper to a maven plugin that I found in the internet. My wrapper should do some work than call the execute on the original plugin's goal. The examples I saw so far instantiate the other plugin, set all the variables, than…
Rafael
  • 2,373
  • 4
  • 22
  • 28
4
votes
0 answers

How to do a configurable plexus component in a maven extension?

I'm trying to modify tesla-profiler extension to support different output formats as well as to choose the path where to write the file. My current components.xml defines a "renderer" with a specific implementation that is required by the profiler…
Jaime Soriano
  • 7,309
  • 2
  • 33
  • 45
3
votes
3 answers

Eclipse Maven Plugin fails to create groovy-maven-archetype project

I have installed the Maven for Eclipse plugin from Sonatype. (update site: http://m2eclipse.sonatype.org/update/) I am creating a Maven project, and choosing to use the groovy-maven-archetype as my starting point. However, halfway through, I am…
toolkit
  • 49,809
  • 17
  • 109
  • 135
3
votes
0 answers

Use Maven's EventSpyDispatcher in a custom Junit RunListener

I'm trying to write a custom Junit RunListener, to be called by Surefire when executing tests. My listener should create some custom 'events' to be sent through Maven's EventSpyDispatcher, so that these can get picked up by an event spy that I also…
facewindu
  • 705
  • 3
  • 11
  • 31
3
votes
1 answer

Obtaining a Maven-Instance from Plexus

I'm currently attempting to get PlexusContainer to give me an initialized Maven-instance outside of a maven or eclipse execution context. For that purpose I have following code (simplified): PlexusContainer container = null; try { container =…
Vogel612
  • 5,620
  • 5
  • 48
  • 73
2
votes
0 answers

maven custom lifecycle is not recognized

I am trying to test a simple custom plugin with custom lifecycle. Here is my EchoMojo.java file: package org.sonatype.mavenbook.plugins; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import…
Angrezy
  • 141
  • 2
  • 10
2
votes
0 answers

Maven / Plexus ComponentLookupException - classpath nightmare?

Does anyone know what the following exception means, or how I should begin to debug or investigate it? I find it rather cryptic. I think it means I'm missing a Maven dependency in my pom.xml, but I can't for the life of me work out…
Stewart
  • 17,616
  • 8
  • 52
  • 80
2
votes
0 answers

How do you setup and execute a MavenExecutionRequest with Maven Core v4.0.0?

I want to build a Maven project using the Maven Core (version 4.0.0-alpha-5) library. All I want right now is a working proof-of-concept to run the install phase. However, I have not been able to create a working example and I cannot find a single…
Cardinal System
  • 2,749
  • 3
  • 21
  • 42
1
2 3 4