How to add file permissions with universal plugin in sbt scala - sbt-native-packager

I am trying to give executable permissions to the file through universal plugin in sbt. I have tried giving with Linux package mappings but I am getting run time errors.

Related

Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long

Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long
I have created a Jhipster micro service. when I am trying to start, I get error CreateProcess error=206, The filename or extension is too long.
All other questions are suggesting to reduce classpath or usning IntelliJ. None of them explained how. Here are few things I have trying:
Remove Unnecessary jar from classpath:
I have fresh Jhipsterap. I don't know which jar I can remove
without breaking it.
Use IntelliJ
I am running the service from command line.
Move your project or maven repo to "c:" drive to make path short.
I can't. The repo is huge and is being shared.
Let me know if there is any other solution for this problem.
Thanks
There is fairly simple way of reducing classpath on windows, if you can not move your local repo. Here is how:
Open command prompt and execute this command
mklink /J c:\repo C:\<long path to your maven repository>
This will create a link to your maven repository. Now run the service like this:
mvn -Dmaven.repo.local=c:\repo spring-boot:run
Thats all. Now your classpath will be reduced by around 10000 characters (tried for jhipster gateway app).
Good luck.
Forking is enabled by default since Spring Boot 2.2.
See Since 2.2.0 spring-boot-maven-plugin create 2 java process (may cause CreateProcess error=206). Need workaround to fix it question and solution

How to launch executable embedded within Eclipse plug-in?

I am building an Eclipse plug-in that have to parse the result of an executable (Linux) to display informations to the user. The executable should be embedded in the plug-in, not installed apart.
I first made a small prototype, in which I've embedded a fake executable, then before launching the executable, I extract it into a temporary file, build my command line and then launch it. That worked ok for me.
I've just received the real executable, and then realised it was not a standalone executable, but a bunch of libraries, config files and such. It comes also with a script to execute in order to set env variables.
The only option I am seeing now is to extract the whole bunch to a temp directory, set the environment variables according to the script, and then call my executable.
Is my solution valid ? Do you think of a better way to do it ?
Don't package the plugin as a jar, instead just use a directory so you don't have to do any unpacking.
You specify this using
Eclipse-BundleShape: dir
in the plugin MANIFEST.MF.
Note: if you package your plugins in a feature then this setting is overridden by the unpack="true" attribute of the plugin element in the feature.xml file.

trouble creating an axis 2 .aar file: xml/services not found error

I am trying to create an aar file using OSX 10.7.5 (as a part of this tutorial). To generate the .aar, I navigate to the directory holding my webservice in my eclipse workspace and type
jar cvf FirstWebService.aar ./*
This is the command that Apache says to use to generate the aar in their Code Listing 9 from the apache axis 2 documentation.
The command creates an.aar -- but something is wrong with the process that I am using to create the .aar because when I go to load the .aar file into tomcat's /webapps I get an .xml/services not found error.
I am not sure what to do to fix this error. If I search my computer's file system for the services.xml file, I can find it in /path to eclipse workspace/workspace/MyFirstWebService/WebContent/WEB-INF/services/FirstWebService/META-INF
but I am not sure if this file is supposed to be rolled in to the .aar file somehow or if I can just manually plunk this file somewhere into the apache directory structure to get the thing to run.
Note: I do not think I am manually unzipping or unpacking the aar like in this question. Axis2 web service error: services.xml not found I am just running the command listed above from the apache documentation.
Here is the .aar file
note I am using all of the same versions of the software as in the tutorial -- but I am using OSX 10.7.5 where they use windows in the tutorial. Accordingly, I have changed the make-aar command for windows shown in the tutorial (jar cvf FirstWebService.aar com META-INF) into the one shown above. If I just try to run the command from the tutorial jar cvf FirstWebService.aar com META-INF I get the same xml/services not found error. It gives this output in the terminal...
com: no such file or directory
META-INF: no such file or directory
added manifest
I found the issue. When you type the command to create the aar file you have to be in the directory .../EclipseWorkspace/EclipseProjectName/WebContent/WEB-INF/services. This directory contains /META-INF/services.xml. The process that makes the .aar file must be looking in this folder.

Why does my pyinstaller created executable require admin privileges?

I've written a Python program which I distribute using pyinstaller. I've been using the onefile option so far to create a standalone executable. That's been great up until now, but as the application has grown the startup time is getting a bit long. I'd also like users to install the application properly to make upgrading simpler.
I've been trying to create a single directory version of the app using pyinstaller's onedir option. However, the resulting .exe file that is created requires admin privileges to run, which the onefile version did not. The program itself doesn't need any such privileges so I assume this is something that pyinstaller is doing. How do I create an application that doesn't require admin privileges?
Additional info:
Python 2.6, pyinstaller v1.4
Application uses PyQt4 and pygame modules.
Trying to create executable for Windows 7.
Using -w pyinstaller option to create a windowless executable.
admin privileges could be asked in few cases:
A. if the executable name contains relevant keywords (like setup, install, update or patch)
B. the application requests it in it's manifest.
C. the .exe file name do not match the name in the manifest file.
if you create a .spec file for your application package, you can add
exe = EXE(
...
manifest=None,
...
)
and it won't ask for password, unless you rename it to setup or install.
I have recently run into this issue, and my experience in solving it was thus:
PyInstaller with --onefile option creates a manifest file in the 'executable'. This manifest file on Windows tells the OS a few things about the application it is bundled with. One of the things it specifies, is the application name/manifest file. The format of the manifest filename is appname.exe.manifest. If your program is frozen with PyInstaller, the executable name that it stores in the manifest will be the name given to the completed EXE under the /dist folder of PyInstaller. IF you rename the EXE, the manifest file packed with it is no longer matching! Therefore, create a manifest file with the same name as the final EXE filename and run PyInstaller with the --manifest option, OR don't rename the EXE that PyInstaller creates.
When you package the PyInstaller project with the custom --manifest, the renamed program no longer requests administrator elevation.

Eclipse Helios fails to load toy plugin

I am trying to install a toy plugin that I wrote in Eclipse Helios 20100617-1415 under Fedora 12. Attempts at installing the plugin have all failed. The plugin does actually run when executed as an Eclipse Application (another copy of Eclipse is loaded and the plugin appears on the menu and does what it's supposed to). I put the jar file for the plugin in the /dropins/plugins directory and after several reboots Eclipse fails to load it and seems to not generate any error messages either. I also tried to load it directly using the Install New Software UI and that failed (added a directory where the toy plugin is and the response is: a dialog box pops up: No software site found at DIR_NAME. Do you wish to edit the location? At the same time in the name list area box behind the popup it says: Could not find file:DIR_NAME (the directory is valid and the jar file is there) - the other attempts are to load the jar file directly selecting archive instead of local in the Add Repository dialog - that too fails: first the jar name is mangled somewhat to jar:file:/DIR_NAME/TOY_NAME.jar!/ and then the same error messages come up already mentioned for just trying to use the directory location). So the installation mechanism is a complete failure but - how can I get it working? (Yes I can install plugins from the Eclipse marketPlace and other repositories). Thanks!
There are several ways to install your plug-in,
put your plug-ins into "dropins" folder if your eclipse enables polling that folder. The structure should look like below,
-dropins
-cdt
-features
-plugins
-myplugin_1.0.0.jar
export your plug-ins to your eclipse via menu 'File' - 'Export' - 'Plug-in development' - 'Deploy plug-ins and fragments' - 'Install to'

Resources