Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
ada3a43a
Commit
ada3a43a
authored
Oct 13, 2015
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-935: Replacing hack with proper recursive parent plugin build.
parent
52f43b05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
43 deletions
+45
-43
build.xml
build/build.xml
+45
-43
No files found.
build/build.xml
View file @
ada3a43a
...
...
@@ -1208,35 +1208,11 @@
</target>
<target
name=
"-plugins-impl"
if=
"dirlist"
>
<!-- First, do all plugins that do not have a parent plugin (some of them could be parents of others) -->
<for
list=
"${dirlist}"
param=
"plugin"
trim=
"true"
>
<sequential>
<xmlproperty
file=
"${plugin.src.dir}/@{plugin}/plugin.xml"
keeproot=
"true"
/>
<if>
<isset
property=
"plugin.parentPlugin"
/>
<then>
</then>
<else>
<buildplugin
plugin=
"@{plugin}"
pluginsrc=
"${plugin.src.dir}"
/>
</else>
</if>
</sequential>
</for>
<!-- Lastly, do all plugins that have defined a parent plugin. This works, as long as there are no 'chains' -->
<for
list=
"${dirlist}"
param=
"plugin"
trim=
"true"
>
<sequential>
<xmlproperty
file=
"${plugin.src.dir}/@{plugin}/plugin.xml"
keeproot=
"true"
/>
<if>
<isset
property=
"plugin.parentPlugin"
/>
<then>
<buildplugin
plugin=
"@{plugin}"
pluginsrc=
"${plugin.src.dir}"
/>
</then>
</if>
<buildplugin
plugin=
"@{plugin}"
pluginsrc=
"${plugin.src.dir}"
/>
</sequential>
</for>
</target>
<target
name=
"plugin"
description=
"build one plugin"
>
...
...
@@ -1251,6 +1227,40 @@
<antcall
target=
"openfireHome"
/>
</target>
<macrodef
name=
"buildparentplugin"
>
<attribute
name=
"plugin"
/>
<attribute
name=
"pluginsrc"
/>
<attribute
name=
"pluginlib"
default=
"${plugin.dev.dest.dir}/@{plugin}/work/lib"
/>
<attribute
name=
"parentPlug"
/>
<sequential>
<echo
message=
"Read XML properties of @{pluginsrc}/@{parentPlug}/plugin.xml"
/>
<xmlproperty
file=
"@{pluginsrc}/@{parentPlug}/plugin.xml"
prefix=
"@{parentPlug}"
keepRoot=
"false"
/>
<if>
<isset
property=
"@{parentPlug}.parentPlugin"
/>
<then>
<echo
message=
"Compile parent of parent plugin ${@{parentPlug}.parentPlugin}"
/>
<buildparentplugin
parentPlug=
"${@{parentPlug}.parentPlugin}"
plugin=
"@{plugin}"
pluginsrc=
"@{pluginsrc}"
pluginlib=
"@{pluginlib}"
/>
</then>
</if>
<echo
message=
"Compile parent plugin @{parentPlug}"
/>
<javac
destdir=
"${plugin.dev.dest.dir}/@{plugin}/target/classes"
includeAntRuntime=
"no"
debug=
"on"
source=
"1.5"
target=
"1.5"
>
<src
path=
"@{pluginsrc}/@{parentPlug}/src/java"
/>
<classpath>
<path
refid=
"plugin.dependencies"
/>
<!-- Jars used by the plugin to compile with -->
<fileset
dir=
"@{pluginsrc}/@{parentPlug}"
includes=
"lib/*.jar"
/>
</classpath>
</javac>
</sequential>
</macrodef>
<!-- buildplugin (MACRO) =================================================================== -->
<macrodef
name=
"buildplugin"
>
<attribute
name=
"plugin"
/>
...
...
@@ -1264,31 +1274,23 @@
<mkdir
dir=
"${plugin.dev.dest.dir}"
/>
<mkdir
dir=
"${plugin.dev.dest.dir}/@{plugin}"
/>
<mkdir
dir=
"${plugin.dev.dest.dir}/@{plugin}/target"
/>
<mkdir
dir=
"${plugin.dev.dest.dir}/@{plugin}/target/classes"
/>
<!-- Determine if this plugin has a parent plugin and if so, add it to the classpath. Note that it is
up to the caller to guarantee that a parent plugin has already been compiled!
-->
<xmlproperty
file=
"${plugin.src.dir}/@{plugin}/plugin.xml"
keeproot=
"true"
/>
<xmlproperty
file=
"${plugin.src.dir}/@{plugin}/plugin.xml"
prefix=
"@{plugin}"
keeproot=
"false"
/>
<if>
<isset
property=
"
plugin
.parentPlugin"
/>
<isset
property=
"
@{plugin}
.parentPlugin"
/>
<then>
<echo>
Parent plugin found: ${plugin.parentPlugin}
</echo>
<path
id=
"plugin.classpath.source"
>
<path
refid=
"plugin.dependencies"
/>
<fileset
dir=
"@{pluginsrc}/@{plugin}"
includes=
"lib/*.jar"
/>
<fileset
dir=
"${plugin.dev.dest.dir}/${plugin.parentPlugin}/target/"
includes=
"lib/*.jar"
/>
</path>
<echo>
Parent plugin found: ${@{plugin}.parentPlugin}
</echo>
<buildparentplugin
parentPlug=
"${@{plugin}.parentPlugin}"
plugin=
"@{plugin}"
pluginsrc=
"@{pluginsrc}"
pluginlib=
"@{pluginlib}"
/>
</then>
<else>
<path
id=
"plugin.classpath.source"
>
<path
refid=
"plugin.dependencies"
/>
<fileset
dir=
"@{pluginsrc}/@{plugin}"
includes=
"lib/*.jar"
/>
</path>
</else>
</if>
<path
id=
"plugin.classpath.source"
>
<path
refid=
"plugin.dependencies"
/>
<fileset
dir=
"@{pluginsrc}/@{plugin}"
includes=
"lib/*.jar"
/>
</path>
<!-- Compile plugin source code -->
<mkdir
dir=
"${plugin.dev.dest.dir}/@{plugin}/target/classes"
/>
<of.javac
destdir=
"${plugin.dev.dest.dir}/@{plugin}/target/classes"
classpathref=
"plugin.classpath.source"
>
<src
path=
"@{pluginsrc}/@{plugin}/src/java"
/>
</of.javac>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment