I was trying to build a project in Intellij-idea with Maven and got a error saying that “Cannot resolve method ‘combinations’ in ‘Sets’ The code where the error is showing is here : The imports im using : I have guava dependency in the pom.xml, tried putting this dependency but it doesn’t work: Image with the error when i try
Tag: maven-2
‘mvn’ is not recognized as an internal or external command, operable program or batch file
May be question is asked before but i found very strange kind of error. When I run mvn –version command from bin its gives the version and the other information. However when I run outside bin it gives exception. Both the result mention below Also i set JAVA_HOME in user variable and M2_HOME, M2 in system environment variable. The output
How to download SNAPSHOT version from maven SNAPSHOT repository?
So I have a project and I do regular releases to maven without a problem. I now want to make available a SNAPSHOT version of this project. So I do ‘mvn clean deploy’. Everything works as you can see below: [INFO] Retrieving previous build number from sonatype-nexus-snapshots Uploading: https://oss.sonatype.org/content/repositories/snapshots/me/soliveirajr/menta-regex/0.9.6-SNAPSHOT/menta-regex-0.9.6-20111010.153035-2.jar 5K uploaded (menta-regex-0.9.6-20111010.153035-2.jar) I go to my sonatype manager and I
Maven: best way of linking custom external JAR to my project?
It’s my first couple of days learning Maven and I’m still struggling with the basics. I have an external .jar file (not available in the public repos) that I need to reference in my project and I’m trying to figure out what my best option is. It’s a small scale project without a central repository for libraries, so it has
What are unused/undeclared dependencies in Maven? What to do with them?
Maven dependency:analyze complains about the dependencies in my project. How does it determine which are unused and which are undeclared? What should I do about them? Example: Note: A lot of these dependencies are used in my runtime container and I declared them as provided to avoid having the same library on the classpath twice with different versions. Answer Not
How to upload sources to local Maven repository
Suppose I have a Maven 2 Java project on my local machine. I build the project .jar file and push it to my local Maven repo, using mvn install. Question: How can I force Maven to also push the project sources jar to the local repo? This is useful if I’ll use the above mentioned project as dependency while developing
HowTo Unit Test Client Server Code
I’m currently writing a Java Client Server Application. So i want to implement two Libraries, one for the Client and one for the Server. The Client Server Communication has a very strict protocol, that I wan’t to test with JUnit. As build tool im using Maven and a Husdon Server for continues Integration. Actually I do not have any good
“unable to locate Spring NamespaceHandler” error
I’m creating a stand-alone Sava application with Spring, to handle the JDBC access. The application works fine on every test and I decided that I need a jar to be deployed our clients. They might not have spring in their classpath, so I used maven-assembly-plugin to handle the jar creation with dependencies. However when I try to run the application:
Can we start the maven build from the point where it failed
Suppose, I am doing a full build on my large project which has 7 modules and on the 6th module, the build failed because a test failed. Is there any way by which I can start the build from the point …
Get Maven artifact version at runtime
I have noticed that in a Maven artifact’s JAR, the project.version attribute is included in two files: Is there a recommended way to read this version at runtime? Answer You should not need to access Maven-specific files to get the version information of any given library/class. You can simply use getClass().getPackage().getImplementationVersion() to get the version information that is stored in