Re: Need help in executing a Java program and testng.xml one after other using Maven
Hi, You should be able to execute your Java program and bind it to the maven lifecycle using builder-maven-plugin: https://javabuild.java.net/ 2016-02-26 7:26 GMT+01:00 maheshbedampeta : > My question is that I wanted to execute a testNG suite file and a java > program one after other using a POM.xml. > > Please help me out with a code snippet that actually does this execution. > > > Below is my code that is currently running my test scripts of testng.xml, > and I want to add a code for executing a separate Java(Main) class. Please > add the code for executing my java program in it. > > > > > org.apache.maven.plugins > > maven-surefire-plugin > 2.17 > > > > > -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar > > > > ${basedir}\testng.xml > > > ${basedir}/results > > > > > org.aspectj > > aspectjweaver > > ${aspectj.version} > > > > > > > > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Need-help-in-executing-a-Java-program-and-testng-xml-one-after-other-using-Maven-tp5863066.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
"Perhaps you are running on a JRE rather than a JDK?" error building with maven.
Hello I want to use swagger-codegen on Ubuntu 14.04 LTS (OS type 64-bit). So I downloaded the source code from https://github.com/swagger-api/swagger-codegen/tree/v2.1.5 , unzipped it and build with maven. $ sudo mvn -e package The error appears: ... [INFO] Copying 438 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Changes detected - recompiling the module! [INFO] Compiling 66 source files to /home/user/ProgramFiles/swagger-codegen-2.1.5/modules/swagger-codegen/target/classes [INFO] - [ERROR] COMPILATION ERROR : [INFO] - [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] - [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] [INFO] Trace org.apache.maven.BuildFailureException: Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:745) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:118) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more -- "mvn -v" output is: Apache Maven 2.2.1 (rdebian-14) Java version: 1.8.0_71 Java home: /home/user/ProgramFiles/jdk1.8.0_71/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "3.19.0-49-generic" arch: "amd64" Family: "unix" Thanks
Re: "Perhaps you are running on a JRE rather than a JDK?" error building with maven.
On Fri, Feb 26, 2016 at 3:24 PM, Gintare Ragaisiene < gintare.ragaisi...@gmail.com> wrote: > Java home: /home/user/ProgramFiles/jdk1.8.0_71/jre > You are using the JRE which is delivered with the JDK. Try setting your JAVA_HOME and your PATH variables to the JDK bin directory instead of the JRE bin directory. Hth, Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~ Lord Baden-Powell
Re: "Perhaps you are running on a JRE rather than a JDK?" error building with maven.
Hi, i would recommend you to use Maven 3.X at least..and don't use Maven 2.X anymore..(cause it's End Of Life)... Where does JAVA_HOME point to? to /home/user/ProgramFiles/jdk1.8.0_71/ or /home/user/ProgramFiles/jdk1.8.0_71/jre ? Kind regards Karl Heinz Marbaise On 2/26/16 3:24 PM, Gintare Ragaisiene wrote: Hello I want to use swagger-codegen on Ubuntu 14.04 LTS (OS type 64-bit). So I downloaded the source code from https://github.com/swagger-api/swagger-codegen/tree/v2.1.5 , unzipped it and build with maven. $ sudo mvn -e package The error appears: ... [INFO] Copying 438 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Changes detected - recompiling the module! [INFO] Compiling 66 source files to /home/user/ProgramFiles/swagger-codegen-2.1.5/modules/swagger-codegen/target/classes [INFO] - [ERROR] COMPILATION ERROR : [INFO] - [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] - [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] [INFO] Trace org.apache.maven.BuildFailureException: Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:745) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:118) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more -- "mvn -v" output is: Apache Maven 2.2.1 (rdebian-14) Java version: 1.8.0_71 Java home: /home/user/ProgramFiles/jdk1.8.0_71/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "3.19.0-49-generic" arch: "amd64" Family: "unix" Thanks - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Difficulty pulling artifact out of Central Repo
Hello, I'm attempting to download a specific jar from the Central Repo, but am running into some issues. If I go here: http://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-firefox-driver/2.44.0/ And attempt to download the jar "selenium-firefox-driver-2.44.0.jar", I'll get a "connection reset" error. If I navigate to this same jar via the Central Repo ui: http://search.maven.org/#artifactdetails|org.seleniumhq.selenium|selenium-firefox-driver|2.44.0|jar I can download the "selenium-firefox-driver-2.44.0.jar" artifact just fine. This seems odd to me because I'm pretty sure the link on this page just points back to http://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-firefox-driver/2.44.0/ Anyone have any thoughts? -Nick
finding dependencies that should be marked as compile
Is there a way to list any dependencies that are being pulled in transitively that really should be marked as compile? I'd like to isolate any dependencies that I may be missing from the compile scope. Additionally, is there a way to identify dependencies that are listed as compile that aren't required?
Re: finding dependencies that should be marked as compile
https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html On Fri, Feb 26, 2016 at 9:29 PM, Jamie Johnson wrote: > Is there a way to list any dependencies that are being pulled in > transitively that really should be marked as compile? I'd like to isolate > any dependencies that I may be missing from the compile scope. > Additionally, is there a way to identify dependencies that are listed as > compile that aren't required? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org