forked from mojohaus/exec-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exec mojo can run executableDependency instead of executable
- Loading branch information
Showing
6 changed files
with
170 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/site/apt/examples/example-exec-using-executabledependency.apt.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
------ | ||
Using executable binary dependencies with the exec:exec goal | ||
------ | ||
Markus KARG | ||
------ | ||
2016-05-23 | ||
------ | ||
|
||
~~ Copyright 2016 The Codehaus | ||
~~ | ||
~~ Licensed 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. | ||
|
||
~~ NOTE: For help with the syntax of this file, see: | ||
~~ http://maven.apache.org/doxia/references/apt-format.html | ||
|
||
|
||
Using Executable Binary Dependencies Instead of Local Executables | ||
|
||
Instead of invoking a locally installed binary executable (identified by <<<executable>>>), a dependency (identified by <<<executableDependency>>>) can directly get executed instead. | ||
This particularly is useful when the dependency is an executable binary like <<<.exe>>> or <<<.bat>>> file produced by a different Maven project which got deployed into a repository. | ||
The binary gets pulled to the local repository and is getting executed <<right there>> without the need to know its actual file name or location on disk: Just the GA coordinates (<<<groupId>>>, <<<artifactId>>>) are needed. | ||
Hence the <<<executable>>> parameter has to be omitted in favor of the <<<executableDependency>>> parameter. | ||
|
||
There are two ways of using executable binary dependencies: Project dependencies and plugin dependencies. Currently the <<<exec>>> goal only supports plugin dependencies. | ||
|
||
* Plugin Dependencies | ||
|
||
Plugin Dependencies are referenced from within the plugin configuration. | ||
|
||
** pom.xml | ||
|
||
------------------- | ||
<project> | ||
... | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>${project.version}</version> | ||
... | ||
<configuration> | ||
<executableDependency> | ||
<!-- REFERENCES plugin dependency, see declaration below --> | ||
<groupId>your-group</groupId> | ||
<artifactId>your-artifact</artifactId> | ||
</executableDependency> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<!-- DECLARES plugin dependency, see reference above --> | ||
<groupId>your-group</groupId> | ||
<artifactId>your-artifact</artifactId> | ||
<type>exe</type> | ||
<version>your-version</version> | ||
</dependency> | ||
</dependencies> | ||
... | ||
</plugin> | ||
</plugins> | ||
</build> | ||
... | ||
</project> | ||
------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters