facebook

MyEclipse 2015 2.0 … Java project cannot reference other projects?

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #464114 Reply

    Sandeep
    Participant

    Just installed
    Version: 2015 Stable 2.0
    Build id: 13.0.0-20150518
    *** System properties:
    OS=MacOSX
    OS version=10.10.2
    OS arch=x86_64
    Profile arch=x86_64

    Imported Java projects (which worked earlier) and now have a 10K errors. All of them cannot find the dependent projects.

    Created A helloworld project to depend on an existing project and added a reference to an existing class. IDE finds the reference and automatically adds the import on top of the file.
    But Gives a compile error as
    “The import a.b.c.d cannot be resolved.”

    So the IDE Found the reference but somehow it is not able to resolve it????

    Attachments:
    You must be logged in to view attached files.
    #464259 Reply

    support-swapna
    Moderator

    Sandeep,

    Sorry that you are seeing this issue.

    Can you please check if the ‘Build Automatically’ (menu Project > Build Automatically) is turned on?
    Please clean rebuild the projects in the workspace and check if the issue persists.

    Can you please also check if the dependent projects are added to the Deployment Assembly of the main project? In addition to adding them from the Project References page, you should also add the dependent projects to the Deployment Assembly page to deploy the dependent projects along with the main project.

    If the issue persists, please send us the sample project to help us replicate the issue at our end. Also share with us the previous MyEclipse version details.

    Let us know how it works.

    –Swapna
    MyEclipse Support

    #464651 Reply

    Sandeep
    Participant

    Yes, the Build automatically is checked.
    Have cleaned and rebuilt and also reimported the projects multiple times already.
    The projects are added as reference projects but just not referenced during compile.
    Will add a screenshot of the project build page.

    Attachments:
    You must be logged in to view attached files.
    #464705 Reply

    Sandeep
    Participant

    My previous version was MyEclipse Professional 2014 GA Release.

    #464850 Reply

    support-swapna
    Moderator

    Sandeep,

    1. Can you please check if the issue persists in a new workspace?
    2. Remove and re-add your JRE: Right Click on your project > properties > Java Build Path. Switch to the Libraries tab.Click on the JRE,click Remove, then OK. Follow the same steps and add the JRE again.
    3. If none of the above suggestions help,can you please reinstall MyEclipse 2015 to rule out issues due to incomplete or corrupt installation?
    We just released MyEclipse 2015 Stable 3.0. I suggest you download the latest installer and install MyEclipse Stable 3.0 to a different location, switch to a new workspace and check if the issue persists.

    Please download the MyEclipse 2015 Stable 3.0 installer from here : https://www.genuitec.com/products/myeclipse/download/

    Let us know how it works for you.

    –Swapna
    MyEclipse Support

    #464912 Reply

    Sandeep
    Participant

    I updated the current to Stable 3.0 release. But the issue persists.
    Attaching a screenshot where I see the warnings that Classpath entry will not be exported. Maybe that is the cause although I cant fathom why they are not exported.

    The same setup works with the MAven build. So the pom file is correct.
    Only when I run mvn eclipse:clean and eclipse:eclipse
    to create the .project etc, it doesnt work with MyEclipse.
    I have run into this issue as I need to work with Java 8. and 2015 is the version which supports Java 8.
    If this cannot be resolved, I am going to have to ask for a refund of my money as I cant use this product at all and I have already lost 3 days!
    🙁

    Attachments:
    You must be logged in to view attached files.
    #464939 Reply

    Sandeep
    Participant

    So i also started from clean work space and a new directory.
    Used Maven4Eclipse instead of mvn eclipse:eclipse to create projects.
    What I notice is that it does not resolve the implicit dependencies.
    So when I add the jar dependency to the POM directly it finds the class files.
    These jars have never been added to the pom before as they are some third party jars and the build also works with maven externally without changing the pom. So there is something fishy here when you are dependent on a jar which dependents on other jars.

    #464944 Reply

    support-tony
    Keymaster

    Sandeep,

    I think that your last replies are the first time that you’ve mentioned that these are maven projects. With either Maven4MyEcipse or the eclipse m2e plugin, it’s recommended to not use mvn eclipse:eclipse to create eclipse projects. Instead, use the import facility to import the maven project, which will create the correct metadata.

    however, I’m not clear on what your current situation is. When you import your maven project and add the dependency in the normal manner (to the pom, or using the add dependency wizard), MyEclipse will, by default, try to resolve dependencies from the workspace (this is configurable on a project by project basis). You should see the dependent jars and projects in the Maven Dependencies container in the build path (also visible as part of the the project in the MyEclipse Explorer, or Package Explorer views. From your last reply, I get the impression that you’ve managed to get all this working.

    More Maven4MyEclipse information is given in the appropriate learning center section.

    If you still have issues with this, can you please provide details. Apologies for any confusion.

    #464988 Reply

    Sandeep
    Participant

    Finally after a lot of troubleshooting, have traced the root cause.
    It is due to Maven profile not getting activated.
    Added the ACtiveByDefault attribute to the root pom and that made it work as we depend on that to build. I think there is a change in MAven dependency mgmt between 2014 and 2015 versions as I have not seen this issue before.

    #465960 Reply

    support-swapna
    Moderator

    Sandeep,

    Glad that you resolved the issue. Maven support has been improved in MyEclipse 2015 compared to our previous releases. You can set active profile for your project in the pom.xml. Please check this tutorial for more info:
    http://maven.apache.org/guides/introduction/introduction-to-profiles.html

    Let us know if you see any issues.

    –Swapna
    MyEclipse Support

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: MyEclipse 2015 2.0 … Java project cannot reference other projects?

You must be logged in to post in the forum log in