Hi Adrien,

Thanks for the pointer. I understand the motivation behind the current behavior but I agree with you, not checking in the .classpath is not an option for us. The current behavior is IMO a bug.

Question to Igor: If I specify maven.pomderived = "false" or don't specify maven.pomderived at all, why doesn't m2e leave the entry unaltered?

- thomas


On 2013-04-12 18:58, Adrien Rivard wrote:
The .classpath project does not reflect what really happen with m2e, it will do exactly like the command line. Without m2e, it will not work and there is no way around this. Your only option it to not commit the .classpath and let others people generate their own.(Not really an option IMO)

See the faq entry for some background on this :
http://wiki.eclipse.org/M2E_FAQ#Why_resource_folders_in_Java_project_have_excluded.3D.22.2A.22


On Fri, Apr 12, 2013 at 6:41 PM, Thomas Hallgren <tho...@tada.se <mailto:tho...@tada.se>> wrote:

    On 2013-04-12 18:11, Igor Fedorenko wrote:

        src/main/resources directory is not on project compile
        classpath during
        command line build, so I believe "m2e updates my classpathentry in
        accordance with what I've specified in the POM" describes m2e
        behaviour.

    I'm sorry, but no. It doesn't matter what I specify in the POM.
    There's just no way I can specify "copy whatever is there" and
    make that happen.

    - thomas


-- Regards,
        Igor

        On 2013-04-12 11:08 AM, Thomas Hallgren wrote:

            Hi,

            m2e changes my classpath in ways that I would like to
            avoid and I would
            like some hints on how to avoid it.

            I have a folder named src/main/resources where I keep a
            couple of
            non-java files. I expect those files to be copied to the
            target/classes
            folder and included in the jar. With m2e installed, this
            works just fine
            (the m2e builder takes care of this), but when m2e isn't
            installed, the
            build fails. The reason is that m2e keeps changing this
            line in the
            .classpath file from:

                 <classpathentry kind="src" output="target/classes"
            path="src/main/resources"/>

            into:

                 <classpathentry including="**/*.java" kind="src"
            output="target/classes" path="src/main/resources"/>

            so of course, anyone using the project in an IDE where m2e
            is not
            installed will now get errors when trying to run. Please
            note that the
            classpathentry does not have a "maven.pomderived"
            attribute. My
            expectation was that m2e would then leave it alone, but
            unfortunately it
            doesn't.

            Adding this attribute makes things even stranger. Then I
            get the following:

                 <classpathentry excluding="**" kind="src"
            output="target/classes"
            path="src/main/resources">
                     <attributes>
                         <attribute name="maven.pomderived" value="true"/>
                     </attributes>
                 </classpathentry>

            Now instead of including "**/*.java" it decides to exclude
            everything.

            I would like one of two scenarios, and I can live with
            either one:

            1. m2e leaves my classpathentry alone.
            2. m2e updates my classpathentry in accordance with what
            I've specified
            in the POM.

            What do I need to accomplish one of them?

            Regards,
            Thomas Hallgren

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

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


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




--
Adrien Rivard


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

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

Reply via email to