Unable to upload custom Plugin - plugins

I created a custom plugin to be uploaded on Google Cloud Data Fusion platform, which is based on CDAP platform.
I followed the instructions for developing and deploying plugins but the upload fails when I try to associate the corresponding Json configuration file (generated by IntelliJ itself through the CDAP Maven artifacts) with following error:
Artifact artifact:default.record-gen-source.1.0 extends artifacts 'system:cdap-data-streams[4.0.0,5.0.0)/system:cdap-data-pipeline[4.0.0,5.0.0)' that do not exist
If I remove the reference to parent artifacts the custom plugin is loaded but it doesn't appear neither as a batch plugin or as a stream plugin (I can understand this, I'm removing the parents references).
What could be the error?

The issue is the plugin you are trying to upload inherits from incorrect parent artifact versions(which in this case cdap-data-streams & cdap-data-pipeline). The version of these artifacts are based on the version that is available in your current Data Fusion instance (which I believe is 6.1). If the version of cdap-data-pipeline/cdap-data-streams artifact doesn't fall under the range specified then you will be seeing this error. If you edit the version range to be [4.0.0,7.0.0) it should work I believe.
Can you try updating the pom.xml if you are using cdap-maven-plugin plugin with updated version range Like here and rebuild & deploy?

Related

Error while trying to update p2 site with Buckminster

I am really new in buckminster.
I have just downloaded from our repository an Eclipse RCP project that needs a plugin update (placed in its Target Platform). We are currently using a remote target platform.
I have downloaded the remote target platform configuring its path in the targetplatform.source project, then I did the update and reload it checking the plugin's version. I have changed the version number in feature.xml on my targetplatform.feature project (that contains the buckminster.properties file).
The problem comes when I right-click on the targetplatform.feature project, select Buckminster > Invoke action... > site.p2. This just rise an error and the console shows the Buckminster log with the same error:
java.lang.IllegalArgumentException: case variants of key: awt.toolkit: case variants of key: awt.toolkit
Thanks in advance!
Best regards,
I finally had to stop using a remote target platform as I could not solve the Buckminster problem. The workaround described below covered my plugin update needs.
In order to have a control version system, the plugin update problem can be managed by having a repository manager (for example Nexus). Then you can simply upload a zip of your target platform with the updated plugins. Nevertheless, this forces the configuration to set the target platfom as local and therefore you need to download and unzip it previously.

Deployable JAR file from JB Plugin Repo does not contain my files, but the plugin runs correctly locally

Background
I am working on a simple plugin, and have already deployed to the Plugin Repository once before (successfully).
Since my last successful deployment, I found that I had a lot of issues with the IDE. After completely upgrading, and modifying my plugin's directory structure, I have been able to get the plugin to Run again.
Issue
tl;dr - I have an updated plugin in the JetBrain's Plugin Repository that does not work as intended, and I cannot update it correctly!
When I run the plugin, a second instance of the IDE comes up with my plugin working correctly. I edit my code and run the plugin again - the plugin runs smoothly and the updates are applied!!
With all of this, I decided to deploy my updated plugin to the Repository again. Once that was done, I decided to download the plugin and try it out myself; just to make sure things worked.
The issue is that nothing can be found in the plugin file!! Just the updated plugin.xml file and Manifest.mf file. The total size of the archive file is around 500bytes. I know a correct archive would have more files in it, and in my case, the file size should be around 6kb (based on my first successful archive file).
So how can my local IDE instance find the files correctly, but the deployment feature cannot? How does the deployment feature actually work? I get the feeling I have the structure wrong, eventhough the new IDE instance works perfectly
Plugin
GitHub
JetBrain's Plugin Repository
When you install the plugin, the version is shown as v1.1; however, that is not true, in reality. One of the easiest features to determine the actual version of the plugin is the Folded Text foreground color.
v1.0 - RED
v1.1 - YELLOW
Deployment
Preparing Plugin Module for Deployment + resulting plugin.jar file
Contents of plugin.jar
It seems possible that because of the restructuring an old ChroMATERIAL.xml file was left somewhere in the build output. Somehow this could end up in the plugin jar. An invocation of Build > Rebuild Project should fix this problem.
There could also be problems in the project or module configuration, but the project files are not included in the GitHub repository, so that cannot be checked.

Appengine endpoint client library creation in eclipse

I have a java based appengine endpoint project in eclipse.
When I generate client library using command line tool.
https://developers.google.com/appengine/docs/java/endpoints/endpoints_tool
I'm getting only source based jar file ('project_name_version'.java-1.18.0-rc-sources.jar). It does not work fine in Android Studio when I add as a Library.
How can I get class based jar client library (google-api-services-'project_name_verison'-1.18.0-rc.jar)?
I tried searching online but no luck yet.
You could always zip up the sources file and use them in Android Studio. However , note that in the build.gradle file, you will have to reference the other dependent JAR files + versions that will be needed by the sources that you have generated in Eclipse via the Generate Cloud Endpoint Library option.
Build your app engine back end with JRE 7. You can change this from windows->preferences->java->installed JREs. You'll find an Add button at the right side of the pane. For more detail refer this Tutorial
This will solve most of your problems.

Eclipse Client Project configuration for Google Cloud Endpoints

What is the recommended Eclipse (4.2) configuration for building a Google Cloud Endpoints Android Client Project?
Running Google -> Generate Cloud Endpoint Client Library yields a /libs within my Server project that contains:
commons-logging-1.1.1.jar
google-api-client-1.12.0-beta.jar
google-api-client-android-1.12.0-beta.jar
google-api-client-appengine-1.12.0-beta.jar
google-api-client-java6-1.12.0-beta.jar
google-http-client-1.12.0-beta.jar
google-http-client-android-1.12.0-beta.jar
google-http-client-appengine-1.12.0-beta.jar
google-http-client-gson-1.12.0-beta.jar
google-http-client-jackson-1.12.0-beta.jar
google-http-client-jackson2-1.12.0-beta.jar
google-oauth-client-1.12.0-beta.jar
google-oauth-client-appengine-1.12.0-beta.jar
google-oauth-client-java6-1.12.0-beta.jar
google-oauth-client-jetty-1.12.0-beta.jar
google-oauth-client-servlet-1.12.0-beta.jar
gson-2.1.jar
guava-jdk5-13.0.jar
httpclient-4.0.3.jar
httpcore-4.0.1.jar
jackson-core-2.0.5.jar
jackson-core-asl-1.9.9.jar
jdo2-api-2.3-eb.jar
jetty-6.1.26.jar
jetty-util-6.1.26.jar
jsr305-1.3.9.jar
transaction-api-1.1.jar
xpp3-1.1.4c.jar
Does my Client need to include all these .jar files? If I copy them all into the /libs folder of my Android Client Project and do Build Path -> Add, I get the errors:
Dx trouble processing "javax/xml/namespace/QName.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
and
Dx trouble processing "javax/transaction/HeuristicCommitException.class"
So I need to manually remove xpp3-1.1.4c.jar and transaction-api-1.1.jar from my Client /libs for a clean build.
Is this the "standard" way of building a Client project? How can I determine what are the required .jar libraries for building on Android? Can I configure Eclipse to dynamically import only this subset into my Client?
If I update my Endpoint classes within my Server project in the future and re-run Generate Cloud Endpoint Client Library, do I only need to copy the generated source code under /com/google/api/services to my Client project?
You only need these jars in your Android project:
google-api-client-1.12.0-beta.jar
google-api-client-android-1.12.0-beta.jar
google-http-client-1.12.0-beta.jar
google-http-client-android-1.12.0-beta.jar
google-http-client-gson-1.12.0-beta.jar
google-oauth-client-1.12.0-beta.jar
gson-2.1.jar
guava-jdk5-13.0.jar
jsr305-1.3.9.jar
The other dependencies are included for running the library within other environments.
In general, the dependencies are fixed between runs of generating the client library. However, the generator will use the newest version of the client library, so if that's upgraded in the background, the dependencies might need to be upgraded as well.

Use another plugin in own hudson plugin?

I'm developing my own hudson plugin and can not find a really comprehensive documentation.
How can I connect to the artifactory plugin to get a list of artifacts? The artifactory plugin is installed in hudson but I don't know how to instance it/connect to it from my own plugin.
My plugin deploys a specific version to our webstart server. This includes downloading the artifact from artifactory over HTTP, creating version.xml and *.jnlp file and uploading these three files to the webserver using SCP. For the configuration of this plugin, I need a list of all versions of a specific project from artifactory.
Thanks in advance.
If you'd like to use model and utility classes of another plugin, then it's simply a process of depending on that plugin (compile-wise) and making sure that the dependent plugin is installed so you can reference these classes at runtime.
If you'd like to use entities like builders, actions or wrappers, you'll probably need to use Hudson's facilities; I'm not so sure as to which facilities it has, but Jenkins' hudson.model.AbstractBuild and hudson.model.AbstractProject (and other) objects have methods like:
hudson.model.Actionable#getActions
AbstractProject#getPublishersList
That'll return those entities (assuming they're configured on the project in question).
Apart from that approach, there are a number of ways to solve your issue using Artifactory's REST API:
If the artifacts are contained in Artifactory within one location that's known to you, you can execute a file list query to reveal the contents of that directory.
If you'd like to fetch the produced artifacts of a specific Hudson build, and assuming that you use the Hudson plugin to deploy Build Info, you can request the Build Info object using the Build Info resource; utilizing the checksums of the produced artifacts listed in this object, you can perform artifact checksum queries to find out if and where these artifacts exist in Artifactory.
If you don't know the specific build name and number or the location, you can use any of the search facilities to locate artifacts based on different details; The GAVC or XPath searchers are most likely to help in your situation.