elharo commented on issue #382:
URL: 
https://github.com/apache/maven-ear-plugin/issues/382#issuecomment-5103815146

   10 years in I doubt we'll add this. Gemini elaborates:
   
   The feature proposed in [[issue 
#382](https://github.com/apache/maven-ear-plugin/issues/382)](https://github.com/apache/maven-ear-plugin/issues/382)
 (originally tracked as MEAR-212) requests native support for the `mar` (Axis2 
Module Archive) artifact type in the Maven EAR Plugin to prevent the build from 
failing with a `Failed to initialize ear modules: Unknown artifact type[mar]` 
error.
   
   Implementing native support for this specific artifact type within the 
plugin is not worthwhile for two primary reasons:
   
   1. **Lack of Specification Alignment:** The Java EE and Jakarta EE 
specifications for Enterprise Archives (EAR) strictly define standard module 
types such as `jar`, `war`, `ejb`, `rar`, and `app-client`. Java EE application 
servers do not possess native deployment semantics for Axis2 `.mar` files at 
the EAR root level.
   2. **Existing Configuration Mechanism:** The Maven EAR Plugin already 
includes a built-in feature to handle custom or framework-specific artifact 
types without requiring source code modifications to the plugin itself.
   
   Users encountering the `Unknown artifact type[mar]` error can resolve it 
immediately by mapping the custom `mar` extension to the standard `jar` type 
using the `<artifactTypeMappings>` parameter. This configuration instructs the 
plugin to package the `.mar` file exactly as it would a standard Java library.
   
   ```xml
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-ear-plugin</artifactId>
     <version>3.4.0</version> <!-- Replace with your current version -->
     <configuration>
       <artifactTypeMappings>
         <artifactTypeMapping type="mar" mapping="jar" />
       </artifactTypeMappings>
     </configuration>
   </plugin>
   
   ```
   
   Because this explicit workaround exists in the standard configuration, and 
`.mar` is a proprietary archive format rather than an industry standard, 
expanding the plugin's internal artifact handlers to accommodate it natively 
adds unnecessary complexity with no distinct operational advantage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to