Problems moving move Anypoint Studio 7.4 to 7.9? - mule-studio

Are there any know issues when upgrading to Studio 7.9 regarding third party connectors?
After importing / opening my projects all external connectors (SAP & Salesforce) fail to be imported:
Resolving dependency com.sap.conn.jco:com.sap.conn.jco.sapjco3 found the following exceptions:
org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at com.sap.conn.jco:libsapjco3:so:external-library:3.x.x
Same for Salesforce:
Resolving dependency com.mulesoft.connectors:mule-salesforce-connector found the following exceptions:
org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at com.mulesoft.connectors:mule-salesforce-connector:jar:mule-plugin:9.4.0 -> com.sun.xml.ws:jaxws-rt:jar:2.2.10
...
Update:
I think it's an Maven issue, e.g. in the old POM-file the url for the anypoint repository is "https://maven.eu1.anypoint.mulesoft.com/api/v1/maven" whereas if I create a new project in 7.9 it is "https://maven.eu1.anypoint.mulesoft.com/api/v2/maven"
Also in the studio settings it is maven 3.3.9 VS 3.6.3 in the new.
So, should I have done a kind of pom-conversion? Or manually downgrade the maven version?

Probably a Maven issue from having a new machine. If you have a new $HOME/.m2 directory, you are losing manually added dependencies (the SAP ones?) and your customized Maven settings.xml inside that directory.
If you don't have MuleSoft enterprise repositories configured follow the instructions on the documentation: https://docs.mulesoft.com/mule-runtime/3.9/configuring-maven-to-work-with-mule-esb#referencing-mulesofts-enterprise-repositories
If you had any manually added dependencies into your local Maven repository of the old computer, you will need to install them again in the new computer.

Related

Install Glassfish On Eclipse showing Error No repository found

when i am trying to install the glassfish on Eclips i am facing two issues:
1- I can not find it when i click on create new server under oracle folder ..
2- when i am trying to install the glassfish tool from the market it gives me a message that says No repository
3- when even going to add the link manually under available software. it gives me the same error No Repository Found
I am Using Eclipse Version: 2021-12 (4.22.0)
JDK : 16
JRE :jre1.8.0_311
what could be the issue?
For those who don't want to try to type the above:
Oracle Enterprise Pack for Eclipse 12.2.1.8 Dependences - http://download.oracle.com/otn_software/oepe/12.2.1.8/oxygen/repository/dependencies/
The Glassfish Tools project and it's dependency Eclipse Sapphire have been both archived, but the repos should be working anyway. Glassfish Tools repo is not working though, but both projects have been bundled in Oracle Enterprise Pack for Eclipse, which has it's own repo available by default in eclipse 21-12 (and many more versions before that one).
Go to Help -> Install new software and find the repo as shown in the image.

Tycho Maven Offline Build

We are building our Eclipse RCP application using Maven/Tycho. Inside eclipse everything works as expected with
clean install
However, as our build server is a virtual machine without internet connection, this won't work. We run
clean install --offline
on it but it keeps saying:
The POM for org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0 is missing, no dependency information available
[ERROR] Some problems were encountered while processing the POMs:
Unresolveable build extension: Plugin org.eclipse.tycho:tycho-maven-plugin:0.25.0 or one of its dependencies could not be resolved:
The following artifacts could not be resolved: org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0, org.codehaus.plexus:plexus-utils:jar:1.1:
Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0 has not been downloaded from it before.
Is it possible to have the tycho-maven-plugin available offline? We can provide the POMs as well, if you need it for answering.
Yes, Tycho does support --offline (at least since Tycho 0.25, which fixes Bug 461787). The error message you quote, however, indicates that Tycho itself was not downloaded completely by your initial mvn clean install.
Check that both org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0 and org.codehaus.plexus:plexus-utils:jar:1.1 (from the error message) are present in your local Maven repository, as Maven complains it can’t find them there. Did you clean your local repository in the meantime?

Issue Importing Maven (Atlassian JIRA Plugin) Project into Eclipse IDE

I am wanting to create a JIRA plugin with the Atlassian JIRA SDK. After creating the project I am encountering several errors when trying to import the project as a Maven project into the Eclipse IDE (Kepler)
Here are the steps that I am taking to produce the error...
In PowerShell I create the skeleton with the "atlas-create-jira-plugin" command.
After creating the plugin skeleton I run "atlas-mvn eclipse:eclipse"
In Eclipse I select Import > Existing Maven Projects then I choose my plugin.
At this point I receive the following errors ...
No marketplace entries found to handle maven-jira-plugin:4.2.20:compress-resources in Eclipse. Please see Help for more information.
No marketplace entries found to handle maven-jira-plugin:4.2.20:copy-bundled-dependencies in Eclipse
No marketplace entries found to handle maven-jira-plugin:4.2.20:copy-test-bundled-dependencies in Eclipse
No marketplace entries found to handle maven-jira-plugin:4.2.20:filter-plugin-descriptor in Eclipse
No marketplace entries found to handle maven-jira-plugin:4.2.20:filter-test-plugin-descriptor in Eclipse
No marketplace entries found to handle maven-jira-plugin:4.2.20:generate-manifest in Eclipse
No marketplace entries found to handle maven-jira-plugin:4.2.20:generate-rest-docs in Eclipse
No marketplace entries found to handle maven-jira-plugin:4.2.20:generate-test-manifest in Eclipse
I have tried to disable the Maven Nature, then run atlas-mvn eclipse:clean then convert back to a Maven project, but the errors come back when doing so. Any suggestions on how to fix this would be appreciated.
You probably need to update eclipse configuration for Maven (new version is Atlassian SDK 5.0.0):
https://developer.atlassian.com/display/DOCS/Set+Up+the+Eclipse+IDE+for+Windows#SetUptheEclipseIDEforWindows-Step4:InstalltheMavenEclipsePlugin
If you are using Atlassian SDK, you should use their maven wrapper which come together with the SDK installation.
You are seeing that problem in your Eclipse is because your local maven (which is used by your Eclipse, or maybe embedded maven) settings doesn't contain Atlassian info.
Do refer to this for how to add in the Atlassian repo into your settings.xml.
Or you can run the atlas-mvn install to download Atlassian library into your local repository.
Or for quick work-around, you can just point your Maven to the Atlassian settings.xml as below:
I switched from using Eclipse to IntelliJ. IntelliJ makes importing Maven projects incredibly simple. If anyone else encounters this problem, I suggest switching to IntelliJ.

How to build JGit in Eclipse (dependency errors)

I'm trying to build the latest version of JGit. I checked out the latest version from the Git repository. According to the build instructions, I installed the dependencies via Orbit. I then ran mvn clean install which was able to compile everything and run all the tests. So this was great, there were no errors, and I can find the compiled .jar files.
I then opened Eclipse and imported the projects into a working set. For some reason, there are numerous errors in the build process.
Imports cannot be resolved:
import org.apache.commons.compress.archivers.ArchiveOutputStream;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.commons.compress.archivers.tar.TarConstants;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
And more cannot be resolved:
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
I tried installing Jetty via Eclipse (Install New Software). However, that did not resolved the issue.
Am I just not supposed to build JGit in Eclipse? All builds and testing should be done with Maven? I'm also confused as to why Jetty and Apache are being imported in some of these subprojects for JGit and they're not listed as dependencies of JGit on the wiki.
Thanks in advance.
The easiest way to install the dependencies is to use one of the target platforms, as described in Use a Target Platform. It includes all dependencies.
As for installing from the Orbit P2 repository, the listing there was incomplete. You also need to install "Apache Commons Compress", see updated instructions:
http://wiki.eclipse.org/EGit/Contributor_Guide#Option_2:_Install_from_Orbit_P2_Repository
Jetty can not be installed from Orbit, see here for instructions:
http://wiki.eclipse.org/EGit/Contributor_Guide#JGit_HTTP_Tests
Or again, use the target platform where Jetty is also included.
The Jetty and Compress libraries are used by part of the JGit infra, but the EGit support in Eclipse doesn't need everything that JGit has.
For example, JGit also provides a collection of command-line programs (jgit init, jgit add etc.) which are not used in Eclipse. So you need to build the 'pgm' module from MAven, but that in itself isn't used by EGit which is the UI in Eclipse. Similarly, the JGit HTTP server is useful but not required for EGit operation.
I believe the archivers are used to extract out tools via the pgm module for 'jgit archive', which extracts out the contents of a branch and generates a Zip or TGZ file on the fly.
If you don't want (or need) the pgm module (and i'd suggest possibly also avoiding the iplog as well) then you can uncomment those from the list of modules in the pom.xml file. Removing the http.server (and http.test) along with the pgm modules will probably allow you to compile without needing the Jetty and Apache compress modules.

OSGi bundles dependency management in Eclipse

I have an OSGi bundle which is in Eclipse IDE represented as Eclipse Plug-in Project. The only way I found to satisfy the dependencies of this plug-in/bundle is to
1) import all dependencies (.jar files) through File > Import... > Plug-ins and Fragments wizard
2) and then declare the imported dependencies in MANIFEST.MF
Yes, this solution works, but on the other hand after I commit the changes to our repository all my team mates also have to manually import dependencies to Eclipse to fix the compilation errors.
QUESTION:
Is there a solution which does not require such irritating steps? I just want to pull the changes from repository and continue my work without need to fix the dependecies in MANIFEST.MF again and again...
P.S.: To retrieve dependencies we use Apache Ivy.
You need to set up a target platform in Eclipse. I find the easiest way is to put all the dependencies in a folder, and save the target platform as a .target file which I check into source control. Then the only steps my colleagues need to do is retrieve the dependencies and configure Eclipse to use the shared target definition. If we add new dependencies to the definition Eclipse will automatically pick up the changes with a restart or target platform refresh.
The Eclipse documentation should get you started: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.pde.doc.user/concepts/target.htm
If you develop server based applications then it is much better to let maven or Ivy manage the dependencies and use the maven bundle plugin to generate the Manifest. So you can avoid the Eclipse OSGi mode and the target platform. See http://www.liquid-reality.de/x/DIBZ for a tutorial how to develop OSGi bundles using maven and deploy on Apache Karaf. For Ivy you may have to use a slightly different build but the basics should be the same.