Which version of Liferay you are using? The "java" executable is the Java interpreter that runs the bytecode. I'll use Notepad to create a Java class called 'Howdy'. java,jsp,spring-mvc,liferay,portlet. Dans ce chapitre, j'ai survolé rapidement la gestion de projet Java avec Apache Maven. Form submit portlet with Spring MVC. Les goals exécutés par chaque phases dépendent du packaging de l'artéfact à générer. Execute the JAR file with following commands: cd target java -jar OracleBanking-1.0-SNAPSHOT.jar; Review the output. As it also contains compiled main class (.class format) so it is used to compress and use the code without execution even without using IDE. Résumons. Maven exec plugin allows us to execute system and Java programs from the maven command. Ce qui devrait vous afficher un magnifique : Hello World! Command line syntax for running Java main class and pass application arguments in Maven: mvn compile exec:java -Dexec.mainClass="com.logicbig.example.MyMainclass" -Dexec.args="myArg1 myArg2" Example pom.xml The simple interest is calculated and displayed in the Maven CLI. So follow this tutorial to learn how to create Java JAR file with Maven and how to set project’s dependencies.

Maven . Lors de l'invocation de la demande de l'exécution d'une phase à Maven, Maven va exécuter toutes les phases précédentes du cycle de vie. Le packaging est précisé grâce à l'élément du POM. There are two goals of the maven exec plugin: exec:exec – can be used to execute any program in a separate process. java -cp target/mon-appli-1.0-SNAPSHOT.jar org.exemple.demo.App. It is used to distribute a software program over the network. The Howdy class will output a message to the console when it is executed. Voici les choses importantes à retenir : You successfully executed the Java SE application named OracleBanking using Maven. ; In this tutorial, we will learn how to use exec:java to run a Java program from our maven project. false Liferay adds namespace to the request parameters by default. if it is > 6.2 GA1 Then in your liferay-portlet.xml file, please add this attribute and recompile and test again. ; exec:java – can be used to run a Java program in the same VM.

maven execute a java class