- This topic has 4 replies, 3 voices, and was last updated 13 years, 5 months ago by support-tomasz.
-
AuthorPosts
-
trantParticipantI 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.
support-tomaszMemberPlease 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
trantParticipantOk, 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?
Mulder8472Memberwhere 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
support-tomaszMemberYou 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.
-
AuthorPosts