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?
Related
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.
We are facing an issue with the Maven build. We have setup proxy in eclipse, got maven installed and all the required settings completed. But everytime we try to build it we are getting following exception:
Project build error: Unresolveable build extension: Plugin org.sonatype.plugins:nexus-staging-maven-plugin:1.4.8 or one of its dependencies could not be resolved: The following artifacts could not be resolved
Cannot access nexus in offline mode and the artifact org.sonatype.plugins:nexus-staging-maven-plugin:jar:1.4.8 has not been downloaded from it before.
We have set all the dependencies. One of the dependencies shows an message:
Offline / Missing artifact com.xxxxx.xxxx:jar:0.0.2-SNAPSHOT
Why do we get this issue and how to resolve it?
I've had a similar problem after changing from eclipse to intelliJ.
The message told me, that i was in offline mode like yours and i found a solution:
Go to the general settings
-> Build, Execution, Deployment
-> Build Tools
-> Maven
Here the checkbox "Work offline" was checked.
To fix the problem simply uncheck this box and you're fine.
I am using Gradle 1.12 to build an Android library. The build script works fine and the artifacts are installed to both a Maven local repository and deployed (using an S3 wagon Gradle plugin) to a remote Maven repository. When these artifacts are referenced by a Gradle (1.12) build of a sample app using the Maven local repo, all works fine. When the remote repository is used, a Gradle dependency resolution error is reported [details on the error will be provided later].
To get more information about the problem in order to fix my script or file a bug report, I would like to do some debugging of Gradle 1.12 while the sample app build script runs. Eclipse would seem to have the debugger of choice but configuring Eclipse is the subject of this post.
Following advice on the Gradle forums, it is straightforward to configure Gradle startup options to suspend on startup and await a connection from a client debugger (Eclipse).
Configuring Eclipse to do this is proving difficult. At first glance, it would seem that one needs a Gradle plugin. Spring Source provides a recommended one. But this plugin appears to bury and use Gradle 1.10. Perhaps upgrading this plugin to use 1.12 is easy and an answer that details how to do this would be a great answer.
The critical pieces of the answer I am looking for will enable me to place breakpoints in Gradle classes and step through source code until I either find a bug or figure out what I might be doing incorrectly in my build script.
Alternative approaches, such as using Intellij or Android Studio would be good answers as well if accompanied by details and/or references that make it clear how to enable the Gradle debugging process.
Debugging Gradle works exactly the same as (remotely) debugging any other Java application. No Gradle plugin is needed for this. In a nutshell, you need to start a remote debugging session from an Eclipse project that has Gradle sources. One way to create such a project is to clone the Gradle GitHub repository and run gradlew eclipse.
I use m2eclipse to integrate Eclipse (Indigo) and Maven. I also use a proxy, so I have a Settings.xml with the correct host and port. I've configured the LAN Settings of the OS too, so Eclipse is configured in the same way (Native mode). Finally, I have put an external maven as the Eclipse installation (Maven 2.2.1) .
Once I did that, I import from Eclipse a Maven project. When I do "mvn install" the artifacts are downloaded, and I get the "Build Succesfull". However, the project marks an error.
The error type is different if is a project with dependencies (pom dependencies) or a simple project. For example, in a simple project the error is "Could not calculate build plan: connection timed out". In a complex project doesn't read some artifacts, which are in the repository.
I think the problem is the plugin and the proxy because in the console appears when eclipse starts, "Unable to update index for central http://repo1.maven.org/maven2/".
Any idea?
Thank you for your help
Ángel
Since your build is working fine I believe your setting.xml is maven installation folder is working fine.
So try to change the maven setting in eclipse as shown below and refer the same setting.xml that is there in the maven folder configuration.
Not a very helpful answer, but I ran into the same problem.
m2eclipse didn't seem to handle proxies (either eclipse or .settings) very well.
My workaround at the time was to always have a command line handy to pull in new dependencies.
I had the same problem with the Maven error: Could not calculate build plan: connection timed out
What finally fixed it was a complete Clean and Rebuild:
Project > Clean...
(x) Clean all projects
(x) Build the entire workspace
I have a very large workspace with about 30 projects all together. I am using Eclipse 3.5 with m2eclipse. I check out of my subversion repository using the defaults in order to import the projects into my workspace.
I create a Tomcat server instance, and publish my web project to the tomcat server. Sounds easy enough.
The problem is that it does not appear as though the transitive dependencies for my other projects are being automatically added to the container, so when the container starts up I get classnotfound exceptions, etc.
I go into the web project's properties, and I notice that the Java EE Module Dependencies are NOT checked for some of the transitive dependencies. I check them, and everything seemingly works until I do a project clean build, when the Java EE Module Dependencies are automatically reset by eclipse, so I need to recheck them. This is maddening, and I was hoping there was some way to automatically pull in all of the transitive dependencies when working with Eclipse WTP.
I should mention, using standard maven build works just fine, and everything gets pulled in appropriately into the resulting WAR file. It just doesn't work so good with WTP for some reason.
You need to make sure that you have "Maven integration for WTP" feature from m2eclipse installed. There is a simple tutorial available at http://docs.sonatype.org/display/M2ECLIPSE/WTP+mini+howto
What version of WTP and m2eclipse you are using? Check that dependency version declared in project's pom.xml matches with version declared in workspace project and make sure that workspace dependency resolution is enabled.
Also, you can try to run "Maven / Update project configuration" from the project popup menu and check that there is no errors on Maven console and in Eclipse's own log.
If the above won't help, try to reproduce issue on a smaller project and then submit it with a bug report
It appears as though the latest version of m2eclipse (.99x) solves all of my issues.
If you are tempted to use m2eclipse wtp extras you need to be aware that they are not supported by Sonatype and, although mostly OK, are not 100% robust.
See http://maven.40175.n5.nabble.com/What-is-the-recommended-alternative-to-m2eclipse-extras-WTP-integration-td135727.html