Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Problem with m2e and resource filtering

This is correct. We do not plan to backport any new features/bugfixes
from 0.13 to 0.12 at this point.

--
Regards,
Igor

On 11-03-29 03:19 PM, Rafael Vanderlei wrote:
I see. So...has development over 0.12.x been stopped? Any corrections
that could possibly be needed to be made on 0.12.x  would only be
released along with 0.13.x in June?

Thanks again.

Regards,
Rafael.

On Tue, Mar 29, 2011 at 4:12 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:

    There is no "upgrade" from 0.12.x to 0.13.x unfortunately, so you need
    to create fresh eclipse installation and new workspace and reimport all
    your projects.

    Also, keep in mind that 0.13 won't be officially released until June, it
    is still work in progress and occasional regressions are expected. We do
    try to fix them as fast as we can.

    --
    Regards,
    Igor


    On 11-03-29 03:06 PM, Rafael Vanderlei wrote:

        Sorry again.. so to update m2e in order to use your fix, I just
        need to
        go "Eclipse > Help > Install New Software" and fill address
        field with
        the url [1]?

        Currently, I'm using the version 0.12.1.20110112-1712 of
        M2Eclipse and I
        noticed that here the folders are in a different structure from the
        version I'm about to update (0.13.0.201103291237) .. while in
        0.12.x I
        see something like "org.maven.ide.eclipse.*" in 0.13.x I see
        something
        like "org.eclipse.m2e.*"

        Would it be a problem if I tried to update this way?

        [1]
        https://repository.sonatype.org/content/repositories/forge-sites/m2e/0.13.0/N/0.13.0.201103291237/

        Thanks and regards,
        Rafael.

        On Tue, Mar 29, 2011 at 3:46 PM, Igor Fedorenko
        <igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>
        <mailto:igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>> wrote:

            m2e CI build is configured to deploy snapshot builds as separate
            directories under [1]. It will also be available as part of
        3.7M7
            milestone build.

            [1]
        https://repository.sonatype.org/content/repositories/forge-sites/m2e/0.13.0/N/

            --
            Regards,
            Igor


            On 11-03-29 02:42 PM, Rafael Vanderlei wrote:

                Hi, Igor. Thanks for fixing it, but how can I do to use the
                version of
                m2e that already has the fix for this? I believe this
        version is
                not yet
                available at "Eclipse > Help > Check for Updates" nor at
        "Eclipse > Help
         > Install New Software".

                Sorry. I don´t know that because I have never downloaded a
        "non-head"
                version of m2eclipse before.

                On Tue, Mar 29, 2011 at 2:34 PM, Igor Fedorenko
        <igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>
        <mailto:igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>
        <mailto:igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>
        <mailto:igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>>> wrote:

                    Should be fixed in master now

        https://bugs.eclipse.org/bugs/show_bug.cgi?id=341253

                    --
                    Regards,
                    Igor


                    On 11-03-29 10:24 AM, Rafael Vanderlei wrote:

                        Hi everyone.

                        I'm stuck on this problem since yesterday on my
        project
                and I now I
                        decided to create a new and clean project for
        you to easily
                        reproduce
                        the error (which I'm attaching on the mail).

                        To help you reproduce it, I created a simple
        multi module
                        project with
                        two modules with the structure below:

                        - resource-filtering-bug
                        --- pom.xml
                        --- module a
                        ------ pom.xml
                        ------ src/main/java/ModuleAClass.java
                        --- module b
                        ------ pom.xml
                        ------ src/main/resources/filtered-file.txt

                        In module a 's pom.xml I have this:

        <properties>
        <my.property.value>property value from module A</my.property.value>
        </properties>

        <build>
        <resources>
        <resource>
        <targetPath>${basedir}/temporary-filtered-resources</targetPath>
        <directory>../module-b/src/main/resources</directory>
        <filtering>true</filtering>
        </resource>
        </resources>
        </build>

                        While in module b 's pom.xml I have this:

        <properties>
        <my.property.value>property value from module B</my.property.value>
        </properties>

        <build>
        <resources>
        <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        </resource>
        </resources>
        </build>

                        When I run ' mvn package ' from CLI I have the
        expected
                behavior
                        (Maven
                        creates
        temporary-filtered-resources/filtered-file.txt under
                        module a 's
                        directory switching my.property.value for "property
                value from
                        module A".

                        But when I use m2e, It creates the folder
                        temporary-filtered-resources
                        under module a 's directory, but inside it
        instead of
                having the
                        filtered-file.txt file (with my.property.value
        properly
                switched for
        "property value from module A"), I have the struture
                        target/classes with
                        no files inside it. Then when I look at Eclipse
        log file
                I have this
                        entry, which may be the root of the problem (I
        noticed
                it´s like
                        m2e is
                        considering module a 's
        src/main/java/ModuleAClass as a
                module b 's
                        resource and trying to copy it from module b to
        module
                a, but of
                        course
                        this file doesn´t exist in module b and I get
        the error):


                        !ENTRY org.maven.ide.eclipse 4 0 2011-03-29
        10:56:29.313
                        !MESSAGE Build errors for module-a
                        !STACK 0

          org.apache.maven.lifecycle.LifecycleExecutionException:
                Failed to
                        execute goal


          org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources
                        (default-resources) on project module-a:


          C:\dtp\dependencies\resource-filtering-bug\module-b\src\main\resources\target\classes\ModuleAClass.class
                        (O sistema não pode encontrar o caminho
        especificado)
                             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:319)
                             at
                org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
                             at


          org.maven.ide.eclipse.internal.embedder.MavenImpl.execute(MavenImpl.java:223)
                             at


          org.maven.ide.eclipse.internal.project.GenericBuildParticipant.executePostBuild(GenericBuildParticipant.java:138)
                             at


          org.maven.ide.eclipse.internal.project.GenericBuildParticipant.build(GenericBuildParticipant.java:77)
                             at


          org.maven.ide.eclipse.internal.builder.MavenBuilder.build(MavenBuilder.java:153)
                             at


          org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
                             at
                org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
                             at


          org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
                             at


          org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
                             at


          org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
                             at
                org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
                             at


          org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
                             at


          org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
                             at


          org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
                             at


          org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
                             at


          org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
                             at
                org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
                        Caused by:
        org.apache.maven.plugin.MojoExecutionException:


          C:\dtp\dependencies\resource-filtering-bug\module-b\src\main\resources\target\classes\ModuleAClass.class
                        (O sistema não pode encontrar o caminho
        especificado)
                             at


          org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:269)
                             at


          org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
                             at


          org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
                             ... 24 more
                        Caused by:

          org.apache.maven.shared.filtering.MavenFilteringException:


          C:\dtp\dependencies\resource-filtering-bug\module-b\src\main\resources\target\classes\ModuleAClass.class
                        (O sistema não pode encontrar o caminho
        especificado)
                             at


          org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile(DefaultMavenFileFilter.java:130)
                             at


          org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:267)
                             at


          org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:265)
                             ... 26 more
                        Caused by: java.io.FileNotFoundException:


          C:\dtp\dependencies\resource-filtering-bug\module-b\src\main\resources\target\classes\ModuleAClass.class
                        (O sistema não pode encontrar o caminho
        especificado)
                             at java.io.FileInputStream.open(Native Method)
                             at
                java.io.FileInputStream.<init>(FileInputStream.java:106)
                             at
        java.io.FileReader.<init>(FileReader.java:55)
                             at


          org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:2201)
                             at


          org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:2170)
                             at


          org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile(DefaultMavenFileFilter.java:115)
                             ... 28 more



                        Below there are a few descriptions of the files I am
                attaching
                        to help
                        you understand them:

                        1. On the file resource-filtering-bug.rar there
        is the
                clean Maven
                        project (without Eclipse files, just .java
        files, .txt
                resources
                        and pom
                        files)

                        2. On the file
        resource-filtering-bug-after-mvn-package.rar
                        there is the
                        result of a simple ' mvn package ' that I ran
        from CLI (and
                        which is the
                        result I would expect from m2e, but it´s failing)

                        3. On the file

          resource-filtering-bug-after-eclipse-project-clean.rar
                        there is the failed result of a simple ' Project
        < Clean
        ' that
                        I ran
                        from Eclipse (and which is the result I was not
                expecting, as I
                        expected
                        the result in file 2 described above)

                        4. On the file eclipse_log_error.txt there is
        the log I
                found
                        for m2e
                        execution, which may give you clues to find the
        problem
                that is
                        going on.

                        So, do you guys have any idea of when this would be
                fixed and,
                        in the
                        meanwhile, do you have any workaround to this
        problem?

                        Thanks and regards,

                        Rafael Vanderlei.



                        _______________________________________________
                        m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>>


        https://dev.eclipse.org/mailman/listinfo/m2e-users

                    _______________________________________________
                    m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>>


        https://dev.eclipse.org/mailman/listinfo/m2e-users


            _______________________________________________
            m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>
        https://dev.eclipse.org/mailman/listinfo/m2e-users


    _______________________________________________
    m2e-users mailing list
    m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/m2e-users




Back to the top