facebook

How do I setup using external Maven (or fix problem w/ old)

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

    trant
    Participant

    I had a problem with my pom.xmls with MyEclipse version Build id: 9.0-20110318.

    I was trying to use the “packagingExcludes” paramter of the maven war plugin but I found that the embedded version of Maven is completely ignoring this paramter. It does honor my other paramters in the same plugin configuraiton however.

    Then I downloaded the latest Maven off the web, and pointed MyEclipse Maven to use it instead of the embedded and it worked for package. It honored that setting in the war and so packaging works great now.

    However now my maven deploy is broken, with the following error:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.4:deploy (default-deploy) on project myProject: Deployment failed: repository element was not specified in the pom inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

    How do I fix this?

    Or was there another way to fix the problem of the embedded Maven from ignoring my “packagingExcludes” configuration option?

    
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-war-plugin</artifactId>
               <configuration>        
                 <packagingExcludes>**/*.jar</packagingExcludes>             
                 <filtering>true</filtering>             
                 <excludes>**/test/*.*</excludes>
                 <warSourceDirectory>web</warSourceDirectory>       
                 <warName>myWarName</warName>   
               </configuration>
             </plugin>   
    

    It was configured to exclude all jars (to do skinny War deployment) however with the embedded version its not working. Only the newly downloaded one does it actually work as intended.

    #317405 Reply

    Please configure in Your pom.xml distributionManagement configuration element for example
    <distributionManagement>
    <repository>
    <uniqueVersion>true</uniqueVersion>
    <id>YourID</id>
    <name>Your Repository Name</name>
    <url>YourRepositoryURL</url>
    <layout>default</layout>
    </repository>
    </distributionManagement>
    or
    You canfigure this also during launching with parameter -DaltDeploymentRepository=id::layout::url parameter for example -DaltDeploymentRepository=YourID::default::YourRepositoryURL

    #317410 Reply

    trant
    Participant

    Ok, but what do I put in for all those example vlaues of YourID, Your Repository Name, etc … ?

    I have never set this before, I just used the embedded Maven that comes default with MyEclipse I never modified any repository settings or anything like that. Why doesnt it find the same repository that MyEclipse used?

    #317562 Reply

    Mulder8472
    Member

    where do you deploy to? if you just want to upload it into your local repository, then use install. if you use deploy, maven wants to know the repository where it should deploy the artifact to. am fairly new to maven myself, but if you want to deploy to a server, I think you will have to use a different plugin, e.g. tomcat:deploy

    #317688 Reply

    You schould specify there the unique ID, Name, URL of remote repository, if You would like to work just with local repository then is enough to use mvn install.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: How do I setup using external Maven (or fix problem w/ old)

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