Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

Unable to run setup jar file #56

Closed
rufaraday opened this issue Aug 4, 2014 · 6 comments
Closed

Unable to run setup jar file #56

rufaraday opened this issue Aug 4, 2014 · 6 comments

Comments

@rufaraday
Copy link

Hi,

thanks for fixing #54. Now I'm facing issues with setup. When I build sikuli with mvn clean install all seems to go well (no errors, all modules built successfully), but when I try to run java -jar Setup/target/sikulixsetup-1.1.0-Beta4.jar I got:

Failed to load Main-Class manifest attribute from
Setup/target/sikulixsetup-1.1.0-Beta4.jar

When I run the sikulixsetup .jar from nightly builds and run it just the same way it works like a charm.

I spot that formerly setup was run from sikulixsetup-1.1.0-plain.jar file. Does it changed over the time?

When I move back in time to commit e1807eb and run mvn clean install I get sikulixsetup-1.1.0-Beta4-plain.jar that I can run successfully.

My OS is Ubuntu 12.04.

@RaiMan
Copy link
Owner

RaiMan commented Aug 4, 2014

Sorry for the inconveniences: I am currently revising the setup procedures.

Now it is possible, to directly run a setup in the project (I needed that to be able to debug).
This is like a complete offline setup (do not allow, to download anything!).
No log file is written: everything is shown on stdout.

I just added the possibility to run it from command line with mvn exec:exec being in folder APIFat (or directly from NetBeans (or Eclipse ???)). Be sure to have run mvn clean install before, if anything has changed.
The setup folder used in this case is Setup/target (hardcoded).
Before the setup dialog starts internally the needed jars for the offline setup are gathered from the project.

If you cancel the setup at the config dialog, you already have a useable sikulixapi…jar in Setup/target that contains the libs for all systems.

@RaiMan RaiMan closed this as completed Aug 4, 2014
@rufaraday
Copy link
Author

I can't get this to work. Could you check if I get you right?

This is what I'm doing:

~/SikuliX-2014$ git pull origin master      #1
~/SikuliX-2014$ mvn clean install           #2
~/SikuliX-2014$ cd APIFat/                  #3
~/SikuliX-2014/APIFat$ mvn exec:exec        #4

After step #4 I get error

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.1:exec (default-cli) on project sikulixapi-complete: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

I tried to run offline Maven builds (mvn clean install in step #2 and mvn -o exec:exec in step #4), but still no luck.


Here is some stacktrace of the error (got it after running mvn -e exec:exec):

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.1:exec (default-cli) on project sikulixapi-complete: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.1:exec (default-cli) on project sikulixapi-complete: Command execution failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:303)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:402)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:164)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:750)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:292)
    ... 21 more

@RaiMan
Copy link
Owner

RaiMan commented Aug 6, 2014

just checked in my local project (synched using SourceTree) on Mac and Windows:
works.

Sure you have the latest git content?

@rufaraday
Copy link
Author

Yes, my local HEAD it's 880150d.
I'm trying to build it under Ubuntu 12.04.
git diff and git status are clear too.

@rufaraday
Copy link
Author

I'll check it again on other workstation tomorrow.

@RaiMan
Copy link
Owner

RaiMan commented Aug 6, 2014

I have to admit, that I never tried mvn on some Ubuntu systems.
But I think I should have a git/maven environment on Linux too (but I will take Ubuntu 14.04).

Since the exec plugin simply executes the created command, just check, wether it works on command line directly:
java -jar target/sikulixapi-complete-1.1.0-Beta4-plain.jar

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants