xtext / maven-xtext-example

An Xtext language and example usage of it built with Maven
61 stars 33 forks source link

Problem between maven-exec-plugin and asm 5 #25

Closed victornoel closed 9 years ago

victornoel commented 10 years ago

Hi,

Problem

maven-exec-plugin 1.3 itself depends on an old version of asm (see: http://mojo.codehaus.org/exec-maven-plugin/dependencies.html).

When executing Mwe2Launcher with xtext 2.6, which relies on asm 5.0.1, common types can't detect the correct version of asm, it shows the following warning (got it just by changing all the xtext/xtend dependencies of maven-xtext-example from 2.5 to 2.6.0, and the version of maven-exec-plugin from 1.2.1 to 1.3):

0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - --- xtext.common.types ---------------------------------------------------
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - ASM library is too old. Falling back to java.lang.reflect API.
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - Please note that no information about compile time constants is available.
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - It's recommended to use org.objectweb.asm 5.0.1 or better.
1    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] WARN  pes.access.impl.DeclaredTypeFactory  - --------------------------------------------------------------------------

Solution

For now, the solution I found is to exclude the three asm dependencies of exec-maven-plugin by adding in the dependencies the following along with the 2 dependencies to xtext and xbase:

                    <dependency>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-plugin-plugin</artifactId>
                        <version>3.2</version>
                        <exclusions>
                            <exclusion>
                                <groupId>asm</groupId>
                                <artifactId>asm</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>asm</groupId>
                                <artifactId>asm-commons</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>asm</groupId>
                                <artifactId>asm-tree</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
wadkar commented 10 years ago

Faced the same issue just now. Thanks for the workaround.

victornoel commented 9 years ago

Hi, I think this is closed now, because the current version of exec-maven-plugin does not have the dependency anymore.