I am new to eclipse and spring maven projects, I want to auto upload files whenever changes are made to it. I am using google app engine, I want to upload files on google app engine, like in netbeans, it sync file with server whenever changes are made.
Please Help.
Thanks
The new Cloud Tools for Eclipse doesn't support this directly. And to be honest, it's not an approach I'd recommend: it's better to launch and debug it locally (Debug As > App Engine Standard) and then use Deploy to deploy your working version.
That said, providing you use an external build tool like Maven, you could add your own builder to build and deploy your war on each build. To do so:
Right-click on your project and select Properties
Navigate to the Builders tab.
Select New… and select the Program configuration type
In the Edit Configuration dialog:
the Location is the path to your program (mvn)
the Working Directory would be the location of your project; use the Browse Workspace… button to select your project
the Arguments will be package appengine:deploy
Then switch to the Build Options tab and you'll like wan to add During auto builds too, to cause the action to happen on save.
All of this assumes your pom.xml is properly configured. See the Maven and App Engine Plugin page for details. You could use Gradle too with the same approach.
Related
I am new to IntelliJ Community edition. Can anyone help me with creating spring boot project in intelliJ Community edition. For ultimate edition there is spring-boot initializer but I cannot find anything for community edition. I followed this links but cannot find any solutions
"Create Spring Boot Project with IntelliJ Community (FREE) Edition in 5 mins"
"Getting Started with SpringBoot in Intellij IDEA Community Edition"
You can install a plugin called Spring Assistant:
Now you can use the initializer as:
Personally, however, I use Spring initializer at start.spring.io
EDIT: Adding run configuration
Select Edit Configuration from the Run menu
Now in the dialog box, lick on the + button and select Application.
Now you just need to provide the name of the main class. You could click on the browse button(...) to get a list of files having main(...).
If you have done your spring project with SPRING IO
Then You can import it as maven project and follow this steps to import spring project
Open IntelliJ IDEA
You can see Welcome screen, click Import Project.
The Select File
Navigate to your Maven project and select
Click OK.
Pretty simple, as both link you attached say you created your project with Spring Initializr, and if it is a maven project, then follow these steps mentioned below:
click on File option
click Open option
navigate to your project and choose pom.xml file [it not a maven project, choose your configuration.xml file, if something else, just select the project folder]
press Ok. And you are done
now, open idea terminal and run mvn clean install(I assume you have installed maven) or, just select project->right click->choose maven-> click on Reimport maven option. Now run mvn clean build All are set now.
You can follow these steps.
Click on Add / Edit configuration
Then select configuration type as application.
Fill in appropriate details.
Note: In place of <no module> add directory / module in which the entry class is present.
Save the configuration and click on Run / Debug symbol shown in first screenshot.
Extending #Prashant's answer
If you are not able to find Spring Assistant plugin within IntelliJ Community Edition, Go to Plugin's website and then click on GET button, Choose Compatibility with IntelliJ IDEA Community and then click Download.
The rest of the procedure remains the same as described by #Prashant.
Also if you want to change your Port, then select Modify Options and select Add VM Options, and paste
-Dserver.port=8090
in that VM Options textbox and then run the application.
Just go to the below mentioned:
https://start.spring.io/
Fill the information regarding Project(Maven, Java, spring-version(Select version only
have digits(for eg:2.6.2))). Don't select "snapshot" version.
Fill project Metadata information and click on Generate file. It will create jar file. Unzip it and open your IntelliJ and select "Open->select this Unzip folder and select "pom.xml" file inside this package and open as project.
Apart from the spring initialiser, in my experience no where else do you need an ultimate edition to work with spring boot, you can use Spring Intialiser
But there is a plugin as rightly mentioned by other Spring assistant which you can download from the plugin section which you can access from setting inside intellJ Idea.
For configuration instead of actually going in the edit configuration option of intellJ Idea you can just run the application and that would automatically have your configuration loaded and there onwards you can always use it.
I am currently trying the AWS tutorial here https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/deploying-a-sample-skill-as-a-web-service#h3_deployEB
Afaik I did all the steps before correct, but if I try the step two: "In the Eclipse Project Explorer, right-click the project and click Amazon Web Services then Deploy to AWS Elastic Beanstalk."
There is no option Deploy to AWS Elastic Beanstalk, I only have the options Run function on AWS Lambda and Upload function to AWS lambda.
Any ideas what is missing here? The Maven project compiles fine and I already have the warfile.
May be a bug but it works like this:
When I right click one of my ".jar" projects, I cannot see the option:
Bu when I right click one of my "war" (maven web app) projects I can see the deployment option:
Maybe you should deploy a war file?
Edit: Maybe you must try after building the project? The plugin is maybe searching for the appropriate file type (.war) to deploy.
I'm starting a GWT project with web creator as following:
C:\>webAppCreator -noant -maven -overwrite -out MavenTest com.raphiki.MavenTest
It generates a Maven project's structure with an GWT Hello world project, I import this project in Eclipse as a Maven project with existing sources.
Then I enable Google Web Toolkit in my project, and I need to give a WAR path. I try with the /src/main/webapp which contains the entry point, but when I launch the app I get a ClassNotFoundException on Hello world's class's package.
See the following image which is the structure the WebAppCreator built:
Did I miss any configuration to do?
See http://web.archive.org/web/20130619170526/https://developers.google.com/eclipse/docs/faq#gwt_with_maven
TL;DR: run mvn package (or mvn war:exploded), then run DevMode, choose target/myapp-1.0-SNAPSHOT/ as webapp directory.
I can't speak for the webAppCreator because I haven't used it, but I have had good luck creating the Maven projects in Eclipse using the gwt-maven-plugin from codehause.
Creating a Maven GWT Project Directy in Eclipse
Open the new project wizard in Eclipse and filter on Maven Project.
Select the Maven Project and click next.
Enter the project location of your preference and click next.
Enter "gwt-" into the archetype filter and select the gwt-maven-plugin from codehaus. Click Next.
Enter your maven project details and a module value, then click Finish.
This will create a maven - gwt project for you in Eclipse. This comes with a sample application that you can use to make sure you can launch the application correctly.
Running the Application Command Line
Open command line.
Navigate to your project home.
Run the command "mvn clean package".
Run the command "mvn gwt:run"
This should get you up and running. If you used the 2.7.0 gwt-maven-plugin this should run the application in super dev mode by default.
Run the application in Eclipse
As you have done, navigate to Properties > Google > Web Application and check "This project has a WAR directory". The WAR directory using this plugin should be src/main/webapp.
Navigate to Properties > Google > Web Toolkit and check "This project has a WAR directory. You may be able to specify the module here. I am actually unable to do so, it may be specific to my Google Plugin for Eclipse or something environment specific...
Run As > Web Application.
If you had issues, as I have had, in step 2 then you will get an error Missing required argument 'module[s]'. To fix this open up your run configuration (should have been auto created) and in the arguments tab add the package qualified name for your module at the end of the arguments, e.g. com.mycompany.abc.GwtSampleModule. Do not add the ".gwt.xml" prefix.
It's worth also checking that the HTML page referenced in your arguments is correct, I have also had issues with that.
The application should now be configured for Launch in Eclipse using this run configuration. My verified environment is:
Eclipse Luna (v4.4)
Google Plugin for Eclipse (v3.8)
GWT Maven Plugin (v2.7.0)
I'm looking (if it exists) a way to import few XCode java projects into eclipse, maybe a plugin or something that starting from a pbxproj file, generates an eclipse project (.classpath + .project).
After many searches on the internet I reached this URI:
Migrating from XCode to eclipse.
There you can read this:
Migrating with a script is pretty easy and it is not a complex script, it just copies files and puts Java classes into the package structure. The script does not do everything, it just takes the drudgery out of it. You will want to convert all the frameworks before the applications as the applications will need the frameworks to build.
The first step is to create a new Eclipse project, a Wonder Application or a Wonder Framework, and give it the same name as the Xcode project. This does NOT mean you will be using Project Wonder, it just refers to a project layout developed for Wonder.
cd into your Xcode project, Run ./fleeto /path/to/eclipse/project, Refresh the project in Eclipse (select and press F5 or use the context menu), Repeat for other frameworks and applications.
For working in Eclipse you will want to have the framework projects included as required projects in the applications and frameworks that use them. For each project, Properties - Java Build Path is the central place to manage your project. Select the Projects tab and add the framework projects that this application references.
These project dependencies work in Eclipse but not for deployment. For deployment you need to reference frameworks from their installed location. Install the framework (see Install on the context menu).
Then go to the Properties - Java Build Path - Libraries tab and configure the WO Frameworks library. Expand the nodes and select the installed framework(s).
REMOVE the checkmarks beside the ERJars and ERExtensions framework if you are not using Project Wonder. Finally, adjust the order on the Order and Export tab so that required projects appear before the WO Frameworks Library. Doing this ensures that Eclipse uses the current code and not a previously installed version.
I'm trying to create a GWT project through WebAppCreator enabled Maven2.
Project creation steps:
Create project with WebAppCreator (i'm using gwt-2.3.0) ->webAppCreator -noant -maven -XnoEclipse -out MyApp com.example.MyApp
Import project as existing maven project in eclipse (helios)
Enable "Project" -> "Properties" -> "Google" -> "Google web toolkit" -> "Use google web toolkit" checkbox
Set in project properties "Google" -> "Web application" -> "This project has a WAR directory". Set WAR directory path "src/main/webapp" and uncheck "launch and deploy from this directory"
Java build path is "MyApp/target/www/WEB-INF/classes"
I did not change the settings in pom.xml
Compile project using gwt eclipse plugin (2.3.0 version). It successfully compiled.
Try to run project as Web Application. When i run application GWT plugin does not ask me about WAR folder.
I did all this, I saw in the logs:
[WARN] Server class 'com.example.server.GreetingServiceImpl' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/home/redfox/workspace/java/redfox/MyApp/target/www/WEB-INF/classes/' to the web app classpath for this session
[WARN] Server class 'com.google.gwt.user.client.rpc.RemoteService' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/home/redfox/.m2/repository/com/google/gwt/gwt-servlet/2.3.0/gwt-servlet-2.3.0.jar' to the web app classpath for this session
And when i try to load page from URL (http://127.0.0.1:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997) i see 404 error.
In logs i don't see any errors. How can i run this default application? Also i have another question: if this problev will be solved, how can i run this application in web mode (not in development mode) for using links like "http://127.0.0.1:8888" whithout param gwt.codesvr?
P.S. Sorry for my bad English.
I understand your frustration, trust me, I recently went through exactly the same issue you having now.
As Eugene indicated, follow his instructions, but...
On the Select an Archetype choose version 2.3.0-1 (Others may work but this one works for me)
Generate your sample app using theat Archtype version. Do a mvn gwt:run, you will see this screen (If all goes well)
Click on "Launch Default Browser".
Good luck.
Cheers
PB
I know this question is two years old. But i just had the same issue and now figured out how to fix it.
When eclipse doesn't ask you at the first launch for your "WAR" directory, you can also set it manually:
In eclipse go to "Run" -> "Debug Configuration...". Select your "Web Application" -> Select the "Arguments"-Tab and add the parameter e.g. "-war C:\YourProjectPath\target\YourProject-1.0-SNAPSHOT". Provide the full path here pointing to your target, generated by maven.
Hope that helps someone solving this issue faster :)
I know this is old, but here is my latest approach (as also answered here)
I can't speak for the webAppCreator because I haven't used it, but I have had good luck creating the Maven projects in Eclipse using the gwt-maven-plugin from codehause.
Creating a Maven GWT Project Directy in Eclipse
Open the new project wizard in Eclipse and filter on Maven Project.
Select the Maven Project and click next.
Enter the project location of your preference and click next.
Enter "gwt-" into the archetype filter and select the gwt-maven-plugin from codehaus. Click Next.
Enter your maven project details and a module value, then click Finish.
This will create a maven - gwt project for you in Eclipse. This comes with a sample application that you can use to make sure you can launch the application correctly.
Running the Application Command Line
Open command line.
Navigate to your project home.
Run the command "mvn clean package".
Run the command "mvn gwt:run"
This should get you up and running. If you used the 2.7.0 gwt-maven-plugin this should run the application in super dev mode by default.
Run the application in Eclipse
As you have done, navigate to Properties > Google > Web Application and check "This project has a WAR directory". The WAR directory using this plugin should be src/main/webapp.
Navigate to Properties > Google > Web Toolkit and check "This project has a WAR directory. You may be able to specify the module here. I am actually unable to do so, it may be specific to my Google Plugin for Eclipse or something environment specific...
Run As > Web Application.
If you had issues, as I have had, in step 2 then you will get an error Missing required argument 'module[s]'. To fix this open up your run configuration (should have been auto created) and in the arguments tab add the package qualified name for your module at the end of the arguments, e.g. com.mycompany.abc.GwtSampleModule. Do not add the ".gwt.xml" prefix.
It's worth also checking that the HTML page referenced in your arguments is correct, I have also had issues with that.
The application should now be configured for Launch in Eclipse using this run configuration. My verified environment is:
Eclipse Luna (v4.4)
Google Plugin for Eclipse (v3.8)
GWT Maven Plugin (v2.7.0)
What I suggest may start slightly different than you prefer but with better results :)
Install m2eclipse plugin. This will add a lot of nice maven features to your environment.
Using new project wizard create new Maven project
Do not select "simple project" check box, instead use the one of GWT archetypes (I suggest gwt-maven-plugin)
Then appropriate project structure with all required dependencies will be created for you by maven. More info about GWT plugin can be found at http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html, including on how to execute it.
P.S. Your English is fine :)