maven-2

upload jar to respository

做~自己de王妃 提交于 2019-12-10 13:21:59
问题 I have jar files that cannot be found on maven2 repository. I would like to add the jar so I can just include extra tag in my pom.xml file and other developer can use the jar. What are the steps needed to upload the jar to http webserver webfolder? What file should I uploaded beside custom.jar? What other files need to exist on the webfolder side by side with custom.jar? 回答1: If you already have a web server set up pointing on a web folder, a simple way to deploy your custom JAR would to use

How to exclude classes from a packaged webapp with maven

て烟熏妆下的殇ゞ 提交于 2019-12-10 12:58:16
问题 How can I filter certain classes in /target/classes from going into /target/[webapp]/WEB-INF/classes? I want them compiled into /target/classes/ but not in the final war. 回答1: What are these classes for? If they are for testing, you can specify them in src/test/java, they will then be compiled into target/test-classes in the test-compile phase, but won't be included in the final war. If they aren't for testing and aren't to be included in the war, perhaps they should be refactored into

slf4j exception with quartz

江枫思渺然 提交于 2019-12-10 12:56:57
问题 I am trying to use quartz in a simple example in project. I am getting the following exception, I am not sure what it means...However I updated my slf4j to 1.6.1 in my POM file even then this still appears, SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding. SLF4J: Your binding is version 1.5.5 or earlier. SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j

Is there a way to disable the local maven repository?

ぃ、小莉子 提交于 2019-12-10 11:17:49
问题 This may sound crazy but we have our developers all working on the same Linux machine, this machine also has nexus installed as our maven repo. Effectively everyone ends up with artefacts in their ~/.m2/ folder which are also duplicated in the nexus server. Is it possible to simply tell maven to only look at the artefacts in nexus? I have for the moment set the property <localRepository>/path/to/global/repo</localRepository> in our global maven config, but unsure if this could cause a problem

maven dependency clash

谁说我不能喝 提交于 2019-12-10 11:01:56
问题 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

Maven / Eclipse / WTP - /src/main/resources not deployed

笑着哭i 提交于 2019-12-10 10:39:40
问题 I have a Maven/Web/Eclipse project running. When I deploy in Eclipse, the contents of /src/main/resources are not deployed. Here's my org.eclipse.wst.common.component file: <?xml version="1.0" encoding="UTF-8"?> <project-modules id="moduleCoreId" project-version="1.5.0"> <wb-module deploy-name="Grapevine"> <wb-resource deploy-path="/" source-path="/src/main/webapp"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes"

Accessing a property of a sibling project dependency

丶灬走出姿态 提交于 2019-12-10 10:37:43
问题 Let's say I have <properties> ... <module.deployPath>/admin</module.deployPath> ... </properties> in the pom.xml of the project A . And now I'd like to access ${module.deployPath} in another project B where project A is listed as dependency of project B . Is this possible somehow without using external property files or settings.xml? Thank you for your help! Cheers, b 回答1: Staying strictly within Maven's property access mechanism, I'm almost certain you can't do that. If you were to add the

how to configure <manifest> only once in pom.xml in a desktop application

▼魔方 西西 提交于 2019-12-10 10:36:42
问题 I'm making a swing application with maven and I try to keep the pom.xml under tight reins (this file tends to become a pile of junk after pasting there whatever we find in google). My pom is with jar and I use the maven-assembly-plugin with "jar-with-dependencies" descriptor. So I need to define twice the part of my project (main class and versions), once for the normal jar and the other once for the jar-with-dependencies. I think the problem comes from the jar-with-dependencies assembly

Why does Maven is looking in the wrong repo?

半腔热情 提交于 2019-12-10 10:35:56
问题 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 回答1: Maven isn't looking in the wrong repository and dependencies on hibernate 3.5.1

Added repository to Nexus but still not finding artifacts

大城市里の小女人 提交于 2019-12-10 10:31:31
问题 I have a project that uses the hl7api (HAPI) available at http://hl7api.sourceforge.net/m2 In my pom I have defined a repository with this url. If I don't go via local nexus it works but when I do it will not find the artifacts. I have added a proxy repository in Nexus with the same url. Any ideas? 回答1: If you added the repository as a proxy repository in Nexus do not forget to add the proxy to the Repository Group which you use as mirror for all Nexus requests (public/snapshot) - assumed you