maven in 5 min not working

Found solution: Solution #1: issue was with proxy in settings.xml file: <host>webproxy</host> to get host goto IE->tools->connection->LAN settings->advanced->http. ===== Solution #2: if auto configured proxy is given: then 1> open IE(or any browser) 2> get the url address from your browser through IE->Tools->internet option->connections->LAN Settings-> get address and give in url eg: as http://autocache.abc.com/ and … Read more

Running Cucumber tests directly from executable jar

I would divide the problem you are thinking of in two parts. Create an executable jar Run Cucumber from your own main method Creating an executable jar using Maven can be done in different ways. One way of doing it is described here: http://www.thinkcode.se/blog/2011/03/05/create-an-executable-jar-from-maven It is a small example that only focuses on executing something … Read more

IllegalArgumentException: At least one JPA metamodel must be present

You have added <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> in your pom.xml. Spring boot will try automatically create an entity factory for JPA, but you do not have defined anything regarding JPA models. Try removing it in order to test what have you done so far. Afterwards you can check a tutorial using spring-data-starter-jpa like this guy

How to configure Lombok with maven-compiler-plugin?

This is not a direct answer to the question which seems to be solved but acts as reference for future searchers: If you’re using Dagger (or something else) to process your annotations like <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.7.0</version> <configuration> <annotationProcessorPaths> <path> <groupId>com.google.dagger</groupId> <artifactId>dagger-compiler</artifactId> <version>2.15</version> </path> </annotationProcessorPaths> <source>1.8</source> <target>1.8</target> </configuration> </plugin> …. </plugins> </build> You … Read more

How to pass java code a parameter from maven for testing

This is the exact thing I was looking for my automation test and I got it working. Command Line argument mvn clean test -Denv.USER=UAT -Dgroups=Sniff My Pom Xml <?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/xsd/maven-4.0.0.xsd”> <modelVersion>4.0.0</modelVersion> <groupId>TestNg</groupId> <artifactId>TestNg</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.8</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> … Read more

Compiling only selected files in Maven

Simple app with 3 classes. com/company/Obj1.java com/company/Obj2.java com/company/inner/Obj3.java build in pom.xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.6</source> <target>1.6</target> <includes> <include>com/company/inner/*.java</include> </includes> </configuration> </plugin> </plugins> </build> result: 1 class is compiled. And any combination of includes is working well or you mean something else?

Maven not picking JAVA_HOME correctly

It’s a bug in the Eclipse Maven support. Eclipse doesn’t support all of the global Maven properties as per the Maven specs. According to the specs: ${java.home} specifies the path to the current JRE_HOME environment use with relative paths to get for example At least in Eclipse 4.3.1 that is not the case, here java.home … Read more

How to include system dependencies in war built using maven

Let me try to summarise the options I tried : <packagingIncludes>${java.home}/lib/jfxrt.jar</packagingIncludes> This doesn’t work! Also, only having the jar name, excludes everything else, so if you are willing to try then try <packagingIncludes>${java.home}/lib/jfxrt.jar,**/*</packagingIncludes> Jatin’s answer seemed a bit complex and I tried going through the POM again & again to figure out where exactly were … Read more