Running groovy tests with Maven - java

I have a folder structure as below
ProjectName
- src
- test
- groovy
- java
When I run command mvn clean install . It only runs Java Unit tests(Located under *src\test\java* directory) while Groovy tests cases are not invoked. It seems Groovy is not finding Groovy tests anymore.
Please help me in enabling groovy tests cases Execution with the help of Maven ?
pom.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ApacheActiveMQSpike</groupId>
<artifactId>ApacheActiveMQSpike</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>ApacheActiveMQSpike</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.8.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.6-beta-2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

You will need to use gmaven plugin to trigger groovy tests
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-3</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<sources>
<fileset>
<directory>${pom.basedir}/src/test/java</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</fileset>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Nice article about running Groovy tests in Maven.
The structure should be
<project>
...
<build>
<plugins>
<plugin>
....
</plugin>
</plugins>
</build>
...
</project>

Related

Maven can't resolve any Java import statements

Now I'm using IntelliJ IDEA 2019.3.3 (Community Edition) with Maven 3.6.1., JDK 1.8.0_131 at a laptop with Windows 10.
I imported the project from GitHub, that 100% works at other PCs.
For the unknown reason can't resolve any import:
When I trying import any class I receive a message like Cannot resolve symbol 'WebDriver'.
The same situation was with a project created from scratch.
I tried to re-install IntelliJ IDEA (current and previous versions), Maven (current and previous), JDK (13). Also, I tried to delete .M2 directory, re-import Maven project but still had this issue.
When I tried to compile (or execute any commands, like "install", "deploy" etc.) project from Maven command line I received:
[WARNING] Error injecting: org.apache.maven.plugin.resources.ResourcesMojo
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No implementation for org.apache.maven.shared.filtering.MavenResourcesFiltering was bound.
while locating org.apache.maven.plugin.resources.ResourcesMojo
1 error
Project JDK is set up properly.
Project's POM.xml is:
<?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>com.udc</groupId>
<artifactId>serenity-selenium-10.02.2020</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<serenity.version>2.1.6</serenity.version>
<jbehave.version>1.46.0</jbehave.version>
<selenium.version>3.141.59</selenium.version>
<webdrivermanager.version>3.8.1</webdrivermanager.version>
<mysql.version>8.0.19</mysql.version>
<maven.compiler.plugin.version>3.7.0</maven.compiler.plugin.version>
<surefire.version>2.20</surefire.version>
<source.encoding>UTF-8</source.encoding>
<java.version>8</java.version>
<test.name>*</test.name>
</properties>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-jbehave</artifactId>
<version>${jbehave.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>${webdrivermanager.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${source.encoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<includes>
<include>**/tests/**/${test.name}.java</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

Why Maven is not running test cases?

I am beginner in maven and I have created a maven project, when I execute the project via clicking on as Maven Test it doesn't execute any test cases which is written under the #Test annotation.
But same code when I execute with Testng then its work fine.
Can anyone give some light to resolving it.
pom.xml:
<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>Webdriver</groupId>
<artifactId>Webdriver</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<inherited>true</inherited>
<configuration>
<suiteXMLFiles>
<suiteXMLFile>testng.xml</suiteXMLFile>
</suiteXMLFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
By convention, the test classes must also end with "Test". If they don't, you should add
<includes>
<include>**/*.java</include>
</includes>
to your surefire config (or whatever includes work for you and your file naming scheme).

no main manifest attribute error for maven project

i have a project in eclipse where i try to run a selenium junit test.
I converted the project to Maven
When i run this java -jar My-Test-0.0.1-SNAPSHOT.jar
It says:
no main manifest attribute, in My-Test-0.0.1-SNAPSHOT.jar
What is wrong with me pom file?
The pom.xml file:
<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>com.blogspot.test</groupId>
<artifactId>My-Test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>My-Test</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.44.0</version>
</dependency>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>all</shadedClassifierName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</dependencies>
</project>
Is your project a web project?? Because as I know, Selenium only works with web projects. And there you have your project packaged as a jar (not as a war)

Package missing on maven build

I'm trying to run a JUnit test in Travis CI using Maven, but every attempt makes me face the same error:
[ERROR] \luiz.kill\Workspace\hawickjames\src\main\java\com\lzkill\main\CountElementaryCircuitsFromRFC.java:[3,24] error: package org.jgrapht.graph does not exist
I also see this when I use m2e to fire Maven, the dependencies don't even show up Eclipse as if the download was not processed.
It really looks like a javac problem. How can I make the download succeed and the compiler find the right jars?
Here's my pom.xml:
<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>com.lzkill</groupId>
<artifactId>myArtifact</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>...</name>
<description>...</description>
<url>...</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jgrapht</groupId>
<artifactId>jgrapht</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<show>protected</show>
<windowtitle>...</windowtitle>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
You did not specify any dependencies only which version to use if you declare a dependency.
Remove the the dependencyManagement tags and you are set.
DependencyManagement helps you resolve version conflicts and is a good idea in a parent pom of multiple related projects. But it does not declare a dependency.

MAVEN, Netbeans Platform : Could not find the main class

I follow this tutorial :https://platform.netbeans.org/tutorials/nbm-maven-crud.html and I have an issue.
I tried to create the sample "maven crud sample application" and my "maven netbeans application" and I get always the same error. When I run the project, I get the following exception:
--- nbm-maven-plugin:3.3:run-platform (default-cli) # application ---
Executing: /bin/sh -c "/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/foo/bin/foo" --userdir '"/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/userdir"' -J-Dnetbeans.logger.console=true -J-ea --branding foo --jdkhome /usr/local/java/jdk1.6.0_45
Exception in thread "main" java.lang.NoClassDefFoundError: maven//MavenCRUDSample/application/target/userdir/var/log/heapdump/hprof
Caused by: java.lang.ClassNotFoundException: maven.MavenCRUDSample.application.target.userdir.var.log.heapdump.hprof
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: maven/MavenCRUDSample/application/target/userdir/var/log/heapdump.hprof. Program will exit.
In this tutorial, I don't see any modification to make at the main class
I did the same tutorial without MAVEN and it works : https://platform.netbeans.org/tutorials/nbm-crud.html
With this error, I can't run my application and have my netbeans platform window. Someone knows why I have this?
I'm on Netbeans 6.9.1 with jdk1.6.0_45 and maven-3.2.1
OS : Ubuntu 64bit
edit :
I've got 4 pom.xml :
Parent : crud-sample-application – netbeans Platform Application
crud-sample-application – Netbeans Platform based application
crud-sample-application – Platform application branding ressources
crud-sample-application – sample Netbeans Module
Sorry I wasn't able to split it.
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - NetBeans Platform Application</name>
<repositories>
<!-- this is a remote repository hosting the netbeans api artifacts.
the versions of the artifacts are netbeans IDE release based, eg. RELEASE65
You might want to use your own repository. To create one, use the nbm:populate-repository goal.
-->
<repository>
<id>netbeans</id>
<name>repository hosting netbeans.org api artifacts</name>
<url>http://bits.netbeans.org/maven2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-actions</artifactId>
<version>RELEASE68</version>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.1</version>
<extensions>true</extensions>
<configuration>
<descriptor>src/main/nbm/module.xml</descriptor>
<brandingToken>${brandingToken}</brandingToken>
<cluster>foobar</cluster>
</configuration>
</plugin>
<!-- netbeans modules in 5.5+ are 1.5 compatible -->
<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>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>crudsample</module>
<module>branding</module>
<module>application</module>
</modules>
<properties>
<netbeans.version>RELEASE68</netbeans.version>
<brandingToken>foo</brandingToken>
</properties>
</project>
<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>application</artifactId>
<packaging>nbm-application</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - NetBeans Platform based application</name>
<dependencies>
<dependency>
<groupId>org.netbeans.cluster</groupId>
<artifactId>platform11</artifactId>
<version>${netbeans.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>crudsample</artifactId>
<version>1.0-SNAPSHOT</version>
<type>nbm</type>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>branding</artifactId>
<version>1.0-SNAPSHOT</version>
<type>nbm</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>deployment</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<executions>
<execution>
<id>updatesite</id>
<phase>package</phase>
<goals>
<goal>autoupdate</goal>
</goals>
<configuration>
<!--distBase>central::default::http://repo1.maven.org/maven2</distBase-->
</configuration>
</execution>
<execution>
<id>webstart</id>
<phase>package</phase>
<goals>
<goal>webstart-app</goal>
</goals>
<configuration>
<codebase>${project.build.directory}/webstart/${brandingToken}</codebase>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>branding</artifactId>
<packaging>nbm</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - Platform application branding resources</name>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<executions>
<execution>
<id>branding</id>
<phase>process-resources</phase>
<goals>
<goal>branding</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>nbm</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - sample NetBeans Module</name>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-explorer</artifactId>
<version>RELEASE68</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-nodes</artifactId>
<version>RELEASE68</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-dialogs</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-execution</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.5.3.0_1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
<groupId>org.netbeans</groupId>
<artifactId>crudsample</artifactId>
<repositories>
<repository>
<url>http://ftp.ing.umu.se/mirror/eclipse/rt/eclipselink/maven.repo</url>
<id>eclipselink</id>
<layout>default</layout>
<name>Repository for library Library[eclipselink]</name>
</repository>
</repositories>
</project>
I use netbeans for run my application ==> run project :
install nbm:run-platform
run project via main() :
process-classes org.codehaus.mojo:exec-maven-plugin:1.1.1:exec
avec les arguments :
exec.classpathScope=${classPathScope}
exec.args=-classpath %classpath ${packageClassName}
exec.executable=java "
Thanks,
M.
Problem solve, When netbeans execute :
/bin/sh -c "/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/foo/bin/foo" --userdir '"/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/userdir"' -J-Dnetbeans.logger.console=true -J-ea --branding foo --jdkhome /usr/local/java/jdk1.6.0_45
It doesn't like the space between maven and test. I rename my folder and it works.

Categories

Resources