Use easier to read version of exec

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113120 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion
2003-03-13 02:56:08 +00:00
parent 20e63ecc57
commit 77913e3f67

View File

@@ -69,13 +69,14 @@
<!-- set permissions -->
<echo>Setting permissions and group ownership in ${directory}'</echo>
<j:set var="command" value="cd ${directory}" />
<j:set var="command" value="${command};chmod -R g+w *" />
<j:set var="command" value="${command};chmod -R a+r *" />
<j:set var="command" value="${command};chgrp -R ${maven.repository.group} *" />
<j:set var="command" value="${command};rm ${groupId}.license" />
<j:set var="command" value="${command};ln -s ${fileName} ${groupId}.license" />
<repository:exec command="${command}" />
<repository:exec>
cd ${directory};
chmod -R g+w *;
chmod -R a+r *;
chgrp -R ${maven.repository.group} *;
rm ${groupId}.license;
ln -s ${fileName} ${groupId}.license;
</repository:exec>
</define:tag>
<!--
@@ -103,10 +104,12 @@
<echo>Processing project ${group.text}</echo>
<j:set var="directory" value="${maven.repo.central.directory}/${group.text}/licenses" />
<j:set var="command" value="mkdir -p ${directory}; chmod g+ws ${directory}; chgrp ${maven.repository.group} ${directory}" />
<echo>Checking directory '${directory}'</echo>
<repository:exec command="${command}"/>
<echo>Ensuring directory '${directory}' exists</echo>
<repository:exec>
mkdir -p ${directory};
chmod g+ws ${directory};
chgrp ${maven.repository.group} ${directory};
</repository:exec>
</x:forEach>
</goal>
@@ -164,9 +167,10 @@
<j:if test="${file != '' and processing}">
<repository:urlFileName url="${file}" var="fileName"/>
<j:set var="command" value="cd ${directory}"/>
<j:set var="command" value="${command};ln -s ${fileName} ${group}.license"/>
<repository:exec command="${command}" />
<repository:exec>
cd ${directory};
ln -s ${fileName} ${group}.license;
</repository:exec>
</j:if>
</x:forEach>
</goal>
@@ -207,18 +211,19 @@
<j:if test="${empty(groupId)}">
<fail>groupId must be specified</fail>
</j:if>
<j:set var="command" value="cd ${maven.repo.central.directory}"/>
<j:set var="command" value="${command};mkdir ${groupId}" />
<j:set var="command" value="${command};chgrp ${maven.repository.group} ${groupId}"/>
<j:set var="command" value="${command};chmod g+s ${groupId}"/>
<j:set var="command" value="${command};mkdir ${groupId}/distributions"/>
<j:set var="command" value="${command};mkdir ${groupId}/jars"/>
<j:set var="command" value="${command};mkdir ${groupId}/licenses"/>
<j:set var="command" value="${command};mkdir ${groupId}/poms"/>
<j:set var="command" value="${command};chmod g+ws ${groupId}"/>
<j:set var="command" value="${command};chmod -R g+w ${groupId}"/>
<j:set var="command" value="${command};chmod -R a+r ${groupId}"/>
<repository:exec command="${command}" />
<repository:exec>
cd ${maven.repo.central.directory};
mkdir ${groupId};
chgrp ${maven.repository.group} ${groupId};
chmod g+s ${groupId};
mkdir ${groupId}/distributions;
mkdir ${groupId}/jars;
mkdir ${groupId}/licenses;
mkdir ${groupId}/poms;
chmod g+ws ${groupId};
chmod -R g+w ${groupId};
chmod -R a+r ${groupId};
</repository:exec>
</goal>
<!-- expects groupId to be set -->
@@ -227,9 +232,10 @@
<j:if test="${empty(groupId)}">
<fail>groupId must be specified</fail>
</j:if>
<j:set var="command" value="cd ${maven.repo.central.directory}"/>
<j:set var="command" value="${command};rm -rf ${groupId}" />
<repository:exec command="${command}" />
<repository:exec>
cd ${maven.repo.central.directory};
rm -rf ${groupId};
</repository:exec>
</goal>
<!--