On 8 January 2014 09:00, juliangeo <[email protected]> wrote: > Hi! > > I'm new to Maven and I've been struggling with this for a while. I just need > to be able to programmatically build a project from a pom file in order to > retrieve its relevant information. I am not using, nor want to, a maven > plugin, just need this functionality as part of my application. > > I've tried the code you successfully got to work but no luck so far. I still > get the "mavenTools: null" from the repositoryManager being null. Am I > missing something? Should I run this on some kind of special environment? > > I'd appreciate any help as I'm really lost here. [del] >>>>> I'd be surprised if that worked. >>>>> >>>>> Maven makes heavy use of dependency injection via Plexus and chances >>>>> are you haven't set up some component that is being used.
Your answer is already here. You just can't use the classes outside of the Maven environment without also setting up all the other dependencies that are needed by that class. And as noted, this is done by Dependency Injection (via Plexus). You will need to look at MavenArtifactRepository and see what other objects need to be instantiated and set into it for it to work properly. Your use case is not something others are really trying to do, so you are unlikely to find someone with the knowledge to help. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
