Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Target folder outside project's folder -> exception

as per Mike's blog [1] : " So starting immediately, you will be able to refer to a CLA rather than asking the “three questions” on a bug". 

Now you can still chose to enforce the policy you want AFAUI



On Mon, Sep 16, 2013 at 4:08 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
Fred,

Are you saying that eclipse legal poster is outdated? Do you have a link
that explains the new ip process?

As far as I am concerned, m2e still uses ip process documented in the
poster and I will ask for the answers to the three questions unless
somebody tells me we can't do it any more.

--
Regards,
Igor

On 2013-09-16 9:56 AM, Fred Bricon wrote:
Lucas, I believe you need to sign Eclipse's CLA[1]

quote :
"To complete and submit a CLA, log into the Eclipse projects forge
<https://projects.eclipse.org/user/login/sso>[2] (you will need to
create an account with the Eclipse Foundation if you have not already
done so); click on "Contributor License Agreement"; and Complete the
form. Be sure to use the same email address when you register for the
account that you intend to use when you commit to Git."

[1] http://www.eclipse.org/legal/CLA.php
[2]
https://dev.eclipse.org/site_login/?takemeback=https://projects.eclipse.org/user/login/sso


On Mon, Sep 16, 2013 at 3:41 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:



    On 2013-09-16 9:11 AM, Lucas Persson wrote:

        Hi Igor

        I got four questions

        1)
        When I run the tests on my OSX box the tests seems to timout
        contacting
        the spawned Eclipse/SWT app.
        Is there a way to increase the timout?


    I am not sure. I am on OSX and don't have this problem and haven't heard
    about it either. It may be specific to your environment or the way
    you run the tests. What is exact error message and stack trace you get?


        2)
        You said I should add a regression test for the patch.
        Do you want me to add the tests to
        "org.eclipse.m2e.tests" project or is there some other project
        that is
        the preferred?


    Yes, this the right project.


        3)
        I was planning to call the test class something like
        Bug361824BuildPathsTest.java
        Is that inline with your conventions?


    I suggest you add test361824___targetFolderOutsideBasedir test to
    existing
    BuildPathManagerTest. If the test needs a test project, put it under
    projects/test361824___targetFolderOutsideBasedir.


        4)
        The IP statement in the patch.
        I am happy to use whatever you guys are using as default IP.
        I suppose it is EPL.
        Can you update me on the exact quote I need to use in the patch
        comment?


    It has to be EPL.

    The three questions are from eclipse legal poster [1], figure 11b.
    Usually people write something like

        * I confirm that I wrote 100% of the code
        * I confirm that I have the right to contribute the code to Eclipse
        * I confirm that the file headers contain the appropriate License
          header

    To be perfectly honest, I don't know what exactly the last question is
    meant to convey, so please ask eclipse legal team for explanation if you
    are not comfortable with it.

    [1] http://www.eclipse.org/legal/__EclipseLegalProcessPoster.pdf
    <http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf>

    --
    Regards,
    Igor


        Thanks
        Lucas


        4 sep 2013 kl. 16:25 skrev Igor Fedorenko:

            Sorry, wrong command, you need to run

              mvn clean install -Pits,uts
            -Dm2e-core.url="">to-locally-built-m2e


            --
            Regards,
            Igor

            On 2013-09-04 9:48 AM, Lucas Persson wrote:

                Hi Igor

                OK, I will do the patch on master then.

                But when I compile the tests I get this error:
                [ERROR] Cannot resolve project dependencies:
                [ERROR]   Software being installed:
                org.eclipse.m2e.tests 1.5.0.qualifier
                [ERROR]   Missing requirement: com.ning.async-http-client
                1.6.5.20130902-0741 requires 'package org.slf4j 1.6.2'
                but it could not
                be found


                I do not see that slf4j is downloaded or so.

                When I compile the tests I set
                the
                -Declipse-repo.url="">path-to-locally-built-m2e
                to the unzipped
                site.
                Eg unzip org.eclipse.m2e.site-1.5.0-__SNAPSHOT.zip

                Is that the way to do it?

                Thanks
                Lucas


                4 sep 2013 kl. 13:35 skrev Igor Fedorenko:

                    There were few tags I had forgot to push,
                    m2e-1.4.0.20130601-0317 should
                    work for m2e 1.4.x now.

                    Do note that we will only accept patches that apply
                    and work with latest
                    master HEAD, we do not generally accept patches
                    against older versions.

                    --
                    Regards,
                    Igor

                    On 2013-09-04 5:46 AM, Lucas Persson wrote:

                        Hi again

                        Which tag in the git repo for the tests
                        corresponds with the
                        release tag
                        of "releases/1.4/1.4.0.20130601-__0317"?

                        I do not see any obvious candidate:
                        $ git tag
                        0.10.0.20100205-2200
                        0.10.1.20100510-1546
                        0.10.2.20100623-1649
                        0.11.0.20100811-1422
                        0.11.1.20100927-1222
                        0.12.0.20101115-1102
                        0.13.0.20110321-1300
                        0.13.snapshot
                        MoveToEclipse
                        cq-4572
                        m2e-1.0.100.20110804-1717
                        m2e-1.1.0.20120530-0009
                        m2e-1.3.0.20130129-0926


                        "trunk" or main or head or what ever it is
                        called in git seems to
                        assume
                        m2e is at version 1.5.0-SNAPSHOT so that will
                        not work with the m2e
                        stuff that I build from tag
                          "releases/1.4/1.4.0.20130601-__0317"

                        Thanks
                        Lucas



                        3 sep 2013 kl. 17:49 skrev Igor Fedorenko:

                            The patch has to be attached to bugzilla and
                            has to have IP-related
                            statement in the commit comment. This is
                            Eclipse legal process
                            requirement.

                            To run m2e automated tests from IDE,
                            right-click on
                            org.eclipse.m2e.tests project, run as junit
                            plugin test.
                            Alternatively,
                            you can run the test from command line using

                            mvn clean install -Pits,uts
                            -Declipse-repo.url="">path-to-locally-built-m2e


                            --
                            Regards,
                            Igor

                            On 2013-09-03 11:37 AM, Lucas Persson wrote:

                                Ok

                                Is there some instructions on how to run
                                the tests (the ones in your
                                other git repo )?

                                I generated the patch using git
                                format-patch so I thought it would be
                                correct....

                                Kind regards
                                Lucas

                                3 sep 2013 kl. 17:16 skrev 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>>>:

                                    Lucas,

                                    If you'd like to see this patch
                                    integrated in m2e, you'd need to
                                    submit
                                    it as git-format-patch formatted
                                    patches attached to eclipse
                                    bugzilla
                                    and must have IP-raleted statement
                                    in the commit comment (see
                                    [1] for
                                    details).

                                    You will also need to provide
                                    corresponding automated regression
                                    test.

                                    [1]
                                    http://wiki.eclipse.org/M2E___Development_Environment
                                    <http://wiki.eclipse.org/M2E_Development_Environment>

                                    --
                                    Regards,
                                    Igor

                                    On 2013-09-03 11:02 AM, Lucas
                                    Persson wrote:

                                        Hi Igor

                                        Here is a patch that will
                                        support to have the build folder
                                        outside
                                        the project's folder.
                                        For sure it will fix the
                                        exception at
                                        org.eclipse.m2e.core.project.__configurator.__AbstractLifecycleMapping.__configure(__AbstractLifecycleMapping.java:__71).

                                        I also updated the
                                        AbstractClasspathProvider in the
                                        M2E JDT plugin
                                        so that JUnit works in such cases.

                                        The patch (attached) is based on
                                        a branch on release tag of
                                        "releases/1.4/1.4.0.20130601-__0317"

                                        By this patch the bug
                                        "<https://bugs.eclipse.org/__bugs/show_bug.cgi?id=361824
                                        <https://bugs.eclipse.org/bugs/show_bug.cgi?id=361824>>
                                        -Regression[MNGECLIPSE-767]__Path
                                        must include project and
                                        resource name: /" will be fixed.

                                        Also if this is added the the
                                        root pom.xml
                                                      <pluginExecution>

                                        <pluginExecutionFilter>

                                        <groupId>org.apache.maven.__plugins</groupId>

                                        <artifactId>maven-compiler-__plugin</artifactId>

                                        <versionRange>[2.0,)</__versionRange>
                                                           <goals>

                                        <goal>compile</goal>

                                        <goal>testCompile</goal>
                                                           </goals>
                                                           <parameters>

                                        <compilerId>javac</compilerId>
                                                           </parameters>

                                        </pluginExecutionFilter>
                                                         <action>
                                                           <ignore></ignore>
                                                         </action>
                                                       </pluginExecution>

                                        and given that the .classpatch
                                        and .project looks OK
                                        It will be possible to have the
                                        build folder outside the project's
                                        folder.
                                        (As mentioned in the above bug)
                                        The support will not be that
                                        smooth since the .classpath must be
                                        correct for the beginning
                                        instead of generated by m2e.
                                        But it will work.
                                        Typical .classpath and .project
                                        <classpath>
                                        <classpathentry kind="src"
                                        path="src/main/java" />
                                        <classpathentry kind="src"
                                        path="src/main/resources" />
                                        <classpathentry kind="src"
                                        path="src/test/java"
                                        output="target/test-classes"/>
                                        <classpathentry kind="con"
                                        path="org.eclipse.jdt.__launching.JRE_CONTAINER"/>
                                        <classpathentry kind="con"
                                        path="org.eclipse.m2e.MAVEN2___CLASSPATH_CONTAINER"/>
                                        <classpathentry kind="output"
                                        path="target/classes"/>
                                        </classpath>

                                        <?xml version="1.0"
                                        encoding="UTF-8"?>
                                        <projectDescription>
                                        <name>my-jar-artifactId1</__name>
                                        <comment />
                                        <projects />
                                        <buildSpec>
                                           <buildCommand>

                                        <name>org.eclipse.jdt.core.__javabuilder</name>
                                             <arguments />
                                           </buildCommand>
                                           <buildCommand>

                                        <name>org.eclipse.m2e.core.__maven2Builder</name>
                                             <arguments />
                                           </buildCommand>
                                        </buildSpec>
                                        <natures>

                                        <nature>org.eclipse.jdt.core.__javanature</nature>

                                        <nature>org.eclipse.m2e.core.__maven2Nature</nature>
                                        </natures>
                                        <linkedResources>
                                           <link>
                                             <name>target</name>
                                             <type>2</type>

                                        <locationURI>M2_TARGET/org.__example.groupId1/my-jar-__artifactId1/target</__locationURI>
                                           </link>
                                        </linkedResources>
                                        </projectDescription>

                                        M2_TARGET must be defined in the
                                        workspace and point to the top
                                        "target" folder outside the SCM
                                        area.



                                        Thanks
                                        Lucas








                                        27 aug 2013 kl. 14:10 skrev Igor
                                        Fedorenko:

                                            I think it is reasonable to
                                            patch
                                            AbstractLifecycleMapping#__configure
                                            to
                                            tolerate
                                            projectFacade.__getProjectRelativePath
                                            returning null. I
                                            believe
                                            this was the indent of the
                                            code, so the exception you
                                            get is a
                                            bug.
                                            Please provide a quality
                                            patch (including regression
                                            tests)
                                            and I'll
                                            review it.

                                            To use different
                                            AbstractLifecycleMapping
                                            implementation, you
                                            need to
                                            1. define
                                            org.eclipse.m2e.core.__lifecycleMappings
                                            extension
                                            2. in (parent) pom.xml
                                            specific m2e lifecycle mapping
                                            configuration

                                              <pluginManagement>
                                                <plugins>
                                                  <plugin>

                                              <groupId>org.eclipse.m2e</__groupId>

                                              <artifactId>lifecycle-mapping<__/artifactId>
                                                    <version>1.0.0</version>
                                                    <configuration>

                                              <lifecycleMappingMetadata>
                                                        <lifecycleMappings>
                                                          <lifecycleMapping>

                                              <packagingType>...</__packagingType>

                                              <lifecycleMappingId>...</__lifecycleMappingId>

                                              </lifecycleMapping>
                                                        </lifecycleMappings>

                                              </lifecycleMappingMetadata>
                                                    </configuration>
                                                  </plugin>
                                                </plugins>
                                              </pluginManagement>

                                            You will have to define
                                            mapping for all packaging
                                            types you use in
                                            your
                                            project.

                                            --
                                            Regards,
                                            Igor

                                            On 2013-08-27 4:42 AM, Lucas
                                            Persson wrote:

                                                Hi

                                                I have defined that the
                                                target folder (and
                                                target/classes)
                                                shall be
                                                outside the project's
                                                folder.
                                                The reason to have it
                                                like this is that I am
                                                using a
                                                proprietary SCM
                                                which do not allow write
                                                access unless a file is
                                                checkout out.
                                                And alas it does not
                                                have any type of
                                                "ignore" filter.

                                                The thing is that every
                                                time I do "Maven->Update
                                                Project..." it
                                                fails
                                                like this:

                                                An internal error
                                                occurred during:
                                                "Updating Maven Project".
                                                Path must include
                                                project and resource
                                                name: /tiget-api

                                                java.lang.__IllegalArgumentException:
                                                Path must include
                                                project and
                                                resource name: /tiget-api
                                                at
                                                org.eclipse.core.runtime.__Assert.isLegal(Assert.java:63)
                                                at
                                                org.eclipse.core.internal.__resources.Workspace.__newResource(Workspace.java:__2163)
                                                at
                                                org.eclipse.core.internal.__resources.Container.getFolder(__Container.java:222)
                                                at
                                                org.eclipse.m2e.core.project.__configurator.__AbstractLifecycleMapping.__configure(__AbstractLifecycleMapping.java:__71)


                                                I am not sure what m2e
                                                does here but I guess it
                                                is updating the
                                                output
                                                folder (among other things)

                                                The code that sort of
                                                breaks is this:
                                                org.eclipse.m2e.core.project.__configurator.__AbstractLifecycleMapping,
                                                method "configure()"

                                                /**
                                                  * Calls #configure
                                                method of all registered
                                                project
                                                configurators
                                                  */
                                                public void
                                                configure(__ProjectConfigurationRequest
                                                request,
                                                IProgressMonitor mon)
                                                throws CoreException {
                                                   final SubMonitor
                                                monitor =
                                                SubMonitor.convert(mon, 5);
                                                   try {

                                                MavenPlugin.__getProjectConfigurationManager__().addMavenBuilder(request.__getProject(),
                                                null /*description*/,

                                                monitor.newChild(1));

                                                     IMavenProjectFacade
                                                projectFacade =
                                                request.getMavenProjectFacade(__);
                                                     MavenProject
                                                mavenProject =
                                                request.getMavenProject();

                                                     Build build =
                                                mavenProject.getBuild();
                                                     if(build != null) {
                                                       String directory
                                                = build.getDirectory();
                                                       if(directory !=
                                                null) {
                                                *IContainer container =
                                                projectFacade.getProject().__getFolder(projectFacade.__getProjectRelativePath(__directory));*
                                                         if(container !=
                                                null) {

                                                if(!container.exists()
                                                && container instanceof
                                                IFolder) {

                                                M2EUtils.createFolder((__IFolder)
                                                container, true,
                                                monitor.newChild(1));
                                                           } else {

                                                container.setDerived(true,
                                                monitor.newChild(1));
                                                           }
                                                         }
                                                       }
                                                     }

                                                It seems that
                                                *projectFacade.__getProjectRelativePath(__directory)
                                                *returns
                                                null when the pom.xml
                                                defines that the build
                                                folder is
                                                outside the
                                                project's folder.
                                                and that leads to
                                                exception in
                                                *projectFacade.getProject().__getFolder()
                                                *instead of returning a
                                                NULL IContainer (which
                                                the code seems to
                                                assume).


                                                Is there a way to
                                                "override"
                                                org.eclipse.m2e.jdt.internal.__JarLifecycleMapping
                                                so
                                                I can
                                                make my own patched version?
                                                It seems to be a bug on
                                                this: *Bug 361824*
                                                <https://bugs.eclipse.org/__bugs/show_bug.cgi?id=361824
                                                <https://bugs.eclipse.org/bugs/show_bug.cgi?id=361824>>
                                                -Regression[MNGECLIPSE-767]__Path
                                                must include project and
                                                resource name: /
                                                (when this is fixed I
                                                will have to implement a
                                                project
                                                configurator that
                                                fixes the build folder
                                                anyway but the above
                                                issue is blocking me
                                                since
                                                project configurations
                                                are called further down
                                                in the method.)

                                                I am using m2e version
                                                1.4.0_20130601-0317

                                                Thanks
                                                Lucas



                                                --

                                                Lucas Persson |
                                                Principal Member of
                                                Technical Staff
                                                Phone: +4684773644
                                                <tel:%2B4684773644> | |
                                                | Mobile: +46730946656
                                                <tel:%2B46730946656>
                                                Oracle Communications
                                                Platform
                                                ORACLE Sweden | Söder
                                                Mälarstrand 29, 6 tr |
                                                118 25 Stockholm

                                                Oracle Svenska AB,
                                                Kronborgsgränd 17, S-164
                                                28 KISTA, reg.no
                                                <http://reg.no>
                                                <http://reg.no>
                                                <http://reg.no>
                                                <http://reg.no>
                                                <http://reg.no>. 556254-6746
                                                Oracle is committed to
                                                developing practices and
                                                products that
                                                help
                                                protect the environment



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

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





                                        Lucas Persson | Principal Member
                                        of Technical Staff
                                        Phone: +4684773644
                                        <tel:%2B4684773644> | | |
                                        Mobile: +46730946656
                                        <tel:%2B46730946656>
                                        Oracle Communications Platform
                                        ORACLE Sweden | Söder
                                        Mälarstrand 29, 6 tr | 118 25
                                        Stockholm

                                        Oracle Svenska AB,
                                        Kronborgsgränd 17, S-164 28
                                        KISTA, reg.no <http://reg.no>
                                        <http://reg.no>
                                        <http://reg.no>
                                        <http://reg.no>. 556254-6746



                                        Oracle is committed to
                                        developing practices and
                                        products that help
                                        protect the environment



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

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

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

                            _________________________________________________
                            m2e-dev mailing list
                            m2e-dev@xxxxxxxxxxx
                            <mailto:m2e-dev@xxxxxxxxxxx>
                            <mailto:m2e-dev@xxxxxxxxxxx
                            <mailto:m2e-dev@xxxxxxxxxxx>>
                            <mailto:m2e-dev@xxxxxxxxxxx



--
"Have you tried turning it off and on again" - The IT Crowd

Back to the top