Mirror API in Eclipse - java

I downloaded the glass-java-starter from github and followed all of the instructions on the glass developers site. I got it imported into Eclipse as a Maven existing project as instructed and I changed the oAuth file ID and Secret as specified. When I try to start the project or debug the project I am getting the following exception: Source not found for http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException. The instructions give a command line command for running the project, $ mvn jetty, but nothing for Eclipse. How do I debug this project with Eclipse?

You will need to use one of the maven plugins available for Eclipse to initiate the run:jetty goal.
There are a few available. One of them is Eclipse m2e.
Install the plugin
Create a new run configuration of type Maven Build
Specify a goal of jetty:run

Other solution would be:
set jetty debug port:
export MAVEN_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y'
then run jetty through maven command line
mvn jetty:jetty
After that use Eclipse remote debugger on port 4000.

The war file, product that mvn produce in this sample app is compatible with tomcat or any other standalone server, so just build a war to "webapp" directory of standalone tomcat or jetty or "deploy" directory of standalone JBoss.
Eclipse has plenty of plugins to run those in debug mode.

Related

how to configure Wildfly to deploy Maven project

I'm learning Maven with eclipse and a liitle bit confused on how to deployed it on a remote server.
Before using Maven I created a web project and exported it as ear file and copied to the server's deployment folder. With Maven do I follow the same step? Do I need to install maven at wildfly server by modify the configuration xml? Thx.
Use maven only to produce artifacts(jar, war, ear). I was in the same position a couple of years back and found a useful link to build a project as an ear with maven.
For the remaining tasks, I coded Shell script to move the artifact from /target directory to wildfly10 \standalone\deployments.
It could also be achieved without any script using symbolic links.Just cd to your \standalone\deployments directory and:
ln -s [ABSOULUTE-PATH-TO-YOUR-WAR/EAR-FILE] [NAME-OF-EAR]
That's it. If you are more interested in symbolic links you may read here

How to run this spring rest maven project in eclipse

i have found this web application on git hub based on spring mvc,ajax and restful web services and i have imported that project as existing maven project and ran as maven build by giving goal eclipse:eclipse and build was success too ,but i am not getting option to run on tomcat server ,my question is how do i run this project on tomcat?
here are the link to download this project
github link
blog link
mvn clean install should create a war file in the target folder which you can deploy to your favorite app server.
Or do you want to run Tomcat from within eclipse and deploy the app automatically?
This goal eclipse:eclipse -Dwtpversion=2.0 converts it to eclipse project
and its running now on tomcat.

Maven3: run plugin as root user

I use IntelliJ Idea for developing, and now i want to use maven project for WAR packaging and deploying to Glassfish4 server. After latest update of OSX (v.10.10.3), glassfish4 must be started from sudouser, so i have a question: How can i pass to maven that this plugin (glassfish:start-domain) must be running from root?
I try to run this command in terminal, but it doesn't help
sudo mvn glassfish:start-domain

Jar deployment in Netbeans - howto?

I've created Java app in Netbeans,
today I moved that app into Maven project,
I've created all dependencies in pom.xml, and application builds succesfuly and runs as before Maven migration.
However I have problem with deployment,
I was trying to use that Deployment of artifacts with FTP (Maven Deploy Plugin) but after inserting Netbeans project is broken.
My questions are:
What is easiest way to copy jar and maven files to some server by ftp or scp after pressing F6 in Netbeans (build button),
also how to run that app? before Maven I was using WinSCP to copy jar file, I've copied also lib directory with dependencies and I was using:
java -jar app.jar
Can Maven on remote host use java7 not system java?
I have jdk7u4 untarred on server, and I'm using that to run my application.
Can maven invoked by command line be handled by system java, but run application from java7 or I have to have only java7 in PATH?
Can Maven be bundled to single jar so I can run:
maven app.jar PARAM1 PARAM2..

How do I run Google Web Toolkit applications from the command line?

At the moment I'm running the demo StockWatcher in Eclipse. This uses the embedded servlet container which is fine for my purposes. The only change I would like to make is running from the command line instead of inside Eclipse. Does anyone know what command I use and what classpath this requires?
Edit - I have not used maven I have created the project purely using eclipse and gwt plugin
If you used the webAppCreator wizard (I see that you used the Eclipse plugin, but maybe both of them used the same code internally), you should have an ant script (build.xml) generated for you. With it you can run the GWT app via targets so:
ant hosted - run hosted mode (or Development mode, I'm looking at a fairly old ant script)
ant gwtc - compile to JS
ant war, ant build, etc.
See what's in that file (build.xml) to get a better understanding of what is available and what you can do.
Update: see here for documentation on webAppCreator and available ant targets.
With the maven jetty plugin you can run your application with jetty from command line. (You first have to compile & create war with maven gwt plugin I think)
mvn jetty:run
maven gwt plugin
maven jetty plugin
Did you use Maven for this project? If that, then you can run it as mvn gwt:run from command line

Categories