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
Related
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.
When i Use option of sts "install or deploy an artifcator in eclipse".it works properly but when i do it manually by using mvn install command and change the version in pom.xml.it deploys artifactory to local repository. but when i refered it in some other project its symbol is different from others.
in above image, OES-ClientCore:24.0.9 is deployed using maven command and i ma refering it in some other project.
and also not working properly.so just tell me the difference of option of sts for "install or deploy an artifcator in eclipse" and manually using command mvn install
mvn install will install the artifact in your local maven repository.
Use mvn deploy to deploy it to a remote repository to share it with other developers and projects
See also:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
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.
I'm transitioning from Eclipse to IntelliJ Idea and having some trouble getting my Maven Web project running as I'd like. In Eclipse, I ran it using mvn tomcat:run, which worked fine with JSP debugging. In IntelliJ, I created a run configuration to use this command, and it works, but JSP debugging doesn't work.
I tried to find info on getting JSP debugging to work on IntelliJ, and the only info I found involved setting up a Tomcat server in IntelliJ, not using Maven's tomcat with mvn tomcat:run. The problem is, I can't figure out how to do this without IntelliJ using it's own builder instead of building the project with Maven. I can add Maven goals like "mvn compile", but when I set it to deploy exploded war, and adds 'build myproject:war exploded artifact' to the build queue, which calls IntelliJ's builder.
IntelliJ's builder takes forever to build my project. I've never even let it finish. To be fair, the project is huge, but Maven builds to fairly quickly. Also, everyone in my company is using Maven to build it, so I need to use Maven as well.
Can anyone help me either get JSP debugging working using mvn tomcat:run, or on an Intellij managed Tomcat with the project built by Maven?
In IntelliJ you can easily debug a "remote" tomcat instance (one running in a different JVM than IntelliJ):
Run -> Edit Configuration -> "+" -> Tomcat Server -> Remote
That will create a new run configuration. Look at the information on the "Startup/Connection" tab for the parameters to add to the tomcat JVM. Mine are:
-Xdebug -Xrunjdwp:transport=dt_socket,address=57813,suspend=n,server=y
Finally, start tomcat by launching the required maven command. Then run the above run configuration (click debug button).
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..