JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
enhancement_small.png
CLOSED  Enhancement JPPF-578  -  Allow jppf-admin-web jar dependency as alternative to war to make embedding possible
Posted Feb 10, 2019 - updated Mar 02, 2019
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Enhancement
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     gsubes
  • Owned by
    Not owned by anyone
  • Category
    Build
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Targetted for
    icon_milestones.png JPF 6.0.3
Issue description
I would like to embed jppf-admin-web into my own embedded webserver as an executable jar. I need jppf-admin-web as a jar dependency instead of war to make this work. I would define my own web.xml for this and ignore the one inside

See description here: https://pragmaticintegrator.wordpress.com/2010/10/22/using-a-war-module-as-dependency-in-maven/

You would need to add:
<build>
...
 <plugins>
 ...
    <plugin>
     <artifactId>maven-war-plugin</artifactId>
     <version>${version.maven-war-plugin}</version>
     <configuration>
       <attachClasses>true</attachClasses>
     </configuration>
   </plugin>
 ...
 </plugins>
...
</build>
So that I could use:
<dependency>
  <groupId>org.jppf</groupId>
  <artifactId>jppf-admin-web</artifactId>
  <version>${version.jppf}</version>
  <classifier>classes</classifier>
</dependency>
Also it would be nice if you could define the jppf.css and and images/ as maven resources behind a package name and add those resources into the classes folder. You could then mount those resources in your wicket application under your current paths using PackageResourceReferences to serve them from the classpath. This makes embedding easier and I don't have to copy these resources myself then.

#2
Comment posted by
 lolo4j
Feb 11, 10:02
Since we're using Ant, not Maven, as our build framework, I cannot promise that everything you ask will be implemented. What I'm sure of:
  • we can produce and publish to Sonatype/Maven central a ppf-admin-web-<version>.jar
  • I'll see how to mount the css and images from the classpath, instead of our current setup (haven't used Wicket for some time, and I tend to forget)
Would this work?
#4
Comment posted by
 lolo4j
Feb 24, 22:36
First step done: all images and css were moved to the resources folder and are now used as Wicket shared resources loaded from the classpath.

Pushed to master and b_6_0 branch.
#5
Comment posted by
 lolo4j
Mar 02, 05:33
Second and final step done. We now create an additional artifact jppf-admin-web-embedded, packaged as a jar and which can be mebedded in another web app. Snapshots available in the Sonatype repository.