Marco Rothe created MEJB-83:
-------------------------------

             Summary: EJB jar build on windows has broken file permissions
                 Key: MEJB-83
                 URL: https://issues.apache.org/jira/browse/MEJB-83
             Project: Maven EJB Plugin
          Issue Type: Bug
    Affects Versions: 2.5
         Environment: Maven 3.2.2, Linux/Windows
            Reporter: Marco Rothe
            Priority: Critical


If a EJB jar file is created on windows (using the maven-ejb-plugin 2.5) the 
jar file has broken (unix) file permissions. If this file is used for a build 
running on linux which package the EJB jar into an EAR the copy task fails:

INFO] --- maven-ear-plugin:2.10:ear (default-ear) @ ...-ear ---
[INFO] Copying artifact [ejb:com.acme.foobar-ejb:3.9.1] to 
[foobar-ejb-3.9.1.jar]
...
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-ear-plugin:2.10:ear (default-ear)
...
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoFailureException: Problem getting 
permission from mode for 
/opt/buildsystem/jenkins/workspace/baz/baz-ear/target/temp/foobar-ejb-3.9.1.jar/com/acme/foobar/ejb/FooBarBean.class
 at 
org.apache.maven.plugin.ear.EarMojo.changeManifestClasspath(EarMojo.java:896)
        at org.apache.maven.plugin.ear.EarMojo.copyModules(EarMojo.java:469)
        at org.apache.maven.plugin.ear.EarMojo.execute(EarMojo.java:330)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 27 more

If I downgrade to ejb plugin 2.4 on the windows machine building the EJB jar 
then the resulting jar can be used on linux as dependency of the EAR without 
any problems. So there must be an issue related to (setting/storing) file 
permissions on building the EJB jar file.

The problem seams to be the same as in 
https://issues.apache.org/jira/browse/MWAR-341 and releated to the PLXCOMP-280 
problem.
So this issue will be probably fixed with an upgrade to plexus-io 2.4.1.

The issue is breaking some of our builds as we run CI on linux, but creating 
releases mostly on windows.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to