Fixed MAVEN-791. Check if project is a plugin.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1,13 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<project
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:http="jelly:http"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:x="jelly:xml">
|
||||
|
||||
<goal name="plugin:check" description="Check if project is a plugin">
|
||||
<u:file var="projectFile"
|
||||
name="${basedir}/project.xml" />
|
||||
<u:file var="jellyFile"
|
||||
name="${basedir}/plugin.jelly" />
|
||||
<j:if test="${!projectFile.exists()}">
|
||||
<j:set var="notPlugin" value="true"/>
|
||||
</j:if>
|
||||
<j:if test="${!pluginFile.exists()}">
|
||||
<j:set var="notPlugin" value="true"/>
|
||||
</j:if>
|
||||
<ant:fail if="notPlugin">This project is a non-plugin project.</ant:fail>
|
||||
</goal>
|
||||
|
||||
<goal name="plugin" description="Build a plugin jar and install to the maven.repo.local">
|
||||
<goal name="plugin" prereqs="plugin:check"
|
||||
description="Build a plugin jar and install to the maven.repo.local">
|
||||
|
||||
<!-- Plugins are just a jar. -->
|
||||
<attainGoal name="jar:jar"/>
|
||||
@@ -68,7 +84,7 @@
|
||||
|
||||
<!-- generate a skeletal navigation.xml for the plugin specified
|
||||
by the 'plugin' variable -->
|
||||
<goal name="plugin:generate-navigation"
|
||||
<goal name="plugin:generate-navigation" prereqs="plugin:check"
|
||||
description="Generate navigation.xml for the plugin">
|
||||
|
||||
<j:set var="skip" value="false" />
|
||||
@@ -88,7 +104,7 @@
|
||||
</goal>
|
||||
|
||||
<!-- generate a skeletal goals.xml for the plugin specified -->
|
||||
<goal name="plugin:generate-goals"
|
||||
<goal name="plugin:generate-goals" prereqs="plugin:check"
|
||||
description="Generate goals.xml for the plugin">
|
||||
|
||||
<j:set var="skip" value="false" />
|
||||
@@ -128,7 +144,7 @@
|
||||
</goal>
|
||||
|
||||
<!-- generate properties documentation -->
|
||||
<goal name="plugin:generate-properties"
|
||||
<goal name="plugin:generate-properties" prereqs="plugin:check"
|
||||
description="Generate properties.xml for the plugin">
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user