m2e will not run on server [duplicate] - maven

I'm trying out the next version of Eclipse using the latest milestone build and I'm having an issue getting my Maven project deployed to Tomcat.
Previously in Eclipse 3.6, my project was automatically enabled as a web project when checked out from SVN. I've checked out my project in 3.7 but get nothing indicating it's runnable as a web project (e.g. trying to run the project doesn't give me the usual "Run on Server" option).
What I've installed is Indigo RC4 "Eclipse IDE for Java EE Developers" version. I then added the latest M2E milestone from here. This enabled me to get up and running, check out my project and I seem to be able to build the project fine (which does create my .war file for remote deployment). Still no "Run On Server" options though.
Does anyone have any clues on what I could be missing? I'm guessing it's a Maven & WTP integration plugin but I haven't spotted the right one yet.

Before m2e became an eclipse project the WTP integration shipped with the core module. Now the core module is an eclipse module and the WTP integration is shipped separately. The current Indigo snapshots of m2eclipse-wtp can be found here. I was unable to get any artifacts from this update site however, even though it's listed in the corresponding JIRA issue.
Fortunately, today m2e-wtp was made available through the m2e Marketplace. Just open the eclipse preferences, go to 'Maven' -> 'Discovery' -> 'Open Catalog' and install it. .

It will work with the lastet version, it's just the .project that is not right.
Simply go into the project properties, make the projet faceted.. tick Dynamic Web Module and you'll get run on server as an option after that.
This will enable the "Run on Server" option, however your problems don't finish there as when you then run it, you'll get a 404.
To fix this, go back into project properties, Deployment assembly.
Delete the WebContent entry (and you can delete the folder in the project later too), and make sure you have the src-main-webapp & src-main-resource folders added.
Bingo.. run the app and it should be fine.

Related

Android Studio Gradle offline Gradle Cache

Android Studio Version 3.1.3
Issue:
Gradle wants to re-download dependencies that were previously downloaded
For instance: "No cached version of com.android.support:appcompat-v7:27.1.1 available for offline mode."
It doesn't matter which version I use, it refuses to accept the ones located at "/~.gradle/caches/transforms-1/files-1.1/"
I have specified gradle service directory path (where the downloaded dependencies are) and ticked the "Offline work" option. I've tried using the default gradle distribution and a local gradle distribution "gradle-4.8.1-bin".
Am I missing something?
Does that mean that gradle only uses per-project cache? Do I have to download dependencies every time that I create a new project?
If so, is that a way to use the already downloaded dependencies?
Also, may I ask why does Android Studio has a tick option to "Work offline"? What is it used for?

Visual Studio : build not referenced plugin project

I'm working on a WPF application that loads plugin assemblies on runtime.
My solution contains the host app (wpf app set as startup project) and the plugin as another project (class library).
The plugin project references the host app.
My problem is that since the host app doesn't reference the plugin project, the plugin project is not built when I click "Start" and I need to manually build it each time I modify it before I start the host app.
In the "Project dependencies" of my solution, I cannot add my plugin project to the dependencies of my host app since VS says it would create a circular reference (it wouldn't since my host app doesn't really need the plugin to compile or work).
Is there a way to tell VS I want the plugin project built when I click Start (if the plugin project is out of date), even if it's not a real reference ?
Thanks,
Regards.

Netbeans project specific settings resetting

I am having a problem with my project specific settings resetting while I am working.
I am trying to configure my project to use the IDE wide formatting configurations, but after a small while the settings for the project are reset to use the default project specific settings.
I assume this is related to automatic build in the background doing something that is removing the project configuration file but I haven't found out anything more related to that.
Other points to note:
The project is huge
The project is maven configured
I am the only one working in netbeans that I am aware of
The Project has a parent maven project which I also have open in the IDE
The Project is in a Git repository which I believe I have set up to ignore Netbeans config files.

Mavenizing Mule project from gradle

I am trying to move my Mule ESB project from gradle to maven due to test case issues. I understand I need to remove the .gradle file from the project and when I click on mavenize , nothing happens in Anypoint studio. Any suggestions ?
To mavenize your project you may use Eclipse because this IDE is best suitable with Maven. You'll need to download eclipse, and then add mule support in it. Follow this tutorial to do the same. After that import your project in eclipse and mavenize it. You make take help from this example by David Dossot, to configure a mule project with maven.
If you have AnyPoint Studio, you can create a Mule application and it will already be set up for use with Maven. I would then bring my application artifacts into the newly created project. This way you start with a fresh project that's set up correctly for Maven. Also, you will learn more about things by bring in your mule config, app properties, deploy properties, java classes, and tests into a correctly formatted project structure. You will leave any Gradle artifacts behind. I don't know what button you are clicking called "Mavenize" but Anypoint Studio will allow you to create a shell project that works with Maven. Just create a Mule Application project and copy/paste in the pieces from your existing application. Don't use Eclipse to set up a Maven Mule application project. That's backing up and not utilizing what's available to you.

Use XspLibrary (OSGI plugin) in Domino Designer

I've build an osgi plug-in to wrap existing jar files. I've been following this guide.
After building the plug-in I deploy it via an update site. I use a widget to import the plug-in into the domino designer.
In "File > Application > Application Management" I can verify that
the plug-in is loaded (i.e. it shows up under
/workspace/applications/eclipse)
Now I build a new nsf and I can select my plug-in as a Xsp library in the xsp properties. Then it starts to act strange: I can use all exported classes from the plug-in only if I open then plug-in project in the domino designer, too.
If I close the plug-in project I get two compile errors:
"StringUtils cannot be resolved"
"The import org.apache.commons.lang3 cannot be resolved"
Sometimes I also get the following error:
"The project was not build since the build path is incomplete. Cannot find the class file for ...."
Does anybody now why these errors occur? As I already mentioned: opening the plug-in project in the designer resolves all errors.
Yours
Detlef
You need to have the plugin 'unpack' after installation, at the moment your wrapped jars are hiding within your plugin jar. they need to be unpacked for Domino Designer to use them.
Presumably you created a feature project to install the plugin? Go back to the feature project, and the Plug-ins list, select the plugin and then tick the check-box next to 'Unpack the plug-in archive after the installation'
In your update site, clear out your previously built plugins and features and then re-build this new feature into the update site.
Before installing the new version of the feature it might be a good idea to Uninstall your old version in designer:
File -> Application -> Application Management
Then select the feature in the left pane, and then uninstall from the available tasks in the right pane.
Then re-install from your newly built update site, (or via widget deployment as you did before)
After your installation you can inspect the file system location of where your plugins install to:
<NotesData>/workspace/applications/eclipse/plugins
and verify that the plugin has been un-jarred into a folder instead of being just a jar.
Also, in the Package explorer, if you then open up your XPages application that is using your XspLibrary/Plugin, you should be able to see your plugin in the list of plug-in dependancies, and the icon next to your plugin should be a folder and not a 'jar' icon
Both errors mean that you need to install a dependency of xsplibrary namely apache commons lang 3.x. It is available as an OSGi bundle so you can simply add it to the target platform.

Resources