dependency-management

How can I use different JARs for compiling and testing in maven?

有些话、适合烂在心里 提交于 2019-12-05 03:56:31
I compile my programm against javaee-api. But for Junit testing I must use a specific implementation like glassfish's javaee.jar to avoid errors like java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/Persistence (see also 1 ). So avoid using methods, that are only available in glassfish implementation, I want to compile my artifact with the general api, but run junit with the implementation jar. But both provide equal named classes and inferfaces, so the class loader gets in trouble. What is the best way to solve this

unresolved dependency for postgresql 9.2 jar in play framework

让人想犯罪 __ 提交于 2019-12-05 02:29:42
I am using postgresql 9.2 with play framework 2.1 I downloaded the driver here: http://jdbc.postgresql.org/download.html (JDBC4 Postgresql Driver, Version 9.2-1002) My project/Build.scala file is as follows: import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val appName = "myApp" val appVersion = "0.1" val appDependencies = Seq( "postgresql" % "postgresql" % "9.2-1002.jdbc4") val main = play.Project(appName, appVersion, appDependencies) } I have placed the jdbc driver in the following locations in the play directory structure: myApp/lib/postgresql-9.2-1002

How to set up an IntelliJ Idea Scala project to recognize local Ivy2 cache?

纵然是瞬间 提交于 2019-12-05 01:48:41
As you probablu know, new versions of SBT (as 0.11) are designed to maintain a common libraries cache in ~/.ivy2/cache instead of copying the full set of dependencies inside a project directory. But IntelliJ Idea (I use the SBT plugin to generate an Idea project) default seems to be ignoring the common cache and only see the libraries put under the project directory (so, I have to configure SBT to act this legacy way). How to fix this? There are some Ivy plugins in the Idea plugin repository, but I don't know which (if any) of them can solve the problem (note that I don't want it to manage the

How to remove Modules from a Intellij Maven Project permanently?

若如初见. 提交于 2019-12-04 23:54:30
I am currently working on a larger scale Maven-based project in IntelliJIdea 12.1.6 Ultimate. I have been working with IntelliJIdea since about 5 months. An included module has dependencies on another module. The dependent module's source was also part of my project until recently. Since I removed the dependent module from my project, I get compile errors whenever I am trying to compile the source without maven. The pom.xml of removed modules in Intellij seem to be placed onto the Settings->Maven->Ignored Files. I cant seem to remove it from there, only check or uncheck it. It's not possible

Can I compile a Scala project with mixed java and scala code with dependencies both ways in Maven?

痴心易碎 提交于 2019-12-04 21:09:02
问题 I have a project which has both scala and java code which I am currently managing in eclipse using the scala IDE plugin. At present the directory structure is organized such that some packages have both java and scala code in them. There are scala classes which depend on java classes and there are other java classes which depend on the scala classes. The plugin handles all of this transparently – I believe (but I’m not 100% sure) that the scala compiler compiles both the java and scala code

Maven - Dependency Inheritance - Provided

安稳与你 提交于 2019-12-04 19:35:13
问题 I make use of dependency POMs which I will then go and include into another projects as as dependency. The problem I am having is while it aggregates the POM with those dependencies, it appears when I declare dependencies of scope, provided, those aren't included. Is it possible to include provided dependencies in dependency POMs with a scope of provided? I often declare what APIs I need and then include the implementation as a runtime dependency. 回答1: If a dependency is provided why can't

pip: dependency on javascript library

痴心易碎 提交于 2019-12-04 19:16:07
Dependencies to other python libraries can be declared by pip's requirements.txt . But is it possible to declare a dependency to a pure js library? The library is available from github. The files should be downloaded an made available for django static file handling. Background: setting up new development environments of a custom django application should be easy. How do you handle this in your development environment? dnozay As pointed out by @guettli you can use fanstatic packages . E.g. requirements.txt django js.jquery js.bootstrap js.underscore # ... without django-fanstatic: Then in your

What is the advantage of using CocoaPods?

十年热恋 提交于 2019-12-04 16:16:49
问题 A lot of the pods can be installed "manually" by simply dragging some files to the project. To me, this seems like a more convenient way to install a pod. If I used CocoaPods, I would have to create a PodFile and execute a bunch of commands, add the framework to the "Linked Frameworks and Libraries" section, and rebuild. That seems like a lot of work. Yet CocoaPods is the "recommended" way to install pods. I know that CocoaPods can detect updates for you. But it's not like you open Xcode and

How to exclude specific dependencies from spring-boot-starter-parent

牧云@^-^@ 提交于 2019-12-04 14:31:33
I am using a legacy Spring application and want to migrate to Spring Boot. My intention is to use the spring-boot-starter-data-jpa . For this reason I have added following section in pom.xml (which manages all spring-boot-dependencies ): <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.RELEASE</version> </parent> But this is screwing up certain dependencies which I need to retain for time being. I am currently using Selenium dependencies (version 2.53.0 ; added transitively from another project) but spring-boot is fetching

How can I exclude plugins jar required at build time?

早过忘川 提交于 2019-12-04 13:39:13
I have Grails plugin that do some job (precompiles static files) at build time (before war is built). To do its job some jar dependencies are required. So this dependencies are required only at build time. How can I exclude them from final WAR? Add to your BuildConfig.groovy : grails.war.resources = { stagingDir -> delete(file:"${stagingDir}/WEB-INF/lib/whatever.jar") } This is best done using script. I had to employ this when deploying a WAR for a production that required excluding jar files. Create a script file called _Event.groovy under the script directory. Inside the _Event.groovy file,