mirror of https://github.com/apache/maven.git
o put the embedder documentation in the normal site
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@648507 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cc68735fcc
commit
c224eeefb2
|
@ -1,54 +0,0 @@
|
|||
------
|
||||
The Maven Embedder
|
||||
------
|
||||
Jason van Zyl
|
||||
------
|
||||
26 February 2007
|
||||
------
|
||||
|
||||
The Maven Embedder
|
||||
|
||||
The Maven Embedder is used by the Maven CLI, by IDE integration projects like {{{http://mevenide.codehaus.org}Mevenide}}
|
||||
and potentially any tool that needs to embed Maven's capabilities. You could embed Maven in a Continuous Integration
|
||||
application to run Maven build, an application lifecycle management (ALF) tool, or Ant tasks that utilize Maven's
|
||||
functionality. These are just a few examples of what the Maven Embedder can be used for.
|
||||
|
||||
A Simple Example
|
||||
|
||||
%{snippet|id=simple-embedder-example|url=http://svn.apache.org/repos/asf/maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderExampleTest.java}
|
||||
|
||||
A Note on Configuring Settings
|
||||
|
||||
Currently there is a notion of a user settings, and a global settings where either can specify information about the
|
||||
following:
|
||||
|
||||
* Local Repository
|
||||
|
||||
* Proxies
|
||||
|
||||
* Mirrors
|
||||
|
||||
* Server Configurations
|
||||
|
||||
* Plugin Groups
|
||||
|
||||
[]
|
||||
|
||||
If you are using the embedder it is entirely your responsibility to take user and global settings information and specify
|
||||
it in the embedder configuration. The embedder carries with it <<<no>>> defaults about where these are located and how
|
||||
they are used. If you want your embedded use of Maven to mimic the behavior of the Maven CLI insofar as settings use
|
||||
then use the following code:
|
||||
|
||||
%{snippet|id=mimic-cli|url=http://svn.apache.org/repos/asf/maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderExampleTest.java}
|
||||
|
||||
Also note that the user and global settings are merged, and the user settings are dominant.
|
||||
|
||||
Accessing the Underlying Plexus Container
|
||||
|
||||
Though it is not recommended for general use, it is possible to get at the underlying Plexus Container instance if you
|
||||
wish to lookup custom components. The Maven Embedder was specifically designed to be used for Maven and not a general
|
||||
purpose use of Plexus. So if you use this method then you use it at your peril. You can access the Plexus Container
|
||||
using the following:
|
||||
|
||||
%{snippet|id=plexus-container|url=http://svn.apache.org/repos/asf/maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderExampleTest.java}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one
|
||||
~ or more contributor license agreements. See the NOTICE file
|
||||
~ distributed with this work for additional information
|
||||
~ regarding copyright ownership. The ASF licenses this file
|
||||
~ to you under the Apache License, Version 2.0 (the
|
||||
~ "License"); you may not use this file except in compliance
|
||||
~ with the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<project name="Maven Embedder">
|
||||
<skin>
|
||||
<groupId>org.apache.maven.skins</groupId>
|
||||
<artifactId>maven-stylus-skin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</skin>
|
||||
<bannerLeft>
|
||||
<name>Maven</name>
|
||||
<src>http://maven.apache.org/maven2/images/apache-maven-project-2.png</src>
|
||||
<href>http://maven.apache.org/</href>
|
||||
</bannerLeft>
|
||||
<bannerRight>
|
||||
<src>http://maven.apache.org/maven2/images/maven-logo-2.gif</src>
|
||||
</bannerRight>
|
||||
<body>
|
||||
<links>
|
||||
</links>
|
||||
<menu name="Quick Links">
|
||||
<item name="Home" href="/index.html"/>
|
||||
</menu>
|
||||
</body>
|
||||
</project>
|
Loading…
Reference in New Issue