Griffon dont create Eclipse .project and .classpath files - eclipse

Griffon 0.9.2-beta-3
after exec "griffon create-app DemoConsole"
cant find the .project, so cant import it into eclipse(sts).
but the docs say that "Griffon automatically creates Eclipse .project and .classpath files for you",
did i miss some step?
solved by :
griffon integrate-with --eclipse
griffon install-plugin eclipse-support
griffon eclipse-update
eclipse --> import existing project

solved by :
griffon integrate-with --eclipse
griffon install-plugin eclipse-support
griffon eclipse-update
eclipse --> import existing project

In STS 2.6 (& probably other Eclipse versions) also need to add a classpath variable.
If you get errors relating to 'unbound classpath variable' and the files concerned start with GRIFFON_HOME/....
Select Eclipse/STS -> Preferences -> Java -> Build Path -> Classpath Variables
New ... -> Add 'GRIFFON_HOME' and navigate to location of your Griffon installation.
Confirming this & a rebuild of proj. should clear the errors.
If you want to do this on a per project basis - just right click the project & follow the same procedure under Build Path -> Libraries

Related

Eclipse - Wrong project name when importing maven project

I'm using eclipse mars and I'm working on a multi modules maven 2 project.
Since now it was always working fine when importing the project into eclispe.
My project structure is like
myproject
|-common
|-dao
|- ...
In each pom the artifact-id is
<artifactId>myproject-common</artifactId>
<artifactId>myproject-dao</artifactId>
...
What I always did till now
retrieve the project from svn
mvn clean install
mvn eclispe:eclipse
in eclipse import > existing project > browse to myproject and it displays the good project names : myproject-common, myproject-dao, ...
But since today the last step gives me the folder name in place of the artifact name : common, dao, ...
And after import, lot of errors saying eg. that Project 'dao' is missing required Java Project: 'myproject-common'
I don't understand. Same version of eclispe,maven and java than few months ago.
And after mvn eclipse:eclispe, the .project file is containing the good name
<projectDescription>
<name>myproject-common</name>
How can I solve that ?
I solved it by changing:
import > existing project
to:
Import -> Maven -> Existing Maven Projects

Maven Error While updating Dependencies

I have a maven project in which i am getting the following error. I am using eclipse IDE
An internal error occurred during: "Importing Maven projects".
Unsupported IClasspathEntry kind=4
I have followed below steps for resolving this error. The reason for this error is class path file located in your project folder.
Disable Maven Nature for your project ( If in eclipse, right click on the project --> Maven --> Disable Maven Nature).
Delete the class path file in your project folder.
Re- enable the Maven Nature Again (right click on project --> configure --> Convert to Maven Project).
Try to Maven clean, install and Run the project.
Here's a better answer: stop using eclipse.
Here's the eclipse bug page:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=394042
They seem to have no interest in fixing this issue, so if you require|prefer to use the command line for projects, then really there is no fix but to quit eclipse.

Failed to create Maven Project in eclipse

I added maven plugin in my eclipse .. but still can't create Maven project (doesn't exist in new project ) and i can't find it also in window -> preferences .. can any one tell me what's wrong please !?
May be Maven Integration (m2e) plugin not installed properly(check the eclipse version & try to install suitable plugin).
Alternately you could create maven project via command,
For core java project,
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
For Webapplication,
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
Kindly refer the below link:
http://www.mkyong.com/tutorials/maven-tutorials/

Referenced classpath entry for JAR in local maven repository missing when importing nutch

I am trying to import nutch 1.4 into Eclipse. I cloned git repository and then build it using Maven. Then, I imported it in Eclipse as Maven project, but I'm getting the following error:
The archive: /home/devang/.m2/repository/javax/jms/jms/1.1/jms-1.1.jar which is referenced by the classpath, does not exist.
I've seen this behaviour when I had a project already imported in Eclipse, but then deleted the local Maven repository.
To solve this, make m2eclipse re-download the project's dependencies:
Right-click on the project and select Maven > Update Project...
Select Force Update of Snapshots/Releases and hit OK

how to load the dependencies from the pom into classpath of eclipse project?

Am using eclipse helios with m2eclipse plugin. For a maven project checked out from CVS, how do i tell eclipse to automatically fetch all the jars needed for that project from the dependencies mentioned in the pom.
Thanks for your time
m2eclipse should do this for you (dependencies will be copied to your local repository) and build a valid classpath.
I you have any doubts that the resolved dependencies are outdated try
<select project> -> Context Menu -> Maven -> Update Dependencies
If you want to guarantee that all dependencies (and plugins) are in your local repository you can run the go-offline goal from the Maven Dependency Plugin:
mvn dependency:go-offline
If you want to copy all needed dependencies to one place, use the copy-dependencies goal
mvn dependency:copy-dependencies
The Maven Dependency Plugin will copy all dependencies (including transitive) to the target/dependency folder in this case.
You can run all these commands also from eclipse using:
<select project> -> Context Menu -> Run As -> Maven build... -> <type goals> -> Run