maven-2

Maven war plugin not able to exclude libs in exploded war format

a 夏天 提交于 2019-12-13 14:27:01
问题 I am using maven war plugin to exclude some common jar and put them in the classpath. I am able to generate war file properly which excludes specified libs and add them in the classpath but exploded war directory still contains excluded libararies. How can I generate exploded war file which use configuration of maven war plugin. <project> <modelVersion>4.0.0</modelVersion> <groupId>com.ekaplus.ctrm.mdm</groupId> <artifactId>core-presentation</artifactId> <version>1.0</version> <packaging>war<

Maven jaxb2:xjc/jaxws:wsimport to be added in eclipse?

…衆ロ難τιáo~ 提交于 2019-12-13 14:23:01
问题 I have a library I am creating based on some WSDL/XSD definitions. I am having a problem having the compiled classes added in the eclipse project. I can see that with a 'mvn compile' that the .class files are generated, as well as the .java files. The problem is that even though the .class files are generated, eclipse is still showing an error on the import statement "import com.whatever.SomeService_Service" that was generated by one of the plugins. I tried forcing the source to go into the

Skip execution of a maven plugin if a file does not exist

元气小坏坏 提交于 2019-12-13 14:16:21
问题 I want to put the hibernate3-maven-plugin in my parent pom and have execution skipped in child modules if a given file does not exist in that module. Is there any way to do this? Up to now, I have had to do this: <plugin> ... <configuration> <skip>true</skip> <propertyfile>target/test-classes/jdbc.properties</propertyfile> </configuration> </plugin> In the parent POM, and: <plugin> ... <configuration> <skip>${maven.test.skip}</skip> </configuration> </plugin> In all child POMs where I want it

Add .mf & .xml files in META-INF directory inside a Maven built EAR

依然范特西╮ 提交于 2019-12-13 13:33:26
问题 I have arbitrary .xml & .mf files that i have to add in the META-INF folder inside the ear itself. Build is done using maven2.2.1. Simply adding those files under ${basedir}/src/main/application/META-INF/ works fine, but it doesn't fit my needs. Is there another way to do such thing? I tried: <build> <resources> <resource> <directory>G:/WS/vermeg/ear2/XML's</directory> <targetPath>META-INF</targetPath> </resource> </resources> </build> but this doesn't add my xml files under the EAR itself. I

Can't find the “org.eclipse.persistence” Maven dependency

匆匆过客 提交于 2019-12-13 13:27:31
问题 I installed Eclipse Helios with the m2eclipse maven plugin. I want to create an application using JPA. So, what I do is: New > Maven Project then I select the maven default archetype. The problem is that I want to add the "org.eclipse.persistence" dependency that I can't find. Where is it? Can we add it manually? Should I update a sort of "repository"? Then, is it the right archetype that I'm using? 回答1: EclipseLink is not available in Maven central repository, you need to add its repository

Maven: Different configuration for different goals

久未见 提交于 2019-12-13 13:23:18
问题 I'd like to have different configuration options for different goals of the Maven's release plugin. The story goes like this: I'm using Git for an SCM. I want the release:prepare plugin to do everything locally and the release:perform to push all the changes at once to the remote repository. I've tried doing something like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.2.2</version> <executions> <execution> <id>release

Maven - Include Different Files at Build Time

╄→гoц情女王★ 提交于 2019-12-13 13:19:38
问题 I have ten WAR files, all of which have nearly identical code and markup. The only differences lie in the images, CSS and Messages. I hit on the concept of Profiles but I haven't quite groked it yet and I'm not sure if this can handle what I need it to do. Basically, I want a base project with different profiles for the 10 different WARs. Whenever a build is started with a given profile, it goes to a repository (either local or my organization's) and retrieves the CSS, images and messages

XML DTD/Schema validation in Maven

六眼飞鱼酱① 提交于 2019-12-13 13:01:44
问题 How can I validate XML documents during a Maven build against a DTD or a XSD Schema? 回答1: There is a xml-maven-plugin that can check whether XML files are matching an XML schema but I don't think it can generate reports. 回答2: The validate goal of the xml-maven-plugin will check for well-formedness and optionally validate against a schema. The build will fail if the validation fails. The plugin does not produce any report, what would you want in a report out of interest? information about the

Surefire is not picking up Junit 4 tests

巧了我就是萌 提交于 2019-12-13 12:24:10
问题 I cannot get Maven Surefire to execute my JUnit 4 tests even after I tried all the advices from another post. My POM: <project> <modelVersion>4.0.0</modelVersion> <groupId>maven-test</groupId> <artifactId>maven-test</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.junit</groupId> <artifactId>com.springsource.org.junit</artifactId> <version>4.4.0</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache

How to configure a subproject dependency in Maven without deploying jars?

﹥>﹥吖頭↗ 提交于 2019-12-13 11:52:37
问题 I googled this and it seems that no one has an answer, yet it seems like such an elementary thing that it should be possible. I have the following project structure: parent ---sub-project1 ---sub-project2 sub-project2 needs to have sub-project1 as a dependency. So I have this in sub-project2's pom: <dependencies> <dependency> <artifactId>sub-project1</artifactId> <groupId>mygroup</groupId> <version>1.0-SNAPSHOT</version> </dependency> .... When I do this, Maven tries to dowload the sub