maven-2

Is there anyway to exclude artifacts inherited from a parent POM?

杀马特。学长 韩版系。学妹 提交于 2019-12-28 02:28:08
问题 Artifacts from dependencies can be excluded by declaring an <exclusions> element inside a <dependency> But in this case it's needed to exclude an artifact inherited from a parent project. An excerpt of the POM under discussion follows: <project> <modelVersion>4.0.0</modelVersion> <groupId>test</groupId> <artifactId>jruby</artifactId> <version>0.0.1-SNAPSHOT</version> <parent> <artifactId>base</artifactId> <groupId>es.uniovi.innova</groupId> <version>1.0.0</version> </parent> <dependencies>

Which maven dependencies to include for spring 3.0?

最后都变了- 提交于 2019-12-28 01:39:08
问题 I am trying to do my first project with Spring 3.0 (and maven). I have been using Spring 2.5 (and primer versions) in quite some projects. Nevertheless I am kinda confused, what modules I have to define as dependencies in my pom.xml. I just want to use the core container functions (beans, core, context, el). I was used to do this: <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>2.5.6</version> </dependency> But now I am kinda confused, as there is

Get source jar files attached to Eclipse for Maven-managed dependencies

社会主义新天地 提交于 2019-12-27 12:08:08
问题 I am using Maven (and the Maven Eclipse Integration) to manage the dependencies for my Java projects in Eclipse. The automatic download feature for JAR files from the Maven repositories is a real time saver. Unfortunately, it does not include API documentation and source code. How can I set up Maven to automatically also get the source and javadoc attachments and register them properly with Eclipse? 回答1: I am sure m2eclipse Maven plugin for Eclipse - the other way around - can do that. You

Add a dependency in Maven

落花浮王杯 提交于 2019-12-27 11:49:11
问题 How do I take a jar file that I have and add it to the dependency system in maven 2? I will be the maintainer of this dependency and my code needs this jar in the class path so that it will compile. 回答1: You'll have to do this in two steps: 1. Give your JAR a groupId, artifactId and version and add it to your repository. If you don't have an internal repository, and you're just trying to add your JAR to your local repository, you can install it as follows, using any arbitrary groupId

Jetty runs old war altought mvn clean is run

爱⌒轻易说出口 提交于 2019-12-25 09:31:13
问题 does someone had an similar issue with maven and jetty, that jetty is run with an old war althought mvn clean is run. My pom uses failsafe to start jetty with mvn verify. 回答1: see http://docs.codehaus.org/display/JETTY/Temporary+Directories for where jetty store temp files => I suggest you configure maven jetty plugin to use a unique temp directory for your application to avoid any problem. e.g.: <project> ... <plugins> ... <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty

Running an application using maven

白昼怎懂夜的黑 提交于 2019-12-25 09:27:49
问题 I am trying to run an application using maven. I am very new to it. I got it installed and it is working properly. i am not able to run it. i am getting the following errors in the console: - [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection timed out: connect [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-resources-plugin:pom:2.3' from repository central (http:/

Which jars needs to be present in WEB-INF\lib and in .classpath

假如想象 提交于 2019-12-25 08:07:17
问题 I am converting a regular J2EE application to use Maven. I was able to successfully convert to Maven and I am getting successful "mvn deploy". The issue is facing after deploying the ear to WAS. I am getting SRVE0203E :Servlet [action] org.apache.struts.action.ActionServlet is missing another required class. I had similar problems for different application and after trying couple of "exclusion" of jars I was able to deploy the application successfully in WAS. I have following question. How

How to create a Maven “Project Repo”

拜拜、爱过 提交于 2019-12-25 06:57:37
问题 I've been asked to look at an old project that requires Maven 2.1 and a couple JARs that are not (and will not) stored in our Nexus. I'm trying to follow the advice from @Nikita Volkov in this post about creating a project repo to hold the JARs as artifacts. The idea being I can check this repo into source control. I can then check it out on any machine and have it build without any special configuration. To start with I've created a repo and added my first Jar to it by running: mvn install

Servlets, development, and a CDN for static files

我只是一个虾纸丫 提交于 2019-12-25 01:36:39
问题 I'm working on a Java site (jQuery, Wicket, Maven, Spring, Hibernate) and we have just started using a CDN to serve static files on our production server. We use a placeholder for the CDN domain, and have added it to every static file that references a static file. The placeholder gets replaced by Maven through properties filters with Maven. So, for every static file served by the CDN, we have something like this: <img src="${placeholder}/images/dogs/rex.jpg"/> For production, ${placeholder}

Maven plugin classloading

倾然丶 夕夏残阳落幕 提交于 2019-12-24 22:18:33
问题 Could anybody please explain how the Core Classloader loads resources when, for instance, surefire test plugin is used? What I'd especially need to know is the order in which project sources and resources from target/classes + target/test-classes AND project dependencies are loaded. For instance, if I have a resource which exists both in a project and in a dependency. Which one is loaded first? Thank you 回答1: It turned out the answer was really simple. First off, one can see the plugin