[Comment Edited] (MEAR-212) Failed to initialize ear modules: Unknown artifact type[mar] for addressing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Comment Edited] (MEAR-212) Failed to initialize ear modules: Unknown artifact type[mar] for addressing

Jack Leech (Jira)

    [ https://issues.apache.org/jira/browse/MEAR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195901#comment-17195901 ]

Marat Abrarov edited comment on MEAR-212 at 9/15/20, 6:22 AM:
--------------------------------------------------------------

[~dahoffer], could that workaround (custom type mapping of EAR modules) from MEAR-216 work for you?


was (Author: abrarovm):
[~dahoffer], could you please provide minimal maven project reproducing this issue?
Could [that workaround|https://issues.apache.org/jira/browse/MEAR-216?focusedCommentId=17195895&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17195895] (custom type mapping of EAR modules) from MEAR-216 work for you?

> Failed to initialize ear modules: Unknown artifact type[mar] for addressing
> ---------------------------------------------------------------------------
>
>                 Key: MEAR-212
>                 URL: https://issues.apache.org/jira/browse/MEAR-212
>             Project: Maven Ear Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.10
>            Reporter: David Hoffer
>            Priority: Minor
>             Fix For: 3.1.0
>
>
> I'm trying to generate and ear file but I'm getting the following message:  Failed to initialize ear modules: Unknown artifact type[mar] for addressing  (full debug stack trace is below)
> However I don't have any mar artifacts in my dependencies.  What I do have is a war that has 4 mar files added as resources and I'm making a ear with the skinny war feature.
> Why would the ear plugin give this error when it has no nothing to do with the mar resources in the war...or perhaps this error has nothing to do with those resources, not sure.
> {code}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.10:generate-application-xml (default-generate-application-xml) on project coreservices-ear: Failed to initialize ear modules: Unknown artifact type[mar] for addressing -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.10:generate-application-xml (default-generate-application-xml) on project coreservices-ear: Failed to initialize ear modules
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to initialize ear modules
> at org.apache.maven.plugin.ear.AbstractEarMojo.execute(AbstractEarMojo.java:260)
> at org.apache.maven.plugin.ear.GenerateApplicationXmlMojo.execute(GenerateApplicationXmlMojo.java:162)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> ... 19 more
> Caused by: org.apache.maven.plugin.ear.UnknownArtifactTypeException: Unknown artifact type[mar] for addressing
> at org.apache.maven.plugin.ear.EarModuleFactory.newEarModule(EarModuleFactory.java:88)
> at org.apache.maven.plugin.ear.AbstractEarMojo.execute(AbstractEarMojo.java:250)
> ... 22 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)