Izpack Maven plugin Invalid base directory on Eclipse Maven project - java

When I'm going to Maven-install my project with pom
<build>
<defaultGoal>package</defaultGoal>
<sourceDirectory>${basedir}/src/main/izpack</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/izpack</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Configure the compiler to use Java 1.5 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<!-- Have project dependencies be picked up by izPack when its compiler runs -->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>5.0.0-rc4</version>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-panel</artifactId>
<version>5.0.0-rc4</version>
</dependency>
</dependencies>
<!-- mvn help:describe -DgroupId=org.codehaus.izpack -DartifactId=izpack-maven-plugin -Dversion=5.0.0-beta11 -Ddetail -->
<configuration>
<installFile>${staging.dir}/install.xml</installFile>
<attach>false</attach>
<kind>standard</kind>
<descriptorEncoding>UTF-8</descriptorEncoding>
<izpackBasedir>${staging.dir}</izpackBasedir>
<customPanelDirectory>${staging.dir}</customPanelDirectory>
</configuration>
<executions>
<execution>
<id>standard-installer</id>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Do not deploy any of the installer artifacts. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<staging.dir>${project.build.directory}/staging</staging.dir>
</properties>
Failed to execute goal org.codehaus.izpack:izpack-maven-plugin:5.0.0-rc4:izpack (standard-installer) on project Izpack-Installer: Failure during compilation process: Invalid base directory: workspace/myproject/target/staging
The above error is making my whole day waste... please post working pom of izpack Maven plugin which support console installation in Linux.
Note: I placed my install.xml in src/main/izpack/install.xml as well as src/main/resources/install.xml.

Finally after end of the day got answer...:)
<build>
<defaultGoal>package</defaultGoal>
<sourceDirectory>${basedir}/src/main/resources</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Configure the compiler to use Java 1.7 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- Have project dependencies be picked up by izPack when its compiler runs -->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>5.0.0-rc4</version>
<configuration>
<installerFile>${basedir}/target</installerFile>
<izpackBasedir>${staging.dir}</izpackBasedir>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-standalone-compiler</artifactId>
<version>4.3.5</version>
</dependency>
</dependencies>
</configuration>
<executions>
<execution>
<id>izpack</id>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Do not deploy any of the installer artifacts. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<staging.dir>${project.build.directory}/staging</staging.dir>
</properties>
"staging" directory in target folder is created manually....:)

Related

Why am I sometimes getting strange FileNotFoundExceptions when starting a web application with tomcat via Intellij

I'm working on a Java 8 Web Application with Spring and Spring Security. It is a simple Web-Application which is being built via aven into a war-File. My IDE is Intellij IDEA Ultimate, the application is being deployed with Intellij to a Tomcat 8.5. The build process uses two Maven profiles.
If I try to start the application via an Intellij Tomcat Run Configuration, I sometimes (not every time, which also is weird) get FileNotFoundExceptions for jars inside target\webapp\WEB-INF\lib\. The dependencies are all defined insided the pom-file, just like for any standard Maven-Project, so nothing fancy here. No relative or absolute file paths anywhere! If I check for the "missing" jars then I find them, they are all where they are supposed to be ("<%Project_Root%>\target\webapp\WEB-INF\lib\") but where Intellij says they aren't.
Example ErrorStack:
17-May-2019 13:23:11.715 SCHWERWIEGEND [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.reload Exception starting Context with name [/collphir]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/collphir]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3839)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:291)
at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5612)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1389)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1361)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: java.io.FileNotFoundException: C:\GITROOT\adesso\collphir4_backend\target\webapp\WEB-INF\lib\spring-data-jpa-1.11.1.RELEASE.jar (Das System kann die angegebene Datei nicht finden)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.isMultiRelease(AbstractSingleArchiveResourceSet.java:121)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:250)
at org.apache.catalina.webresources.StandardRoot.getResourcesInternal(StandardRoot.java:327)
at org.apache.catalina.webresources.CachedResource.validateResources(CachedResource.java:140)
at org.apache.catalina.webresources.Cache.getResources(Cache.java:147)
at org.apache.catalina.webresources.StandardRoot.getResources(StandardRoot.java:315)
at org.apache.catalina.webresources.StandardRoot.getClassLoaderResources(StandardRoot.java:231)
at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:146)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5062)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 8 more
Caused by: java.io.FileNotFoundException: C:\GITROOT\adesso\collphir4_backend\target\webapp\WEB-INF\lib\spring-data-jpa-1.11.1.RELEASE.jar (Das System kann die angegebene Datei nicht finden)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:130)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:196)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:181)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:308)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.isMultiRelease(AbstractSingleArchiveResourceSet.java:116)
... 17 more
Excerpt from my pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<packagingExcludes>
%regex[app-(?!${portal.frontend-base}).*],
%regex[profiles/(?!${portal.client-code}).*],
**/build/**,
**/scss/**,
**/node_modules/**,
**/*.map,
**/jsDoc.js
</packagingExcludes>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
<webappDirectory>target/webapp</webappDirectory>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestEntries>
<company>${project.organization.name}</company>
<application>${portal.backend-base}</application>
<build-date>${buildDateTime}</build-date>
<build-revision>${buildRevision}</build-revision>
<scm-branch>${scmBranch}</scm-branch>
</manifestEntries>
</archive>
<webResources>
<!-- copy/parse context.xml -->
<resource>
<directory>src/main/resources/META-INF/</directory>
<targetPath>META-INF</targetPath>
<filtering>true</filtering>
<includes>
<include>context.xml</include>
</includes>
</resource>
<!-- copy/parse web.xml -->
<resource>
<directory>src/main/webapp/WEB-INF/</directory>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
<includes>
<include>web.xml</include>
</includes>
</resource>
<!-- copy/parse index.html -->
<resource>
<directory>src/main/webapp/app-${portal.frontend-base}/</directory>
<filtering>true</filtering>
<includes>
<include>index*.html</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring-data-jpa.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.4</version>
</dependency>
<!-- [...] -->
</dependencies>
Add the jar dependency in your pom.xml -
Dependencies : add dependency in your pom.xml
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.11.1.RELEASE</version>
</dependency>
Build Configuration :
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<!--<skipMain>true</skipMain> -->
<skip>true</skip>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>target/jacoco.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>target/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

Maven shade plugin remove "original"

Each time I run maven package to produce an updated jar, it creates an "original" jar file, as well as the updated one.
This is particularly an issue for me due to the fact that I'm running the compiled jar automatically, and they're both trying to start.
All I want created is the ${project.artifactId}-${project.version}-shaded.jar file produced, and not the "original" one. Is there a way to have it just overwrite without making a backup (I'm assuming that's what it's doing)?
How can I solve this?
Here is my pom:
<groupId>com.spiromarshes</groupId>
<artifactId>LiveDebugTest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>LiveDebugTest</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<version>3.6.1</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<outputDirectory>${dir}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Solved by using <outputFile>${dir}/${project.artifactId}.jar</outputFile> under the configuration section for maven-shade-plugin.
Full example, for context:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<outputFile>${dir}/${project.artifactId}.jar</outputFile>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
The original Maven intended file name for the package includes the version number.
There is a shade-plugin configuration that not only prevents the "original"-prefixed file name, but also achieves the original Maven package name.
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
.. ..
.. more shade configuration ..
.. ..
</configuration>
</execution>
</executions>
</plugin>

How to create single jar with dependencies in maven

I am trying to create single fat jar using maven assembly plugin but somehow after running maven clean install it give 2 jars, one is client-1.0-SNAPSHOT.jar and other one is client-1.0-SNAPSHOT-jar-with-dependencies.jar.
I am only interested to create a jar with dependencies so dont know why the other jar is also creating by this assemble plugin.
Can someone tell me how to eliminate this jar Or should i use some other maven command rather than clean install ?
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<excludes>
<exclude>*.properties</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- download source code in Eclipse, best practice -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</configuration>
</plugin>
<!-- Set a compiler level -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<!-- Maven Assembly Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
-->
<!-- MainClass in mainfest make a executable jar -->
<archive>
<manifest>
<mainClass>com.app.MainApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- bind to the packaging phase -->
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<!-- overwrite! -->
<overwrite>true</overwrite>
<outputDirectory>${project.basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/</directory>
<includes>
<include>*.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Maven build is affected by Eclipse .classpath file

Maven build is affected by Eclipse .classpath file content.
I have 2 lines in .classpath, that I don't want maven to know about (src/old/java & src/test/manual).
<!-- Disable these 2 lines below to see how project compiles with Maven on Jenkins-CI or locally
-->
<classpathentry including="**/*.java" kind="src" output="target/old-classes" path="src/old/java"/>
<classpathentry excluding="**/.svn/" including="**/*.java" kind="src" output="target/test-classes" path="src/test/manual"/>
However maven is taking that. And executes those manual tests. And of course fails.
How to disable this behavior?
I use Maven 3.0.4. build section of pom.xml is below.
<build>
<plugins>
<plugin>
<!-- <groupId>org.apache.maven.plugins</groupId> -->
<artifactId>maven-compiler-plugin</artifactId>
<!-- <version>2.3.2</version> -->
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
<!-- http://maven.apache.org/plugins/maven-clean-plugin/examples/delete_additional_files.html
<plugin> RAW
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>some/relative/path</directory>
<includes>
<include>**/*.tmp</include>
<include>**/*.log</include>
</includes>
<excludes>
<exclude>**/important.log</exclude>
<exclude>**/another-important.log</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
-->
<!-- http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>target/fun_base-1.0-SNAPSHOT</directory>
<excludes>
<exclude>**/*.jar</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
<!-- http://maven.apache.org/plugins/maven-war-plugin/examples/rapid-testing-jetty6-plugin.html -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
<!-- http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<javadocVersion>${java-version}</javadocVersion>
<source>${java-version}</source>
<verbose>false</verbose>
</configuration>
</plugin>
<!-- http://maven.apache.org/plugins/maven-pmd-plugin/examples/targetJdk.html -->
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<targetJdk>${java-version}</targetJdk>
</configuration>
</plugin>
</plugins>
</build>
<!-- http://maven.apache.org/plugins/maven-pmd-plugin/examples/targetJdk.html -->
<reporting>
<plugins>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<targetJdk>${java-version}</targetJdk>
</configuration>
</plugin>
</plugins>
</reporting>

How to properly set up multi profile maven project?

Hey, I'm talking about profiles within pom.xml of a project. Could please anybody explain to me, why if I have 2 profiles in pom definition and I run test phase from one of the profiles, both the Main method is executed and all the tests are run by surefire plugin ? I mean, even the surefire plugin runs all the tests, even though it is within a different profile ?
mvn test -Pcode-generator
the first one,code-generator, is just for Main methods execution and the second one for the rest of the project.
<profiles>
<profile>
<id>code-generator</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>cz.instance.transl.Main</mainClass>
<arguments>
<argument>arg0</argument>
<argument>arg1</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1</version>
<configuration>
<warName>${war.file.name}</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7</version>
<configuration>
<useFile>false</useFile>
<argLine>-Dportal.test=generic
-Dwebdriver.chrome.driver="/opt/google/chrome/chromedriver"
-Dwebdriver.development=true
-Dwebdriver.firefox.useExisting=true
-Dwebdriver.firefox.profile=webdriver
-Dwebdriver.reap_profile=true
-Dsurefire.useFile=false
-Xmx2048M
-XX:MaxPermSize=1048M
-XX:+CMSClassUnloadingEnabled
</argLine>
<skipTests>false</skipTests>
<suiteXmlFiles>
<suiteXmlFile>${basedir}/src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<systemProperties>
<property>
<name>log4j.configuration</name>
<value>META-INF/log4j.xml</value>
</property>
</systemProperties>
<includes>
<include>cz/instance/transl/tests/selenium/*Test.java</include>
</includes>
<excludes>
<exclude>cz/instance/transl/tests/sample/*Test.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.7.1</version>
<!-- <configuration> <useFile>false</useFile> </configuration> -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/java</directory>
<includes>
<include>**/*.*</include>
</includes>
</testResource>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
<includes>
<include>**/*</include>
</includes>
</testResource>
</testResources>
<resources>
<resource>
<directory>${project.basedir}/src/main/java</directory>
<includes>
<include>**/*.java</include>
<include>service.properties</include>
</includes>
</resource>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
<include>profiles/*</include>
</includes>
</resource>
</resources>
</build>
</profile>
</profiles>
The surefire plugin is one that runs by default for a java project. You have a number of options:
Add the surefire plugin to your code-generator profile and override it not to run.
Run with -DskipTests.
Specify only the goal you want to run, instead of running a full maven build.

Categories

Resources