facebook

How to modify repository? How to run command line mvn?

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

    trant
    Participant

    Having trouble figuring out how to install local libraries to my maven repository.

    According to a MyEclipse web page, MyEclipse allows you to:

    Easy installation of your own jars into Maven repository

    Where is the interface for this located?

    I am so far unable to find it.

    Basically, I want to add my weblogic jar files ot my local repository so that I can run the mojo weblogic deployment plugin in MyEclipse. Currently if I try using that plugin by right-clicking my pom.xml, choosing Run As, new run configuration and set the goal as:

    org.codehaus.mojo:weblogic-maven-plugin:2.9.1:deploy

    Then I get the following error:

    [ERROR] Failed to execute goal org.codehaus.mojo:weblogic-maven-plugin:2.9.1:deploy (default-cli) on project pcu: Execution default-cli of goal org.codehaus.mojo:weblogic-maven-plugin:2.9.1:deploy failed: Plugin org.codehaus.mojo:weblogic-maven-plugin:2.9.1 or one of its dependencies could not be resolved: No versions are present in the repository for the artifact with a range [9.0,11.0)
    weblogic:weblogic:jar:null

    so I want to add that weblogic artifact to the repository but I have no idea how.

    Also, how do I run “mvn” commands? I cannot find a mvn.* file anywhere and If i type mvn on command line it says file does not exist.

    #316596 Reply

    trant
    Participant

    Actually I found out how to do this – it was buried in the tips and tricks tutorial.

    But unfortunately it did not help me. I got that error above resolved but now that mojo plugin is throwing a new error:

    [ERROR] Failed to execute goal org.codehaus.mojo:weblogic-maven-plugin:2.9.1:deploy (default-cli) on project pcu: Execution default-cli of goal org.codehaus.mojo:weblogic-maven-plugin:2.9.1:deploy failed: A required class was missing while executing org.codehaus.mojo:weblogic-maven-plugin:2.9.1:deploy: weblogic/utils/Debug

    ??

    #316675 Reply

    trant
    Participant

    Ok, I finally got the Weblogic deployment working with Maven in MyEclipse.

    I still never figured out though how to use the Maven plugin with MyEclipse.

    I see there is a section for it in the tutorial: http://www.myeclipseide.com/documentation/quickstarts/maven_tips/

    A link at the top:

    How and When to use the Command Line ‘MVN’ as a companion

    But if you click it, it goes no where. And no such section exists on the page!

    #317086 Reply

    Xanthros
    Member

    In the Package Explorer view, right click on the project and choose “Import…”

    Under Maven4MyEclipse you will have two options for what you want:

    Import Jar to Maven Repository
    Install or deploy an artifact to a Maven repository. (I love the uncapitalized ‘repository’ yet above capitalized)

    It confused me at first due to the name of the menu item because you don’t “import” an artifact to Maven, you install it.

    Remember when you give it the Group Id, Artifact Id and Version this information will be used in your Dependency Management. The reason I mention this is because if you mess up the spelling or name then you have the fun task of removing garbage from your Maven Repository which can’t be done by simply deleting it due to the cache. If you do just delete the directory structure then you’ll still be stuck with the options to choose that garbage in your Dependency Management.

    http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html
    http://mojo.codehaus.org/build-helper-maven-plugin/remove-project-artifact-mojo.html

    #317170 Reply

    support-joy
    Member

    Xanthros,

    Thank you for sharing your notes here.

    trant,

    Thank you for the notification regarding the broken links for Maven4MyEclipse tips. I have raised a PR to fix the same.
    Sorry for the inconvenience.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: How to modify repository? How to run command line mvn?

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