[
https://issues.apache.org/jira/browse/SHINDIG-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597383#action_12597383
]
Henning Schmiedehausen commented on SHINDIG-269:
------------------------------------------------
So how is it used? As far as I can see, it is linked into the example server
(in the pom) and the gadget server (again in the pom) and the javascript files
end up in the gadget server jar. They are all treated equal. I do understand
that every subdirectory in the features directory is a feature that is offered
by the gadget server and that you can modify the features.txt file to turn
features on or off. What this patch does is simply change the way the features
are packaged up.
Now:
- the gadget server build runs the feature test suite
- the features javascript files end up in the shindig-gadgets.jar
- the files are copied around in a number of places
- replacing the javascript files in production is difficult because you either
have to swap the gadget server jar or replace single files on the FS
With the patch:
- the features test suite is run in its own project
- the features javascript ends up in its own jar which gets placed on the
classpath
- no javascript files are copied around, the sample server just has the
shindig-features jar on the classpath
- replacing the javascript files in production is swapping out the
shindig-features jar.
I fail to see why this is a big deal. And moving the feature subdirectories out
of the root would allow you to write
<resources>
<resource>
<targetPath>/features</targetPath>
<directory>${basedir}/src/javascript</directory>
</resource>
</resources>
instead of
<resources>
<resource>
<targetPath>/features</targetPath>
<directory>${basedir}</directory>
<includes>
<include>**/*.js</include>
<include>**/*.xml</include>
<include>features.txt</include>
</includes>
<excludes>
<exclude>pom.xml</exclude>
<exclude>target/**</exclude>
</excludes>
</resource>
</resources>
Did you actually look at the patch?
> package all features in a single jar, load from classpath
> ---------------------------------------------------------
>
> Key: SHINDIG-269
> URL: https://issues.apache.org/jira/browse/SHINDIG-269
> Project: Shindig
> Issue Type: Improvement
> Components: Features (Javascript), Gadget Rendering Server (Java)
> Reporter: Henning Schmiedehausen
> Attachments: javascript-jar.patch
>
>
> The attached patch creates a Maven project for the features directory. This
> allows automatic packaging up of the features into a single jar, which then
> can be placed on the classpath for the gadget server and the demo container.
> This removes the need for the various javascript related plugins from the
> gadget rendering server and also a number of the cross-project linking and
> copying. The features directory itself is not modified, so the PHP version
> should still run fine.
> In the long run, it might be good to move the features out of the root
> directory and into e.g. src/javascript to allow better control of the jar
> creation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.