MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
trant
Post subject: How do I setup using external Maven (or fix problem w/ old)  PostPosted: Jun 07, 2011 - 07:06 PM
Registered Member
Registered Member


Joined: Mar 14, 2007
Posts: 46

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?

Code:

        <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.[/code]
 
 View user's profile Send private message  
Reply with quote Back to top
support-tomasz
Post subject: RE: How do I setup using external Maven (or fix problem w/ o  PostPosted: Jun 09, 2011 - 04:26 PM



Joined: Apr 14, 2011
Posts: 22

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
 
 View user's profile Send private message  
Reply with quote Back to top
trant
Post subject: RE: How do I setup using external Maven (or fix problem w/ o  PostPosted: Jun 10, 2011 - 12:46 AM
Registered Member
Registered Member


Joined: Mar 14, 2007
Posts: 46

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?
 
 View user's profile Send private message  
Reply with quote Back to top
Mulder8472
Post subject: RE: How do I setup using external Maven (or fix problem w/ o  PostPosted: Jun 16, 2011 - 01:52 PM



Joined: Jul 21, 2009
Posts: 15

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
 
 View user's profile Send private message  
Reply with quote Back to top
support-tomasz
Post subject: RE: How do I setup using external Maven (or fix problem w/ o  PostPosted: Jun 22, 2011 - 03:03 PM



Joined: Apr 14, 2011
Posts: 22

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.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits