[
http://jira.codehaus.org/browse/MJBOSSPACK-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brent N Atkinson updated MJBOSSPACK-19:
---------------------------------------
Attachment: MJBOSSPACK-19.patch
I'm attaching a patch based on what Peter started. It has to work around issues
caused by assumptions made in AbstractPackagingMojo:
1.) Detection of descriptor is done before specific packaging is called. I
tried doing the custom packaging by overriding the provided method, but the
descriptor check fails before the method ever gets called.
2.) Jar packaging conventions are assumed. Unlike a normal jar, jbpm process
archives put class path resources under a classes subdirectory. Also, included
dependencies are assumed to be bundled in the classes directory as well
(according to Peter's patch - this may not be necessary). To delegate handling
to subclasses I followed Peter's idea of using methods to package classpath
resources and dependent artifacts and overrode them in the ParMojo to deviate
from the defaults. I configured the ArtifactHandler for pars so they are not
put in the classpath. This is because the classes aren't in a usable location
within the archive.
3.) There's no way to handle resources in a general way. To work around this, I
added an empty processResources() method and overrode it in the ParMojo to
mimick the resource plugin. Descriptors are handled properly because this
method is called before the descriptor check.
I think this might point to a need for a more abstract AbstractPackagingPlugin.
It would have an explodedPackaging() method that would do something like:
packageResources(); // Packages non-classpath resources (resources plugin
handles those)
packageClasses(); // Packages content normally put in outputDirectory
packageLibs(); // Optionally packaged of dependent artifacts
packageDescriptor(); // Conditionally packages descriptor
verifyContents(); // Checks that packaging requirements are met and throws
exception on failure
The default implementations would keep the existing mojos intact, but
subclasses could change the way this works by overriding the methods. An
alternative might be to use component injection rather than inheritance to
factor out shared code.
> Create a Par archive for deployable jbpm processes
> --------------------------------------------------
>
> Key: MJBOSSPACK-19
> URL: http://jira.codehaus.org/browse/MJBOSSPACK-19
> Project: Maven 2.x JBoss Packaging Plugin
> Issue Type: New Feature
> Affects Versions: 2.0-beta-1
> Environment: mac os x, maven 2.0.9, java 1.5.0_16-b06-284
> Reporter: Peter Andersen
> Priority: Minor
> Attachments: MJBOSSPACK-19.patch, par-archive-support.zip,
> par-archive-support.zip
>
>
> The jboss packaging plugin are missing the par format for deployable jbpm
> processes
> I have attached a zip file containing a svn patch and som additional code
> implementing this functionality.
> I am not a committer, hope someone will take this into the plugin
> Uses:
> src/main/jbpm contain jbpm resources which is placed into root of the archive
> src/main/jpdl/<process name> contain the process definition, which is placed
> into the root of the archive
> Classes and dependencies are placed into the classes folder in the archive.
> Best regards
> Peter
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email