I use spring tools suite STS 3.9.1 and I have import a project gradle of my old computer to new computer.
When I use click right context menu 'Refresh Gradle Project' it build sucessfully but i don't see a external library in my treeview project and I can't publish to tomcat and start tomcat.
What's the problem ?
Thanks a lot
maybe you can execute this command gradlew eclipse or ./gradlew eclipse and then export the project
In fact , for my mind , the solution is to launch the Build or Build Depends task, and in a file log, I have a problem of certificat SSL in my cacerts
so it's all good
Thanks for your help
Related
I am trying to debug Kafka's source code with IntelliJ IDEA and for that I have to setup the IDE first. The official documentation of Kafka provides with the steps and so far, I have completed all of them to run Kafka from the source.
Then there is a step named Building IDE Project which has the command:
./gradlew idea
The output of the above successful command is:
> Configure project :
Starting build with version 3.0.0-SNAPSHOT using Gradle 6.8.3, Java 1.8 and Scala 2.13.5
> Task :idea
Generated IDEA project at file:///Users/aviralsrivastava/dev/kafka/kafka.ipr
I installed Intellij IDEA but unable to figure out how do I import the above file and what purpose does it serve?
You should be able to open the ipr file from File menu
However, as the docs state
Note that this is not strictly necessary (IntelliJ IDEA has good built-in support for Gradle projects, for example).
You can just open the root build.gradle file in Intellij, and it'll prompt you to import the folder as a project
I am quite new to Java, although I worked with some projects. I use IntelliJ IDEA, and I have issue with my web project.
Whenever I RUN the project from IntelliJ and when it's made and built - my localizations texts are not shown, but everything is ok if I use mvn install and deploy the war file manually.
What I found is that jars built with IntelliJ don't have MANIFEST.MF generated and couple of other files.
This is IntelliJ jar
This is jar when I run mvn install from console:
Can somebody help with this, why this happens? I have same maven used for compiling as I use for console run:
If you have a Maven project, then you can choose one on the tasks on the right of the editor.
jar or package should generate a JAR file.
Maven is a software tool that helps manage a project and automate builds. By default, however you have to select Maven as the desired type of project when you go to create a new project.
Basically, create a Maven project! :)
I built a libgdx project on my desktop which I can build and run properly though I want some friends to work on the project with me and when they import the repository from github the project won't run and it loses the gradle build.
I have tried to use these gradle commands to rebuild the project with no success.
cd/(File path)
gradle build
gradle eclipse
After I try to do these commands eclipse loses the project file. Even if I copy my master file into the imported directory it doesn't work.
Does anyone has suggestions on how to fix this?
Thanks in advance.
What do you mean with "it loses the gradle build"?
Try using ./gradlew (or gradlew on Windows) instead of gradle. The Gradle Wrapper scripts use arcane magic no mortal presumes to understand, but they seem to have their purpose.
I am trying to create a simple Maven project in Eclipse Luna. As this is my first maven project so I am starting with a simple one. I am trying to crate a simple web project using the webapp-j2ee14 archetype.
While creating I found that this archetype is not present in archetype list. So I tried with Add Archetype option and Provided the following archetype options.
<archetype>
<groupId>org.codehaus.mojo.archetypes</groupId>
<artifactId>webapp-j2ee14</artifactId>
<version>1.3</version>
<repository>http://repo1.maven.org/maven2/org/codehaus/mojo/archetypes/webapp-j2ee14/1.3/</repository>
</archetype>
The above code snippet is basically from archetype-catalog.xml file in .m2 directory in my system, but I actually entered them from eclipse UI.
Now, when I am clicking finish it's giving me the following error...
I tried with few other repo url after searching google but getting the same error. Where can I get the correct repo url for this archetype??
Thanks in advance...
Add Remote Archetype in your eclipse it will show you that option. Following are the steps:
File--->New---> Maven Project---->Next--->Click on tab Configure
Separate window will open... Maven-->Archetypes-->Click on Add Remote Catalog--> In Catalog File type "http://repo1.maven.org/maven2/archetype-catalog.xml" and click on Apply and then Ok
Now in new Maven Project select Remote Archetype from Catalog and you will find webapp-j2ee14 option there.
I got the same problem and i was creating a simple Web App. I created the MAVEN project first then i deleted it and again when i created it i got this error. So i changed the version of archetype. I was using 2.16 version of the archetype that i was adding to my MAVEN project, changed it to latest 2.26 and it worked for me.
You can check the latest version from http://repo1.maven.org/maven2/archetype-catalog.xml
I got this problem as I have deleted a previously created project from Eclipse.
Later, I deleted the .metadata file and the project from workspace. Then this problem was resolved.
I got same issue, I have solved by manually removing unused pom.xml file at the working workspace or root of workspace directory.
I think the work space has messed up of some reason. These steps below may help
Close eclipse
delete the .metadata directory
Restart the eclipse, pointing to same workspace and try the process to create new maven project
or if this approach didn't work
switch to a fresh new workspace and try the same process to create your maven project
This is worked for me!
After working whole day, finally I found the solution. I just went to Eclipse marketlace(help-Eclipse marketplace) and updated maven from there. Now it works wonders. Earlier I was unable to install TestNG plugin from Eclipse marketplace, but now after updating maven from there, Testng plugin successfully installed in my eclipse luna.
I was trying to create a maven archetype quickstart and faced this issue, I have never created any maven project before so for those below is the steps you need to follow -
Go to to Run -> Run As -> Maven Install
In the project explorer right click on pom.xml file -> Maven -> Update project.
This will for sure resolve the issue.
Eclipse version I am using : 2021-09 (4.21.0)
I'm learning SpringMVC framework and checked out a copy of their code:
https://src.springframework.org/svn/spring-samples/mvc-basic/trunk/
I can do maven build, install and everything. But on Eclipse, run on server option never appeared. I have tomcat server up and running, also got plugin for eclipse. Why run on server option is missing? This is a Ubuntu machine.
When I tried the exact same thing on my Windows machine, everything was fine. It has the same version of eclipse and all sorts of plugins installed as the Ubuntu machine. I was able to launch it from Eclipse "run on server" option there.
Can someone help me to figure out why? Thanks.
Did you create a Web Project? If you right click on the project and go to Properties > Project Facets is Dynamic Web Module selected?
I had a similar issue. The Maven projects have different structure than "Dynamic Web Projects". Eclipse knows only how to deploy the Dynamic Web Projects (project structure used by Web Tools Platform).
In order to solve this and tell Eclipse how to deploy a "maven style" projects, you have to install the M2E Eclipse WTP plugin (I suppose you are already using the m2e plugin).
To install:
Preferences->Maven->Discovery->Open Catalog and choose the WTP plugin.
After reinstalling, you will be able to "run on server" those projects which are maven web projects.
Hope that helps,
The topic is old but today I was facing the same problem, I imported a Maven project and when I tried adding to Tomcat it did not show the project. What worked for me:
Properties >> Project Facets and then check the options: Dynamic Web Module + Java then click in apply.
I hope it helps :)
For me worked:
Right click on project > Properties > Project Faces > change Configuration from "custom" to "Default configuration for Apache Tomcat v7.0" > OK and then Run on Server option has appeared.
Follow the below steps:
1) Right click on your maven project.
2) Select Maven
3) Update Project
4) check the
update project configuration from pom.xml
refresh workspace resources from local filesystem.
clean projects.
That's it.
Do you see any servers in server view in eclipse? Probably simply you have not created any server instances.
Perhaps you lost some configuration, check jar dependencies in properties -> Deployment Assembly. If you miss something, try to add dependencies again.
in my case, fixing this, Run on Server appear again.
There is only 1 thing that fixed this for me. In the pom.xml, add the tag:
<packaging>war</packaging>
Then after saving that, when you right click on the project you should now see the "Run As... Run on Server" option showing up.
I had to do the following
remove /WebContent from Deployment Assembly and add /src/main/webapp
Add Library (Properties->Java Build Path->Libraries), Server Runtimes
This got me working, in addition to #alanbartczak answer.
we have to install the M2E Eclipse WTP plugin
To install: Preferences->Maven->Discovery->Open Catalog and choose the WTP plugin.
And restart eclipse
I was facing similar issue when i created a new workspace in STS.
Project => right click => Maven option was also missing.
I tried this below steps and it worked.. hope it helps someone else.
Project => right click => configure => convert to maven project and then the option to run on server appeared.
Right click on the project, go to "Run as", select "Run configurations" and create a run configuration.