facebook

Overlay [xxxxxx] is not a dependency of the project

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #325056 Reply

    Ed ross
    Member

    We are trying to upgrade to MyEclipse 10 (from 8.6) where we used some other maven plugin (we needed multi project support which the myeclipse pluging did not provide at that time).

    Our project builds fine from the command line and from the old maven plugin – however, I can not get the 10.1 plugin to function quite right.

    We have 7 war apps packaged into an ear. In addition, we have 1 common web app that we use as an overlay to the other 7 (all the common html, javascript, etc)

    In all of the web-apps, I’m now getting the error listed in the subject (the xxx represents the name of the common war). This prevents the projects from building.

    The pom is correct and builds fine from the command line.

    Any idea how to correct this in MyEclipse?

    thx

    #325082 Reply

    support-swapna
    Moderator

    edross,

    Sorry that you are seeing this issue.

    Can you answer some more questions for us?

    1. Are you using Maven 3 from the command line ? MyEclipse 10 Maven support is based on Maven 3.

    2. You can add and use a different Maven runtime by selecting Window > Preferences > MyEclipse > Maven4MyEclipse > Installations > Add.

    3. Maven 3 is more strict and is not completely compatible with Maven 2. Take a look at this link for the compatibility notes :
    https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-ParentPOMResolution

    Let us know how it works for you.

    #325581 Reply

    Ed ross
    Member

    I’m using the same version/Installation of maven – yet
    From the command line everything is fine. From the Plug-in I can build (run as mvn builld) and works fine – from eclipse, I get unresolved dependencies and pom errors. (

    Description    Resource    Path    Location    Type
    overlay [ id com.crowncastle:commonWeb:bin] is not a dependency of the project.    pom.xml    /businessAnalysisWeb    line 1    Maven Configuration Problem
    

    I clearly have the dependency defined – and the overlay.

    <dependencies>
            <!-- Overlay dependencies -->
            <dependency>
                <groupId>com.crowncastle</groupId>
                <artifactId>commonWeb</artifactId>
                <classifier>bin</classifier>
                <type>zip</type>
                <version>2011.1.8.0</version>
                
            </dependency>
    
    
    
    <overlays>
        <overlay>
            <groupId>com.crowncastle</groupId>
            <artifactId>commonWeb</artifactId>
            <classifier>bin</classifier>
            <type>zip</type>  
        </overlay>
    </overlays>

    Also – Intermittently I will get other unresolved dependencies in my code (classpath will change when I do an update properties)

    If I do a mvn eclipse:eclipse then refresh the project I only get the POM errors.

    If I do it from the plugin I get unresolved dependencies. (Part of WebLogic Jar)

    import javax.ejb.CreateException;
    #325584 Reply

    Ed ross
    Member

    The problem comes from the way the command line processes the dependencies vs how the plugin processes dependencies.

    From the command line I get a dependency list like the second image

    If done from the command line, the weblogic jar is include as a classpath entry. here, all the files referenced in the weblogic.jar META-INF/manifest classpath are added to the classpath.

    When referenced from the plugin, the weblogic jar is placed inside of the “maven dependencies” which does not include the other jars which are listed in the manifest.

    (VERY BIG problem with the plugin imo). This basically will make the maven plugin somewhat limited to simple projects.

    Editorial comment:

    I hate what weblogic did with the manifest. This has caused numerous build issues for us with outdated jars being included. However, we are kinda stuck with this for now.

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

    support-tony
    Keymaster

    Ed,

    I’m afraid I’m not clear on what your problem is. The two partial screenshots appear to both be from MyEclipse (or eclipse), rather than one from a command line invocation and one from MyEclipse.

    MyEclipse runs maven as it would be run on the command line. If you want to ensure this, you can specify your own maven installation as Swapna mentioned. Also, as she mentioned, MyEclipse 10 uses maven 3, by default, whereas 8.6 uses maven 2. You can check the version of maven by running the following command line:

    mvn -version

    There may be incompatibilities between maven 2 and maven 3, though I believe they can be reconciled through pom changes.

    You seem to be saying that, with MyEclipse 8.6, maven is looking inside the Weblogic jar file to determine other jars to use for building. This isn’t the way maven works, as all dependencies need to be specified through the pom (or the pom hierarchy). Can you provide more detail?

    #325656 Reply

    Ed ross
    Member

    sorry for the confusion.

    Both eclipse and the command line are pointing to the same instance of maven
    C:\development\Workspace>mvn -version
    Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
    Maven home: C:\development\software\tools\apache-maven-3.0.3\bin\..
    Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
    Java home: C:\Program Files\Java\jdk1.6.0_24\jre
    Default locale: en_US, platform encoding: Cp1252
    OS name: “windows vista”, version: “6.0”, arch: “x86”, family: “windows”
    C:\development\Workspace>

    The two differences from the above show what happens if

    a:

    I issue a mvn eclipse:eclipse or (mvn eclipse:myeclipse)

    b:

    I right mouse over the project and say update project configuration.

    In the first case – when I include weblogic I get all of the items included in the manifest.

    In the second case – when I include weblogic, i do not get the items in the manifest.

    The weblogic.jar does not have a POM so there are no maven transitive dependencies.

    #325691 Reply

    support-tony
    Keymaster

    Ed,

    I managed to replicate the POM error regarding the overlay apparently not being defined as a dependency. I’ve raised a bug report for it. Sorry for the inconvenience though it doesn’t appear to affect building.

    I can’t replicate the other issue about the weblogic.jar manifest classpath being included in the classpath outside of MyEclipse. I imported weblogic.jar into my local maven repository and then included it as a dependency. If I run a maven build from the command line, with the debug option, I don’t see anything other than weblogic.jar being added to the classpath on the compile phase. I also don’t see the extra jars in the buildpath on either MyEclipse or eclipse. Updating project configuration makes no difference in either case. I also ran “mvn eclipse:eclipse”, though this should not be necessary as importing a maven project into MyEclipse effectively does the same job. However, it didn’t change anything.

    Would it be possible for you to create a small simple project that exhibits the weblogic.jar problem and attach it here? Or, if I’ve missed something that I need to do to replicate it, please explain what that is.

    #325692 Reply

    Ed ross
    Member

    I believe you are not experiencing the problem because you put the weblogic jar in the repository. This will generally not work as expected. Inside of the weblogic jar is the manifest with the following: Notice all of the of the relative classpath items. many of the jars on the classpath have a manifest that includes other jars (again relative to their location).

    If you just use a repository – none of the associated jars will be found and you will encounter many errors when you need a JMS, or JTA, or WS or any weblogic specific items. (been down that path).

    we have been forced to include the bea.home in our settings file.

    <properties>
    <ccic.snapshots.repo>http://ccicusbuild1/nexus/content/repositories/snapshots/</ccic.snapshots.repo&gt;
    <bea.home>C:/development/software/bea/bea10.3.2</bea.home>
    <bea.lib>${bea.home}/wlserver_10.3/server/lib</bea.lib>
    </properties>

    Implementation-Title: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PD
    T 2009 1267925
    Implementation-Version: 10.3.2.0
    Class-Path: ../../../modules/features/weblogic.server.modules_10.3.2.0
    .jar schema/weblogic-domain-binding.jar schema/weblogic-domain-bindin
    g-compatibility.jar schema/diagnostics-binding.jar schema/diagnostics
    -image-binding.jar wlcipher.jar webservices.jar xmlx.jar ojdbc6.jar a
    qapi.jar EccpressoAsn1.jar EccpressoCore.jar EccpressoJcae.jar mysql-
    connector-java-commercial-5.0.3-bin.jar wlsqlserver.jar wldb2.jar wl
    sybase.jar wlinformix.jar wlw-langx.jar ../../common/lib/pdev.jar jco
    m.jar weblogic-L10N.jar

    #325694 Reply

    support-tony
    Keymaster

    Can you explain how the bea.lib property is used in your pom, or in maven, to get weblogic.jar added to the classpath? I tried a system dependency, which worked but it only added the weblogic.jar, itself.

    #325696 Reply

    Ed ross
    Member

    We have defined a property called bea.home and bea.lib

    then we use a system dependency like this

    <dependency>
                    <groupId>com.bea.weblogic</groupId>
                    <artifactId>weblogic</artifactId>
                    <version>10.3</version>
                    <scope>system</scope>
                    <systemPath>${bea.lib}/weblogic.jar</systemPath>
                </dependency>
    #325697 Reply

    Ed ross
    Member

    you have to have installed all of the bea modules to get the other jars (not just the weblogic.jar)

    Then if you use from the command line

    mvn eclipse:eclipse

    you will get all of the system dependencies

    if you use the myEclipse update project properties you will get a different result.

    #325698 Reply

    support-tony
    Keymaster

    Ed,

    Sorry, I’m not sure what you mean by “you have to have installed all of the bea modules”. I assume you don’t mean installed all the module jars into the local maven repository. If you mean add a system dependency for each jar (as I did with weblogic.jar), then they should show up in the classpath, regardless of where maven is executed.

    #325699 Reply

    Ed ross
    Member

    what I mean is that you will need to install weblogic on your machine. That will put all of the jars in the relative location where weblogic needs them.

    then you have change your systempath to point to the weblogic lib directory where the weblogic jar is located.

    #325701 Reply

    support-tony
    Keymaster

    Ed,

    I have installed weblogic but I’m not seeing those manifest classpath files being added. I’m not sure what you mean by “systempath” but I’ve been trying to replicate on a Linux machine. I’ll try next on a Windows machine.

    #325727 Reply

    support-tony
    Keymaster

    Ed,

    I tried on Windows XP, after installing WebLogic there and running mvn eclipse:eclipse, but couldn’t get command line maven to add the jars mentioned in the weblogic.jar manifest to the classpath. However, I’m still not sure what you meant by “systempath”. There is a “systemPath” element in the system dependency for weblogic.jar but this has to point to a file, not a folder. There is a “system path” in Windows, though I can’t see how adding a path element for the weblogic lib folder can help (I tried it anyway, but still couldn’t replicate your situation).

    I’m clearly missing something here, so could you be precise in how I can replicate what you see when executing maven outside of MyEclipse? It would be helpful if you could set up a simple maven project (probably with a single simple java file for maven to compile) that constructs a classpath which includes weblogic.jar and all the jars from the manifest’s classpath. Attach the project as a zip file. Also mention any environment set up that affects this.

    I searched for a similar problem but the only hit I got had the answer of including all of the jars in weblogic.jar’s manifest classpath entry as dependencies themselves, in the pom.

Viewing 15 posts - 1 through 15 (of 22 total)
Reply To: Overlay [xxxxxx] is not a dependency of the project

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