Product Publisher Application (org.eclipse.equinox.p2.publisher.ProductPublisher) - eclipse

I have an eclipse bundle with an application and product configuration file (myproduct.product). When I export the product I get executable that I can run just fine.
But how do I export this .product file from a java application? I have looked at the example at the bottom of this page:
http://wiki.eclipse.org/Equinox/p2/Publisher
but I don't see how its possible to specify the .product file as input. There are also some ant-scripts on the above link but it could be nice to keep the publish in pure java. Any ideas?

I think you probably miss something when you read the twiki page. It already has given a sample to demonstrate how to publish a product in command line. Product Publisher
Note: the product publisher doesn't publish the features/plug-ins that constitute the product, so you have to call FeatureBundle publisher to export features and plug-ins.

Related

Acceleo - 'package with uri "*" not found' when using a custom profile

I have a custom UML profile "cml" and a UML/SysML model. The model uses some stereotypes from the profile.
When I try to run Acceleo on the model with a run configuration I get the error:
Package with uri 'http:///schemas/cml/_8uQ2IDRKEe2sA6YbWhD_tQ/10' not found.
I tried converting the profile to a plugin and it works and is recognized as a registered package when creating a new UML model, but not with Acceleo.
The only solution I've seen mentioned is to manually register the package in registerPackages():
I don't think this is necessary since everything is right here in the workspace
I tried converting the .uml file to .ecore to get a .genmodel but I get too many warnings and errors when the UML profile elements are converted to ecore
I assume this will also lead to loss of information when converting from UML to Ecore
If I have a single monolithic model everything works fine. As soon as I use a profile I can't get past the package not found issue. What else can I do?

I want to export my whole code base like a package or something like a module that I can import

I created an app for a small group of people. I created a lot of widgets/pages and models. Now another group asked if I could make them the app too. I could create a new project and copy/paste al stuff in there, but more groups want this app, and its a lot of work.
My idea was to create something like a package or export the whole code base to another destination, so that I only need to edit one code base and it changes on all app instances. For the new group I only need to change the API URL and some images which can be changed in pub spec.yaml and main.dart. Do you have a working solution for this?
Please read those articles about creating new package:
Flutter Website: link
Tutorial: link
Also, Pay attention to what is the supported platforms in you package and test it with each platform. You can also publish it to Pub.Dev if you want. but must be on GitHub first.

Couldn't find a related Android.mk template on android source tree

I am reading the android platform-build docs with gnu makefile(Android.mk) from https://android.googlesource.com/platform/build/+/master/core/build-system.html.
Now I met an issue I didn't find a related template example?
<h3><a name="templates"/>How to add another component to the build - Android.mk templates</h3>
<p>You have a new library, a new app, or a new executable. For each of the
common types of modules, there is a corresponding file in the templates
directory. It will usually be enough to copy one of these, and fill in your
own values. Some of the more esoteric values are not included in the
templates, but are instead just documented here, as is the documentation
on using custom tools to generate files.</p>
<p>Mostly, you can just look for the TODO comments in the templates and do
what it says. Please remember to delete the TODO comments when you're done
to keep the files clean. The templates have minimal documentation in them,
because they're going to be copied, and when that gets stale, the copies just
won't get updated. So read on...</p>
<h4>Apps</h4>
<p>Use the <code>templates/apps</code> file.</p>
<p>This template is pretty self-explanitory. See the variables below for more
details.</p>
As sections mentioned above I assume there are somethings named 'templates' directory for
a library, apps ... But I couldn't find that in android source tree.
Could anyone enlighten me?
The examples are not located in a templates subfolder, but in the same directory as build-system.html:
binary.mk, shared_library.mk, java_library.mk, and many more.
Note: Android is switching from the Makefile-based build system to Soong. You might want to consider switching, too.

How to access per project / per preset configuration data in vue-cli 3.x?

I'm looking to create a vue-cli 3.x plugin that generates extra files in the project when invoked and templates these based on configuration info entered by the user.
It's rather easy to collect this information from user prompts but it'd be much nicer if users could put this info into some sort of configuration file and have the plugin read it from there.
I understand vue-cli now uses a vue.config.js file on the project level and ~/.vuerc on a more global (preset) level. However, it doesn't look like my generator function would have access to either one of those files.
"The entire preset" should be passed as the third argument to the function when invoking the plugin with module.exports = (api, options, rootOptions) => {} in ./generator/index.js, rootOptions is undefined.
Sililarly, the use of vue.config.js is discussed in the documentation when talking about service plugins, but there's no mention how to use it in a generator function.
Am I missing something obvious here or is there really no officially sanctioned way to do this? Nothing stops me from reading vue.config.js in my function, but this feels hacky. And I wouldn't even know how to find out which preset was used to create the project.
So your problem is that you can't find ~/.vuerc?
I had the same issue and I found the solution here.
The solution is to use the command line
vue config
to see .vuerc, and then use
vue config --delete presets.yourPresetName
to delete your preset.
As well, if you can't type in your preset name in the terminal because it contains a space or an apostrophe, you can use
vue config --edit
to open .vuerc with a text editor and just edit it there

SVG error in my j2me NetBeans6.5 project

I use svgForms, svgMenus and svgSplashScreen, but one annoying error always appears in the pre verification (last) step, which is the following:
Error preverifying class org.w3c.dom.svg.SVGElement
java/lang/NoClassDefFoundError: org/w3c/dom/Element
It seems like it needs a library to be added, but I have hit the wall here. My svg files are all of baseProfile='tiny'.
Thanks in advance :)
You need stubs for JSR226 on the preverifier class-path. The file is usually called jsr226_1.1.jar.
Once you specify what tools exaxtly are you using to build the application I could be able to help more.
In your project properties, select "Platform", then look into the "Optional Packages" area.
From there, you can then select the SVG API to add the missing component.