maven-2

Why does Maven is looking in the wrong repo?

蹲街弑〆低调 提交于 2019-12-06 07:06:58
I'm trying to get the newest hibernate version for my project, for this purpose I've added the jboss repo into my settings.xml <repository> <id>jboss-releases</id> <url>http://repository.jboss.org/maven2</url> </repository> but when I do the depency search from my m2eclipse plugin I see only results from the official maven repo, why? Why I don't see the latest release 3.5.1? Instead only 3.3.2 is shown Maven isn't looking in the wrong repository and dependencies on hibernate 3.5.1 artifacts are available in the JBoss repository (and get resolved). However, m2eclipse is very likely not

How to debug Flex application under maven

六月ゝ 毕业季﹏ 提交于 2019-12-06 06:46:20
I develop Flex-Java applications which is running under Apache Tomcat. I use Flex Builder plug-in for Eclipse as my IDE. My application consists of several libraries and modules. I manage all of them as a small maven (flex-mojos) projects. Does anybody can share some ideas how to setup robust debuging enviroment? I use Maven & Flexmojos from the command line and the Flash builder 4 plugin inside of Eclipse. In my project I also have a Java/BlazeDS backend I like to debug at the same time as the Flex client on occasion. Here's what I do: 1) I used cargo to startup an instance of my Java backend

Using native dependencies inside Maven

梦想与她 提交于 2019-12-06 06:39:32
问题 A POM dependency contains native libraries (DLLs inside a JAR file). How do I programmatically look up the path of the downloaded JAR file so I can pass it into "java.library.path"? 回答1: Answering my own question: http://web.archive.org/web/20120308042202/http://www.buildanddeploy.com/node/17 In short, you can use the maven-dependency-plugin:unpack goal to extract the libraries into a known path, and pass that into java.library.path : <plugin> <groupId>org.apache.maven.plugins</groupId>

Is it possible to explicity tell maven to download and install an artifact to the local repository?

[亡魂溺海] 提交于 2019-12-06 06:38:41
Yes I read Utility for downloading artifacts from maven repo without mvn/poms and other related questions, but I don't want to install the file manually. Actually I want to have something like a wget for maven, which fetches an artifact (with dependencies) and puts it somewhere or installs it in the local repository. Is the maybe a plugin available which does this? There is the dependency:get goal, as described at the dependency plugin manual . This featured was requested at this jira ticket . But I tried it with Maven 2.1.0 and it didn't work. I'm not sure if there is a Maven plugin to handle

maven dependency clash

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 06:38:32
In my project, there are 2 libraries, each of which depend on the XML parsing class java.xml.parsers.DocumentBuilderFactory. Each of these libraries reference the file from different jar (one gets it from a jar called xmlParserAPIs while another gets it from xml-apis-1.0.b2.jar). Unfortunately there are different versions of the class in each of these files so I am seeing runtime errors, depending on the order they are loaded. Both of these xml jars are transitive dependencies of 3rd party libraries. Is there a good way to handle this conflict? edit: I'm not sure if it makes a difference on

Replace a Source file in maven compile

ⅰ亾dé卋堺 提交于 2019-12-06 06:33:42
问题 I have to replace a Java source file during maven compile if a special profile is active. I thought about just excluding the file from the standard src/main/java/ and including it from another source directory like src/main/java2/ . But since the files have to have the same name and package the exclude always wins and the file from the other directory gets never included... Any known working way to do that? 回答1: I would use the Maven Antrun Plugin to rename the "original" source file and copy

Eclipse (STS), Maven and maven-minify-plugin, can they work together?

拟墨画扇 提交于 2019-12-06 06:18:13
I am working on a project where I am in charge of html, css and javascript. I found this maven-minify-plugin that seemed to just what I wanted. Everything is good when I deploy using maven on the server, but when I am using Eclipse (STS, www.springsource.com/products/sts) to run the project on localhost no css nor js file is generated by the plugin. Does anyone have experience with this Maven plugin, so they can tell me if it should be possible or not run on localhost? Does anyone have knowledge of another plugin I can use to (combine and) minify javascript and css files when running on

Does it make sense to deploy a WAR with a webapp to Maven central repository?

☆樱花仙子☆ 提交于 2019-12-06 06:12:36
Does it make sense to do that? If yes, where can I find an example of doing that with a simple "Hello World from Web"? Do people run webapps with Jetty when they execute it from Maven? I imagine tomcat is too heavy for that. Any help will be appreciated! Thx! I deploy .war files to our internal Archiva Maven repository so that I can pull them down to assembly things like RPMS without having to hand copy files around, same with building assemblies. It also is useful when the .war is something like a service that is generic and may be included in multiple other web app compliations. That said,

Strategies for java webapp configuration

一曲冷凌霜 提交于 2019-12-06 05:57:55
问题 Part of my webapp involves uploading image files. On the production server, the files will need to be written to /somepath_on_production_server/images. For local development, I want to write the files to /some_different_path/images. What's the best way to handle these configuration differences? One important requirement is this: I don't want to have to mess with the production server at all, I just want to be able to deploy a war file and have it work. So I don't want to use any technique

Using IDEA with maven2, how to add a non-maven .jar?

我的未来我决定 提交于 2019-12-06 05:51:12
问题 I have a .jar that I want included in my IDEA web application project that is using maven2 (pom.xml). How can I add a .jar to my project that isn't using maven? 回答1: You basically have three options: Install the jar in your local repository using install:install-file (see Guide to installing 3rd party JARs). This is pretty straightforward and easy but this will make your POM non portable. This might be an option if you are alone and doesn't plan to distribute your pom.xml. Deploy the jar in a