I was trying to configure wicket with Eclipse on Ubuntu. I used this guide
So I generated some commands in quickstart tab, paste it into the terminal new maven project was created. Then I ran mvn eclipse:eclipse command. I imported generated project into Eclipse and that`s where my problems started. In project run configurations there was an error in m2 variable, where it references to wicket-core directory. I have 2 directories in wicket-core: 7.5.0-SNAPSHOT and 7.6.0. By default M2_REPO variable references to 7.5.0-SNAPSHOT directory containing wicket-core-7.5.0-SNAPSHOT.jar.lastUpdated, but it is an illegal zip file, so I renamed it to wicket-core-7.5.0-SNAPSHOT.jar.
So when I ran Start class in /src/test/java I get Error: Could not find or load main class com.calculator.Start
I can not figure out whether it is wicket configuration problem or it is versions compliance problem?
I would be very grateful for any help!
I think you face a bug in the quickstart for 7.6.0. Wrongly it uses 7.5.0-SNAPSHOT in pom.xml. You will have to fix the version in a text editor and regenerate the Eclipse project. This is fixed in 7.7.0.
Related
I am trying to open this module in Intellij:
https://github.com/eugenp/tutorials/tree/master/javaxval
The steps followed by me:
Go to required directory javaxval/ in my local and
mvn clean install.
Open the pom.xml inside javaxval/ and open it as a project.
But Intellij is not syncing with the libraries mentioned in pom.xml as I can see in libraries section in Project Structure settings. Also, because of that, I can see lot of compilation errors.
Any idea what is the issue I am facing and how can I fix it?
This project imports and builds fine in IntelliJ IDEA 2019.2.2 version using the bundled Maven 3.6.1 for importing and JDK 1.8.
If it doesn't import/build for you, perform the diagnostics and check the logs as described in this answer. Make sure the parent pom file is present in the directory tree on your disk.
I know other people have had this problem, but I can't get it to work.
I imported a project from a git and I get an error saying "Project is not a Java project" when adding a class and it doesn't show up in the run config. Project here if it is something wrong with the project and not eclipse. I've heard answers to this with project facet and maven, but I don't have either.
I am running the latest version of eclipse and clean installed it today
The error should be "“Source folder is not a Java project”".
Check the content of your .project and .classpath.
You can modify the .project to add the org.eclipse.jdt.core.javanature manually.
(But adding the java facet should be the recommended way)
regarding the lack of Java facet, make sure your Eclipse has the right Java version support, as described here.
a .project and .classpath can be manually generated or copied from another simple Java Eclispe project.
I am new to github. I tried to clone a repo and then pull the files on my computer. All the other team members did the same thing and it worked for them. When i open the project with Intellij all the .java files look like this:
files
It also says that my SDK isn't set.
I tried to set my SDK, and also i tried to set the java directory as 'sources root' because someone said that is a problem with the project structure.
These problems disappeared but then IntelliJ didn't recognize that my project is a maven project so i had to add manually the file pom.xml and refresh maven.
Then this problem disappeared but i had another:
"Cannot start compilation: the output path is not specified for module 'cmsiss'.
Specify the output path in Configure Project."
I tried to set it from project structure but now I have this error:output error
Please help.
Open maven project using pom.xml file. File->Open->pom.xml
Sources should be pointed to project root, not java directory.
Give these a try.
The usual steps that I follow to open the project:
git clone <github clone url>
Open the project in intelli J using
File<Open
and browse to open the root of the project.
This should work fine but if it does not, a few more things you can try:
Try making the project root as a maven module
You can open the Project Structure to make sure you have Java SDK set up properly. It should show the java version you are using there.
Worst case, that is if nothing else works and if the project is not too big, just create a new maven project and make sure it runs, then add all the project files.
I pulled the project again and started from zero. I specified the SDK and then I opened the Maven project window and added a maven project (selected the pom.xml file) and refreshed it. Maven did it's job and created the project structure and all the stuff I've tried to do manually and finally worked!
Just started working with EJB (already developed project).
Imported the project from git and converted it to Maven project. However the project looks like a normal folder structure unlike regular java project. I cannot have any eclipse Java capabilities in side those files. Though they are Java files they look like class files to me with different symbol (can see that in image).
It won't compile unless I do maven build. Eclipse not showing any errors for those files even there are compile errors.
Running each time maven kills time and its irritating too.
Any help will be greatly appreciated. How to make that a normal Java project with eclipse compiler capabilities.
What configuration I have to do achieve this ?
Try running the command mvn eclipse:eclipse from the root folder of the project. It will create eclipse configuration files after which the project can be imported in Eclipse.
I cloned one of the open source git repositories and was trying to import it as maven project in eclipse. After I imported everything as a maven project, whole package is getting messed up. See the below error:
How can I fix this issue so that I can build it on my local box? I cloned the same git repository locally on my desktop.
I am using eclipse version:
Eclipse IDE for Java Developers
Version: Luna Service Release 1a (4.4.1)
Build id: 20150109-0600
Steps I have tried already:
I have already tried maven->update project.
I have also tried removing and adding it again.
I tried mvn clean install both on command line and eclipse, they are successful as well.
Can anyone help me with this? If needed, you can also clone it and try importing it to see whether it works for you or not.
The root of your problem is that the build section of the pom.xml for that project specifies:
<sourceDirectory>./src</sourceDirectory>
Eclipse uses the sourceDirectory tag to tell it where the root of the main sources are. If you change that to ./src/main/java, then right-click on the project > Maven > Update Project... and click Ok (I had to do this twice) it will fix the Eclipse classpath so Eclipse can build the project. You can then revert the pom back to the head revision and so long as you don't run Update Project again it should continue to build.
I'm unclear on why that project specifies a non-standard source directory but uses the standard Maven layout, but this should at least get you into a working state within Eclipse.