activemq/jmeter/maven.xml

120 lines
5.7 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
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.
-->
<project default="jar:jar"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:ant="jelly:ant"
xmlns:util="jelly:util"
xmlns:artifact="artifact"
>
<goal name="rebuild">
<attainGoal name="clean"/>
<attainGoal name="default"/>
</goal>
<postGoal name="jar:jar">
<move file="target\${maven.final.name}.jar" todir="${jmeter.home}\lib\ext" overwrite="true"/>
<!-- copy JMeter TestPlans -->
<copy todir="${jmeter.home}\bin\testfiles" overwrite="true">
<fileset dir="resource\TestPlans"/>
</copy>
<!-- jmeter bin files -->
<copy file="resource\jmeter" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmeter-server" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmeter.bat" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmeter-n.bat" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmeter-server.bat" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmeter-t.bat" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmeterw.bat" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\BeanShellAssertion.bshrc" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\BeanShellFunction.bshrc" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\BeanShellSampler.bshrc" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\BeanShellSampler.bshrc" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\log4j.conf" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\users.dtd" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmeter.properties" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jmetertest.properties" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\saveservice.properties" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\upgrade.properties" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\logkit.xml" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\users.xml" todir="${jmeter.home}\bin" overwrite="true"/>
<copy file="resource\jar_usage.txt" todir="${jmeter.home}\lib" overwrite="true"/>
<copy file="resource\LICENSE(jdom).txt" todir="${jmeter.home}\lib" overwrite="true"/>
<copy file="resource\LICENSE(jtidy).txt" todir="${jmeter.home}\lib" overwrite="true"/>
<copy file="resource\LICENSE(XPP3).txt" todir="${jmeter.home}\lib" overwrite="true"/>
<copy file="resource\LICENSE(XStream).txt" todir="${jmeter.home}\lib" overwrite="true"/>
<j:set var="binDir" value="${jmeter.home}/bin"/>
<j:set var="libDir" value="${jmeter.home}/lib"/>
<j:set var="extDir" value="${jmeter.home}/lib/ext"/>
<ant:mkdir dir="${libDir}"/>
<ant:mkdir dir="${extDir}"/>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dependency" value="${artifact.dependency}"/>
<echo>${artifact.path}</echo>
<j:if test="${dependency.getProperty('bin') == 'true'}">
<ant:copy todir="${binDir}" file="${artifact.path}"/>
<j:if test="${dependency.extension == 'jar'}">
<j:set var="classpath" value="${classpath} ../bin/${artifact.name}"/>
</j:if>
</j:if>
</j:forEach>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dependency" value="${artifact.dependency}"/>
<echo>${artifact.path}</echo>
<j:if test="${dependency.getProperty('lib') == 'true'}">
<ant:copy todir="${libDir}" file="${artifact.path}"/>
<j:if test="${dependency.extension == 'jar'}">
<j:set var="classpath" value="${classpath} ../lib/${artifact.name}"/>
</j:if>
</j:if>
</j:forEach>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dependency" value="${artifact.dependency}"/>
<echo>${artifact.path}</echo>
<j:if test="${dependency.getProperty('ext') == 'true'}">
<ant:copy todir="${extDir}" file="${artifact.path}"/>
<j:if test="${dependency.extension == 'jar'}">
<j:set var="classpath" value="${classpath} ../lib/ext/${artifact.name}"/>
</j:if>
</j:if>
</j:forEach>
<ant:zip zipfile="${jmeter.home}\..\${activemq.jmeter.distribution.name}-${pom.currentVersion}.zip" basedir="${jmeter.home}\"></ant:zip>
</postGoal>
<goal name="clean">
<ant:echo>+-----------------------------------------------------+</ant:echo>
<ant:echo>| Cleaning: ${basedir}\target </ant:echo>
<ant:echo>+-----------------------------------------------------+</ant:echo>
<delete dir="${basedir}/target"/>
</goal>
</project>