How to list all activated profiles in mvn in a multimodule project

Another option is mvn help:all-profiles, which also list inherited profiles. Displays a list of available profiles under the current project. Note: it will list all profiles for a project. If a profile comes up with a status inactive then there might be a need to set profile activation switches/property. More details in Maven’s help plugin … Read more

Run JUnit Tests contained in dependency jar using Maven Surefire

There is a way of running a test in maven from another jar. from maven-surefire-plugin version 2.15 you can tell maven to scan your test jars for tests and run them. You don’t need to extract the tests jar. Just add a dependency to your test jar and: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <dependenciesToScan> <dependency>test.jar.group:test.jar.artifact.id</dependency> </dependenciesToScan> … Read more

JaCoCo not generating jacoco.exec until after skipping JaCoCo execution

Just an addition to the answers already given. It could happen that in your maven-surefire-plugin configuration you already use the argLine configuration to override something like the memory used. If you do so the argline set by jacoco-maven-plugin will not be used failing to generate the jacoco report. In this case assign a property name … Read more

How are maven scopes mapped to ivy configurations by ivy

The following two articles helped me to better understand how Maven and Ivy inter-operate http://www.symphonious.net/2010/01/25/using-ivy-for-dependency-management/ http://lightguard-jp.blogspot.com/2009/04/ivy-configurations-when-pulling-from.html Oddly, I never really understood ivy configurations, until it was explained how they can be used to simulate Maven scopes. The following listis from the www.symphonious.net link and illustrates the available configurations from pom-files/maven repositories: default runtime dependencies and … Read more

maven-failsafe-plugin Errors and BUILD SUCCESS?

You need having two executions blocks, cause the verify goal of the maven-failsafe-plugin is intended to check the results of the integration tests. <executions> <execution> <id>functional-test-1024</id> <phase>test</phase> <goals> <goal>integration-test</goal> </goals> <configuration> <includes> <include>**/IntegrationTierFunctionalTestCase.java</include> </includes> <forkMode>once</forkMode> <argLine>-XX:MaxPermSize=256M -Xmx1024M</argLine> </configuration> </execution> <execution> <id>verify</id> <phase>verify</phase> <goals> <goal>verify</goal> </goals> </execution> </executions> Furthermore you should update the version of the … Read more

maven platform encoding

maven picking these values from Java system properties. Here is how you could set encoding: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> Or: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> Or pass parameter to maven command line: mvn -Dproject.build.sourceEncoding=UTF-8

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)