Hi,
What kind of dependencies do you have in your pom ?
Have you added org.sonatype.aether:aether-connector-wagon:1.7 ?
You can have a look here [1] to see a kind of embedder.

HTH,
-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

[1] https://hudson.dev.java.net/svn/hudson/trunk/hudson/lib/maven-embedder/


2010/11/18 Minto van der Sluis <[email protected]>:
> Hi folks,
>
> I am trying to use the embedder on my project and run into different
> behaviour between embedder (class MavenCLI) and the maven command line.
>
> The command that gets executed looks like:
>
>    mvn -X -gs ...\maven.settings.xml -f ...\simple-pom.xml clean
>
> Using the embedder with an empty local repo  results in the following error:
>
> ...
> [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of
> its dependencies could not be resolved: Could not transfer artifact
> org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 from central
> (http://repo1.maven.org/maven2): No connector available to access repository
> central (http://repo1.maven.org/maven2) of type default using the available
> factories -> [Help 1]
> org.apache.maven.plugin.PluginResolutionException: Plugin
> org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies
> could not be resolved: Could not transfer artifact
> org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 from central
> (http://repo1.maven.org/maven2): No connector available to access repository
> central (http://repo1.maven.org/maven2) of type default using the available
> factories
> ...
>
> Running the same command on the command line using Maven 3 works without
> problems. It populates the local repo as expected.
>
> When running the embedder again on a populated local repo (populated by the
> previous command line run), it also works.
>
> The pom being used here is extremely simple:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
> <modelVersion>4.0.0</modelVersion>
> <groupId>simpletest</groupId>
> <artifactId>test</artifactId>
> <packaging>pom</packaging>
> <version>1</version>
> </project>
>
> The settings.xml (maven.settings.xml) that I use contains the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0";
>                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>                  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
> http://maven.apache.org/xsd/settings-1.0.0.xsd";>
>
> <localRepository>target/maven.repo</localRepository>
> <interactiveMode>false</interactiveMode>
>
> <pluginGroups>
> </pluginGroups>
> <proxies>
> </proxies>
> <servers>
> </servers>
> <mirrors>
> </mirrors>
> <profiles>
> </profiles>
> </settings>
>
>
> What am I missing or doing wrong? Where can I find more information on using
> Maven embedder?
>
> Regards,
>
> Minto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to