maven-2

Why datasource is not found in JNDI after injection from jndi.properties?

青春壹個敷衍的年華 提交于 2019-12-30 18:01:16
问题 This is my persistence.xml : <persistence> <persistence-unit name="MyUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/abcDS</jta-data-source> </persistence-unit> </persistence> This is jndi.properties file from src/test/resources which is supposed to create a datasource during testing, since a real application server with a real datasource is absent: java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory jdbc/abcDS=new:/

java maven rebuild dependency

老子叫甜甜 提交于 2019-12-30 08:12:18
问题 I have a project which has dependency A. Project is packing into WAR and dependency A - into jar. And another dependency B, which also depends on A. I want to pack project and when project B is packing it must rebuild its dependency A instead of getting compiled dependency. Please help, how can i achieve this 回答1: Always perform a clean when doing an install, ie mvn clean install . This will make sure that all modules in the project are rebuilt, packaged, and installed in the local .m2

java maven rebuild dependency

淺唱寂寞╮ 提交于 2019-12-30 08:12:11
问题 I have a project which has dependency A. Project is packing into WAR and dependency A - into jar. And another dependency B, which also depends on A. I want to pack project and when project B is packing it must rebuild its dependency A instead of getting compiled dependency. Please help, how can i achieve this 回答1: Always perform a clean when doing an install, ie mvn clean install . This will make sure that all modules in the project are rebuilt, packaged, and installed in the local .m2

java.lang.IllegalStateException: endPosTable already set

雨燕双飞 提交于 2019-12-30 07:58:11
问题 Trying to build an alexa (amazon:echo) skills set. At the same time, trying to use this experience as a learning testbed for dependency injection through dagger 2. However, building the package using maven-2 cmd: mvn assembly:assembly -DdescriptorId=jar-with-dependencies package'. to generate a zip jar with the complete dependencies produces the following exception trace: [INFO] ------------------------------------------------------------------------ [INFO] Building Echo Device Client 1.0

java.lang.IllegalStateException: endPosTable already set

我怕爱的太早我们不能终老 提交于 2019-12-30 07:58:07
问题 Trying to build an alexa (amazon:echo) skills set. At the same time, trying to use this experience as a learning testbed for dependency injection through dagger 2. However, building the package using maven-2 cmd: mvn assembly:assembly -DdescriptorId=jar-with-dependencies package'. to generate a zip jar with the complete dependencies produces the following exception trace: [INFO] ------------------------------------------------------------------------ [INFO] Building Echo Device Client 1.0

java.lang.IllegalStateException: endPosTable already set

自古美人都是妖i 提交于 2019-12-30 07:58:03
问题 Trying to build an alexa (amazon:echo) skills set. At the same time, trying to use this experience as a learning testbed for dependency injection through dagger 2. However, building the package using maven-2 cmd: mvn assembly:assembly -DdescriptorId=jar-with-dependencies package'. to generate a zip jar with the complete dependencies produces the following exception trace: [INFO] ------------------------------------------------------------------------ [INFO] Building Echo Device Client 1.0

How to link source from outside of maven project?

↘锁芯ラ 提交于 2019-12-30 06:36:09
问题 In Maven, is it possible to link additional dependent java src from outside the project folders, so that when we build our main package, maven may include such classes into final jar? just as we can link any source folder to our project in Eclipse and eclipse treats it as regular project source? 回答1: In Maven, is it possible to link additional dependent java src from outside the project folders Technically, it's possible to add source folders to a build and this is usually done using the

Can't use spring-modules-validation with spring 3

狂风中的少年 提交于 2019-12-30 06:19:08
问题 i have following pom file: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- Maven Coordinates(groupId,artifactId,version):define a unique location for a project CONSIDERING that groupId and artifactId combination must be unique.--> <!-- A groupId groups a set of

How to get Cobertura to fail M2 build for low code coverage

 ̄綄美尐妖づ 提交于 2019-12-30 04:31:06
问题 I'm trying to configure my WAR project build to fail if the line or branch coverage is below given thresholds. I've been using the configuration provided on page 455 of the excellent book Java Power Tools, but with no success. Here's the relevant snippet of my project's Maven 2 POM: <build> ... <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.2</version> <configuration> <check> <!-- Per-class thresholds --> <lineRate>80<

Multiple deployments in maven

二次信任 提交于 2019-12-30 04:30:11
问题 We have a internal artifactory repository. At the moment all snapshots will be deployed there. We also want to have a different server with a web interface, and want to copy the to it the created artifacts. For our builds we use Hudson, but the post-build action "Deploy artifacts to Maven repository" together with scp doesn't work. So there is the question of doing it in some other elegant way. Why isn't maven able to have several distribution repositories? Any ideas? The nicest thing would