Skip to content

Commit

Permalink
LPS-52678 Move logic to macrodef
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchandotcom committed Feb 3, 2015
1 parent df36960 commit 3ae8ff1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
33 changes: 0 additions & 33 deletions build-common-osgi-plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,6 @@
<project name="build-common-osgi-plugin">
<import file="build-common-plugin.xml" />

<target name="build-wsdd">
<build-wsdd
wsdd.classpath.property="wsdd.classpath"
wsdd.input.file="service.xml"
wsdd.server.config.file="server-config.wsdd"
wsdd.service.namespace="Plugin"
wsdd.output.path="src/"
/>

<property file="bnd.bnd" prefix="bnd." />

<echo file="bnd-${plugin.name}-wsdd.bnd">Bundle-SymbolicName: ${bnd.Bundle-SymbolicName}.wsdd
Bundle-Name: ${bnd.Bundle-Name} WSDD descriptors
Bundle-Version: ${bnd.Bundle-Version}
Fragment-Host: ${bnd.Bundle-SymbolicName}
Include-Resource: WEB-INF/=server-config.wsdd,classes;filter:=*.wsdd
</echo>

<bndexpand propertyfile="${sdk.dir}/common.bnd" />

<baseline-jar
bndRootFile="${sdk.dir}/common.bnd"
file="${basedir}/bnd-${plugin.name}-wsdd.bnd"
outputPath="${sdk.dir}/dist/${plugin.name}-${plugin.full.version}-wsdd-fragment.${plugin.packaging}"
sourcePath="${basedir}">
<classpath>
<pathelement location="${plugin.classes.dir}" />
</classpath>
</baseline-jar>

<delete file="${basedir}/bnd-${plugin.name}-wsdd.bnd" failonerror="false" />
</target>

<target name="jar">
<jar-macro
module.dir="${basedir}"
Expand Down
31 changes: 31 additions & 0 deletions build-common-plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,37 @@
<fail>WSDD Builder generated exceptions.</fail>
</then>
</if>

<if>
<resourcecontains
resource="${module.dir.unix}/build.xml"
substring="/build-common-osgi-plugin.xml&quot;"
/>
<then>
<property file="bnd.bnd" prefix="bnd." />

<echo file="bnd-${plugin.name}-wsdd.bnd">Bundle-SymbolicName: ${bnd.Bundle-SymbolicName}.wsdd
Bundle-Name: ${bnd.Bundle-Name} WSDD descriptors
Bundle-Version: ${bnd.Bundle-Version}
Fragment-Host: ${bnd.Bundle-SymbolicName}
Include-Resource: WEB-INF/=server-config.wsdd,classes;filter:=*.wsdd
</echo>

<bndexpand propertyfile="${sdk.dir}/common.bnd" />

<baseline-jar
bndRootFile="${sdk.dir}/common.bnd"
file="${basedir}/bnd-${plugin.name}-wsdd.bnd"
outputPath="${sdk.dir}/dist/${plugin.name}-${plugin.full.version}-wsdd-fragment.${plugin.packaging}"
sourcePath="${basedir}">
<classpath>
<pathelement location="${plugin.classes.dir}" />
</classpath>
</baseline-jar>

<delete file="${basedir}/bnd-${plugin.name}-wsdd.bnd" failonerror="false" />
</then>
</if>
</sequential>
</macrodef>

Expand Down

0 comments on commit 3ae8ff1

Please sign in to comment.