Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      When directory deploying an ear project often a majority of the time is spent unnecessarily building the ear archive i.e. "Building jar: ...". Since it isn't needed during development it'd be nice if the ear plugin could be configured to stop short of actually building the archive file.

      The attahced patch adds a createEarFile property to the EarMojo class to control whether to create the .ear file archive or not.

      All changes in this patch are in the EarMojo.java file which is also attached.

      1. EarMojo.java
        16 kB
        Kem Elbrader
      2. EarMojo.patch
        3 kB
        Kem Elbrader

        Issue Links

          Activity

          Hide
          Kem Elbrader added a comment -

          See
          http://mail-archives.apache.org/mod_mbox/maven-users/200809.mbox/<e4fe0c450809220941i65f505aal68fa5fdf48e56912@mail.gmail.com>
          for mailing list discussion.

          Show
          Kem Elbrader added a comment - See http://mail-archives.apache.org/mod_mbox/maven-users/200809.mbox/ <e4fe0c450809220941i65f505aal68fa5fdf48e56912@mail.gmail.com> for mailing list discussion.
          Hide
          Kem Elbrader added a comment -

          Note: link above must be copied. Jira didn't like me pasting it

          Show
          Kem Elbrader added a comment - Note: link above must be copied. Jira didn't like me pasting it
          Hide
          Kem Elbrader added a comment -

          Something to consider is that when using createEarFile = false the install phase will break. With

          [ERROR]The following mojo encountered an error while executing:
          [ERROR]Group-Id: org.apache.maven.plugins
          [ERROR]Artifact-Id: maven-install-plugin
          [ERROR]Version: 2.2
          [ERROR]Mojo: install
          [ERROR]brought in via: packaging: ear
          [ERROR]While building project:
          [ERROR]Group-Id:

          {groupid}

          [ERROR]Artifact-Id:

          {artifactid}

          [ERROR]Version:

          {version}

          [ERROR]From file:

          {fromfile}

          [ERROR]Reason: The packaging for this project did not assign a file to the build artifact

          Show
          Kem Elbrader added a comment - Something to consider is that when using createEarFile = false the install phase will break. With [ERROR] The following mojo encountered an error while executing: [ERROR] Group-Id: org.apache.maven.plugins [ERROR] Artifact-Id: maven-install-plugin [ERROR] Version: 2.2 [ERROR] Mojo: install [ERROR] brought in via: packaging: ear [ERROR] While building project: [ERROR] Group-Id: {groupid} [ERROR] Artifact-Id: {artifactid} [ERROR] Version: {version} [ERROR] From file: {fromfile} [ERROR] Reason: The packaging for this project did not assign a file to the build artifact
          Hide
          Stéphane Nicoll added a comment -

          That's why I am against it. I understand the need but the true answer to your request is to have a separate goal to build the ear and a separate goal to actually build the archive which we don't have for the moment.

          Show
          Stéphane Nicoll added a comment - That's why I am against it. I understand the need but the true answer to your request is to have a separate goal to build the ear and a separate goal to actually build the archive which we don't have for the moment.
          Hide
          Kem Elbrader added a comment -

          Executing a separate goal wouldn't perform the work done by goals in earlier phases e.g. ear:generate-application-xml.

          Seems that the standard life cycle will often result in significant and unnecessary work being done. Makes me wonder whether there should be a life cycle devoted to situations where the resulting jar file isn't needed.

          Show
          Kem Elbrader added a comment - Executing a separate goal wouldn't perform the work done by goals in earlier phases e.g. ear:generate-application-xml. Seems that the standard life cycle will often result in significant and unnecessary work being done. Makes me wonder whether there should be a life cycle devoted to situations where the resulting jar file isn't needed.
          Hide
          Stéphane Nicoll added a comment - - edited

          It's called prepare-package. We should consider changing the lifecycle, indeed.

          Show
          Stéphane Nicoll added a comment - - edited It's called prepare-package. We should consider changing the lifecycle, indeed.
          Hide
          Karl-Heinz Marbaise added a comment -

          In the meantime a goal generate-application-xml exists. So i close the issue. If you have an objections don't hesitate to reopen the issue.

          Show
          Karl-Heinz Marbaise added a comment - In the meantime a goal generate-application-xml exists. So i close the issue. If you have an objections don't hesitate to reopen the issue.

            People

            • Assignee:
              Karl-Heinz Marbaise
              Reporter:
              Kem Elbrader
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: