You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Assaf Arkin (JIRA)" <ji...@apache.org> on 2008/02/01 01:55:07 UTC

[jira] Commented: (BUILDR-26) Ear Packaging improvements

    [ https://issues.apache.org/jira/browse/BUILDR-26?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564576#action_12564576 ] 

Assaf Arkin commented on BUILDR-26:
-----------------------------------

>From Ingo Schmidt:

>> I am adding a WAR and an EJB to my EAR like so:
>>  package(:ear).add :war=>project("webapp-war").package(:war)
>>  package(:ear).add :ejb=>project("my-ejb").package(:jar)
>>  I run the build and the result is as expected. Now I comment out
>>  the line add the EJB to my EAR and run buildr again (no clean
>>  task). But my application.xml still has the entry for the EJB.
>>  Why is this so? I have seen this happen in other places in buildr,
>>  too. Too bad, I didn't write those cases down.

Here's a possible solution, need to see if it will work:

Add the buildfile (Rake.application.rakefile) as a prerequisite for the application.xml task, forcing this task to run every time the build file changes.  This will detect changes like removing a component, the downside is that it will re-build the EAR every single time the buildfile changes.

Improve on it by creating the XML in memory, comparing it to the contents of the existing application.xml, and only writing the file if there's a change.  That way, the application.xml task will run every time the buildfile changes, but the EAR task will only run if there's a substantial change to application.xml.


>> Is there any way to add a WAR to my EAR as open directory and not
>>   as *.war file?
>>  I need this because I don't think you can tell IIS to use a *.war file
>>  as document root...
>> Is there any way to change/modify the EAR task to do this for me?
>>  Would be very handy, because the EAR task so nicely builds the
>>  application.xml on the fly.
>>  Currently I need to unzip the WAR and modify application.xml by
>>  hand. It would just be so much nicer to have it all automated.

Ideas?

> Ear Packaging improvements
> --------------------------
>
>                 Key: BUILDR-26
>                 URL: https://issues.apache.org/jira/browse/BUILDR-26
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Victor Hugo Borja
>             Fix For: 1.3
>
>         Attachments: 0001-Fixed-ZipTask-to-pass-Buildr-Packaging-war-should.patch, 0002-EAR-packaging-additions.patch, 0003-Made-each-EAR-components-classpath-relative-to-the.patch, 0004-avoid-updating-parent-projects-manifest.patch, 0005-Generate-application.xml-under-the-project-s-target.patch, buildfile
>
>
> EAR descriptor must be generated under target as anything generated by buildr. 
> update_classpath method was modifying inherited manifest, thus causing EAR packages to contain Class-Path entries themselves, according to the specs ear packages may not have a Class-Path on their manifest. 
> Improvements on EAR package DSL, also fixed Class-Path generated entries according to the Jar specification at http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.