Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] [m2e-wtp-dev] [m2e-users] m2e plugin 1.0 bug

Thanks, I'll take a look.

Here are the source repos you're looking for : 
http://git.eclipse.org/c/m2e/m2e-core.git/ (tag releases/1.0/1.0.200.20111228-1245)
https://github.com/sonatype/m2eclipse-wtp/tree/rb-0.15.x 
https://github.com/sonatype/m2eclipse-extras (commit 029e29a86f512dd1d0c688b56a9955ea3d1b77b4 apparently)

Regards,

Fred Bricon

On Fri, Jul 20, 2012 at 10:53 PM, Shalini Bhandari <shalini.bhandari@xxxxxxxxx> wrote:
Hi Igor,


Have you checked the appframework.jar structure (the dependent project)?
when you package it with maven, it gets generated under target folder with correct tree structure, but when you do it the following way : (also described in bug)

Steps to reproduce:

- appframework > runs as > maven clean
- contextstandardweb > runs as > maven clean
- appframework > run as > maven install
- contextstandardweb > run as > maven install
- Servers > Tomcat v5.5 at localhost > clean Tomcat Work Directory
- Servers > Tomcat v5.5 at localhost > Add and Remove > contextstandardweb > Add > Finish
- Servers > Tomcat v5.5 at localhost > clean...

the tree structure is different when published in the wtpwebapps of tomcat5.5.34 folder, it starts with WEB-INF>classes
that affects the application I have where it couldn't find the configuration file from appframework project.

I have attached both jars.



On a separate note, can you please let me know where I can find the source code of :

- m2e - Maven Integration for Eclipse    1.0.200.20111228-1245    org.eclipse.m2e.feature.feature.group    Eclipse.org - m2e
- m2e connector for build-helper-maven-plugin    0.14.0.201109282148    org.sonatype.m2e.buildhelper.feature.feature.group    Sonatype, Inc.
- Maven Integration for WTP    0.15.2.20120306-2040    org.maven.ide.eclipse.wtp.feature.feature.group    JBoss by Red Hat



Thank you very much

Shalini



On Mon, Jul 9, 2012 at 12:51 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
Are you able to provide a small standalone example project that
demonstrates the problem?

Does the project have to have packaging=war or the problem can be
reproduced with other packaging types?

--
Regards,
Igor


On 12-07-09 9:15 PM, Shalini Bhandari wrote:
forgot to attache fig 2




On Mon, Jul 9, 2012 at 11:01 AM, Shalini Bhandari
<shalini.bhandari@xxxxxxxxx <mailto:shalini.bhandari@gmail.com>> wrote:

    <mailto:m2e-users@xxxxxxxxxxx>Hello!



    I have issues related to Workspace Resolution enabled in Eclipse.
    Hope someone can help.

    If I understand correctly, workspace resolution enabled means
    projects don't have to be installed in the local repository to
    relate to one another.



    _Test Environment_


    Eclipse Indigo (3.7.2)

    Eclipse IDE 1.4.2

    M2e Maven Integration for Eclipse 1.0.200

    M2e Connector for build-helper-maven-plugin 0.14.0

    Maven Integration for WTP 0.15.2


    _Issue Description_


    You can configure an eclipse project to resolve dependencies from a
    workspace. This has the effect of altering the way that Maven
    locates dependency artifacts. If a project is configured to resolve
    dependencies from the workspace, these artifacts do not need to be
    present in your local repository. Assume that project1 and project2
    are both in the same Eclipse workspace, and that project1 (ex, a war
    project) depends on project2. If workspace resolution is disabled,
    the m2eclipse Maven build for project1 will only succeed if
    project2's artifact is present in the local repository. If workspace
    resolution is enabled, m2eclipse will resolve the dependency via the
    eclipse workspace. In other words, when workspace resolution is
    enabled, projects don't have to be installed in the local repository
    to relate to one another.

    But for the later, that’s not the case.

    [NB1:

    For transitive dependencies (e.g project1 depends on both project2
    and project3, and project2 depends on project3) make sure that
    ‘workspace resolution’ is enabled for all projects inside the
    workspace, else we get unpredictable results:
    http://jira.codehaus.org/browse/MECLIPSE-348

    ]

    [NB2:

    Extract from
    http://www.theserverside.com/news/1363817/Introduction-to-m2eclipse

    ]


    Now let’s perform the following set of commands through the eclipse
    IDE to test what mentioned above

     1. Workspace Resolution Enabled (cases 2 and 4) or not (cases 1 and

        3) on all related projects (fig 1.1)
     2. ‘Run As > Maven Clean’ on project1 and project2
     3. Remove projects from your local Tomcat wtpwebapps and from local
        maven.repo
     4. ‘Maven > update dependencies…’ on project1
     5. Refresh on project1
     6. Right click on your Tomcat server instance in Eclipse and do

        ‘clean tomcat work directory’ and then ‘clean’. The later should
        republish your resources as well.
     7. Start Tomcat


    Results obtained are given below.

        Workspace Resolution OFF        Workspace Resolution ON

    Project1 opened

    Project2 closed

        (1) OK  (2) OK

    Project1 opened

    Project2 opened

       

    (3) NO

    And publish to Tomcat doesn’t work

       

    (4) NO

    But publish to Tomcat works fine

    Fig 1.1

    OK: successful deployment of war to tomcat and application runs
    normally

    NO: build errors

    The key thing here is that case (4) should have started normally but
    fails at step 6.

    When we compare the directory structures of case (1) and (4), we
    notice that it’s all messed up and that all ‘.class’ files are
    missing, which is in fact normal since we didn’t do a ‘maven
    build/install/package’ of the dependent projects(fig 1.2).

    case(1) and (4) comparison

    Fig 1.2


    This is in fact an existing bug in Eclipse, but might be deprecated?

    A version downgrade/upgrade of m2e doesn’t work either. I tried to
    migrate from m2eclipse to m2e, no luck. (as done here:
    http://blog.frankel.ch/migrating-from-m2eclipse-to-m2e)


    _Bug References_     <http://stackoverflow.com/questions/2665904/m2eclipse-workspace-resolution>



    <http://stackoverflow.com/questions/2665904/m2eclipse-workspace-resolution>




    I was wondering if there are any
    solutions/workaround/recommendations to solve the bug for case 3 and
    4 mentioned above?
    Or, unless I missed it, a bug already exist for this?
    Should I open a bug onhttps://bugs.eclipse.org/
    <https://bugs.eclipse.org/> for this?
    Please help !!


    --
    Shalini






    --
    Shalini


    (408) 471-7482 <tel:%28408%29%20471-7482>




--
Shalini


(408) 471-7482



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


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



--
Shalini


(408) 471-7482


_______________________________________________
m2e-wtp-dev mailing list
m2e-wtp-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/m2e-wtp-dev




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

Back to the top