ARTEMIS-2109: Apply modified version of Franz artemis-dto xsd workaround from #2720

updated to only cause a change if the generated schema element found isnt prefixed, i.e modifies xsd only when needed and not all the time.
This commit is contained in:
Robbie Gemmell 2020-06-09 16:51:57 +01:00
parent d2c46762e8
commit 36dbfd9ae6
1 changed files with 7 additions and 0 deletions

View File

@ -108,6 +108,13 @@
<exclude name="**/.git/**" />
<exclude name="**/.svn/**" />
</schemagen>
<condition property="schema-namespace-replace-token" value="xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;"
else="xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;">
<resourcecontains resource="${project.build.directory}/schema/org.apache.activemq/dto/activemq.xsd" substring="&lt;schema elementFormDefault" />
</condition>
<replace file="${project.build.directory}/schema/org.apache.activemq/dto/activemq.xsd"
token="xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;"
value="${schema-namespace-replace-token}"/>
<copy todir="${project.build.directory}/classes">
<fileset dir="${project.build.directory}/schema" />
</copy>