Commit 4b9c341e authored by Guus der Kinderen's avatar Guus der Kinderen

OF-546: Plugin artifact rework

Previously, the openfire-plugin-assembly artifact replaced the default artifact. When using
plugin project as a Maven dependency, this causes oddities: the dependency still is a JAR file,
but does not conform to a standard archive. This results in missing classes. Instead, this commit
retains the original project artifact. This is expected to be more useful.

Sadly, we appear to can pick only one of these options:

- Attach the openfire-plugin-assembly artifact (making it referencable)
- Define a finalName for this artifact (<artifactname>.plugin)

Both options appear to be mutually exclusive.

More annoyance is prevented by giving the plugin jar file a 'proper' name, I suspect, which is why
I opted for doing that. For the other option, set 'appendAssemblyId' to true, and remove the
'attach' element of the 'make-assembly' block.

The removed openfire-plugin-jar assembly does not appear to have a practical purpose: it builds a
jar file that is pretty similar to the standard artifact (it misses some metadata, and its final
name is different). Removing this assembly reduces complexity, at the cost of a benefit that I
cannot see.
parent 6fbd4127
......@@ -11,7 +11,7 @@
<!-- metadata files (plugin.xml, icons, etc). -->
<fileSet>
<outputDirectory>/</outputDirectory>
<outputDirectory/>
<directory>${project.build.sourceDirectory}/../..</directory>
<includes>
<include>*.html</include>
......@@ -23,7 +23,7 @@
<!-- database, i18n and web directory -->
<fileSet>
<outputDirectory>/</outputDirectory>
<outputDirectory/>
<directory>${project.build.sourceDirectory}/..</directory>
<includes>
<include>database/**</include>
......@@ -39,30 +39,20 @@
<!-- web.xml (it will be modified by JspC -->
<fileSet>
<outputDirectory>/web/WEB-INF</outputDirectory>
<outputDirectory>web/WEB-INF</outputDirectory>
<directory>${project.build.directory}</directory>
<includes>
<include>web.xml</include>
</includes>
</fileSet>
<!-- The jar-file containing the compiled plugin code. This is assembled
by the assembly descriptor "openfire-plugin-jar" -->
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>/lib</outputDirectory>
<includes>
<include>plugin-${project.artifactId}.jar</include>
</includes>
</fileSet>
</fileSets>
<!-- Bundle the dependencies of this plugin -->
<dependencySets>
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
</dependencySet>
</dependencySets>
</assembly>
\ No newline at end of file
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>openfire-plugin-jar</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
......@@ -81,21 +81,6 @@
</dependency>
</dependencies>
<executions>
<execution>
<id>make-plugin-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>plugin-${project.artifactId}</finalName>
<!-- This is where we use our shared assembly descriptor -->
<descriptorRefs>
<descriptorRef>openfire-plugin-jar</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
<execution>
<id>make-assembly</id>
<phase>package</phase>
......@@ -105,6 +90,7 @@
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.artifactId}</finalName>
<attach>false</attach>
<!-- This is where we use our shared assembly descriptor -->
<descriptorRefs>
<descriptorRef>openfire-plugin-assembly</descriptorRef>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment