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

Home Forums MyEclipse IDE Maven for MyEclipse (Maven4MyEclipse) How to modify repository? How to run command line mvn?

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of support-joy support-joy 3 years, 12 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #316594
    Profile photo of trant
    trant
    Member

    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
    Profile photo of trant
    trant
    Member

    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
    Profile photo of trant
    trant
    Member

    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
    Profile photo of Xanthros
    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
    Profile photo of support-joy
    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)

You must be logged in to reply to this topic.