Skip to content

Commit

Permalink
updated build file to generate stand-alone jar with dependencies
Browse files Browse the repository at this point in the history
updated build number
  • Loading branch information
cjayswal committed Dec 29, 2016
1 parent cc3f2f9 commit fd3673d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# For any inquiry or need additional information, please contact [email protected]
#******************************************************************************
version-num=2.1
build-num=10-RC2
build-num=10
release.num=${version-num}.${build-num}
lib.dir=./lib
dist.dir=build/artifacts/jars/
Expand Down
47 changes: 46 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ For any inquiry or need additional information, please contact support-qaf@infos
<echo level="info">--- compile (finished) ---</echo>
</target>
<!-- ================================= target: build ================================= -->
<target name="build" depends="make-jar, build-cucumber-report, gendoc,gensource" description="build framework, generate docs">
<target name="build" depends="make-jar, build-cucumber-report, gendoc,gensource, make-standalone-jar" description="build framework, generate docs">


</target>
Expand Down Expand Up @@ -241,6 +241,7 @@ For any inquiry or need additional information, please contact support-qaf@infos
<!-- Publish the local repo. Defaults to ~/.ivy2/local -->
<ivy:publish resolver="local-m2-publish" forcedeliver="true" publishivy="true" pubrevision="${release.num}" overwrite="true">
<artifacts pattern="${dist.dir}/[artifact].[ext]" />
<artifact name="qaf-standalone" pattern="${dist.dir}/[artifact].[ext]" ext="jar" type="standalone" version="${release.num}" />
<artifact name="qaf" pattern="${dist.dir}/[artifact].[ext]" ext="pom" type="pom" version="${release.num}" />
<artifact name="qaf-sources" pattern="${dist.dir}/[artifact].[ext]" ext="jar" classifier="sources" type="sources" version="${release.num}" />
<artifact name="qaf-javadoc" pattern="${dist.dir}/[artifact].[ext]" ext="jar" classifier="javadoc" type="javadoc" version="${release.num}" />
Expand Down Expand Up @@ -278,4 +279,48 @@ For any inquiry or need additional information, please contact support-qaf@infos

</testng>
</target>
<target name="make-standalone-jar" depends="clean, compile" description="generate stand-alone jar">
<delete dir="dependencies" failonerror="false" />
<mkdir dir="dependencies" />
<!-- external libraries classpath, we don't need sources and javadoc -->
<ivy:retrieve pattern="dependencies/[artifact](-[classifier]).jar" conf="compile" />
<!--
<path id="build.classpath">
<fileset dir="${basedir}/">
<include name="${lib.dir}/*.jar" />
<exclude name="${lib.dir}/*sources.jar" />
<exclude name="${lib.dir}/*javadoc.jar" />
</fileset>
</path>
-->
<jar destfile="${dist.dir}/qaf-standalone.jar" basedir="${bin.dir}" excludes="**/test/**,**/step/CommonStep.*" includes="**/*.*">
<zipgroupfileset dir="${lib.dir}" includes="*.jar" excludes="*sources.jar,*javadoc.jar"/>
<zipgroupfileset dir="dependencies" includes="*.jar" excludes="*sources.jar,*javadoc.jar"/>

<metainf dir="." includes="LICENSE.txt,NOTICE.txt" />
<manifest>
<attribute name="Vendor" value="Infostretch Corp." />
<attribute name="Built-By" value="${user.name}" />

<section name="Build-Info">
<attribute name="qaf-Build-Time" value="${build.timestamp}" />
<!-- Information about the program itself -->
<attribute name="qaf-Version" value="${version-num}" />
<attribute name="qaf-Revision" value="${build-num}" />
<attribute name="qaf-Type" value="core" />
</section>
</manifest>
<metainf dir="${src.dir}" includes="**/aop.xml" />
<service type="org.testng.ITestNGListener">
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFAnnotationTransformer2" />

<provider classname="com.qmetry.qaf.automation.testng.pro.QAFInvokedMethodListener2" />

<provider classname="com.qmetry.qaf.automation.testng.pro.QAFMethodInterceptor" />

<provider classname="com.qmetry.qaf.automation.testng.pro.QAFResultListener" />
<provider classname="com.qmetry.qaf.automation.testng.pro.QAFSuiteListener" />
</service>
</jar>
</target>
</project>

0 comments on commit fd3673d

Please sign in to comment.