eclipse build.gradle has a red slash through it, what does that mean? - eclipse

I'm running Eclipse - Indigo and have a project configured for EGit that uses Gradle to build. Today I noticed in the Package Explorer of eclipse, the build.gradle file now has a little red slash through its icon:
Where did the little red slash come from and what does it mean? Is it an egit thing (I don't think so, the file doesn't show up in git status from the command line nor does this red slashy icon appear in Preferences, Team, Git, Label Decorations)? I never noticed it before today, which leads me to believe that it hasn't showed up until today.
EDIT: Is there any chance .gitignore is contributing to confusion in eclipse? Here's the contents of my .gitignore
/test-output
/logs
# Gradle
.gradle
/build
# OSX
.DS_Store
# Eclipse
.classpath
.project
.tomcatplugin
.settings/
/work
/bin
# Emacs backup files
*~
\#*\#/bin

The red slash is a Groovy-Eclipse thing. It means that the gradle build file is being interpreted as a groovy file, but this groovy file is not on the build path (and this makes sense because gradle build files are not typically in source folders).
Is something not working, or are you just curious about the overlay?

Related

Permanently fix the Eclipse error "project description file (.project) is missing"

Every time I boot Eclipse I get the error "The project description file (.project) for my project is missing".
As other StackOverflow answers have show, this is easy enough to fix: delete package from Eclipse and import it again. However, if I close and reopen Eclipse the error will be back. I have not found a permanent solution yet.
I have my workspace in my Dropbox, but at some point I decided it was time to start using Git. I don't really get Git but they say you have to put the .project file in your .gitignore because it is computer specific.
This I feel is the origin of the problem, but if I don't do any git related activities (push, commit, etc.) I still get this error.
How do I fix this once and for all?
A .project is a Eclipse-specific file that tells Eclipse about how the project's struture is placed in the project's hierarchy.
It's normal for this file (and other Eclipse specific files) to not be committed because other people participating on the same project may use other IDEs of their choices (intellij, and so on), so the content committed in your VCS is 'neutral' for IDEs.
When you create a project from inside Eclipse, the .project file shall be created along. But when you import into Eclipse an existing project, there are ways to generate locally the .project , .classpath and other Eclipse-required files. Maven, Gradle and Ant are some examples of tools that do this.
Finally, I recommend to keep these files in .gitignore so the project's contents in VCS will remain neutral to IDEs. So you will not bother other people using other IDEs.
So, the steps are:
Check out the project
Generate the eclipse files using maven, ant or gradle. If your project already uses a tool such as these, thats nice
Check if the project is OK inside eclipse (compiling, no errors)
Add the newly generated eclipse files to .gitignore
commit and push the .gitignore.
.project is not machine-specific as long as everyone on your team has the plug-ins installed for that kind of project. .classpath might be if you don't do things right. This is your project, though, so commit your .project.
Keeping .classpath clean largely revolves around keeping machine-specific paths and references out of it:
Set the project's JRE using an Execution Environment. It is an indirect way of saying what version you need, then the IDE figures it out for that machine. The stored value defaults to using the name of your default Installed JRE in the preferences, which is very machine-specific.
Put the jar files you need into the project, or into another project that this one can refer to. They go into source control as well for the sake of repeatability, unless you're using a tool like Maven, in which case be specific about the version you require where ever you state that dependency and make sure the relevant M2E plug-ins are installed.

eclipse intellij can use Github for same project

Is it possible to create one project in GitHub, and two teams who are using different IDE like Eclipse and Intellij can configure project with github and can work simultaneously on same project?
I have searched it but not able to find proper solution for it.
Yes, you even can version:
your .project and .classpath (eclipse)
and your .idea folder (intellij)
And both set of IDE-specific files would ignore each others: one could use the Eclipse settings without realizing there is an IntelliJ IDEA project, and vice-versa.
Yes this is possible.
Most IDE's do create some specific project folders, where the IDE does store Data for your project. As example local build paths and so on.
Git provides the .gitignore file.
In this file you can specify which folders and files git will ignore. As example IDE Based files and folders. Due that every developer can his favourite IDE and no local IDE based files will be in the Git Porject itself.
Most IDE's will update or crate the .gitignore File automatic when they do find an git folder in the project.
What files you have to add to the .gitignore file is differs from IDE to IDE. It also depends on what Programm language your Project is written in.
Here you can find more about the gitignore file:
How do I ignore files in a directory in Git?
http://www.bmchild.com/2012/06/git-ignore-for-java-eclipse-project.html
Yes you can, there no limits on IDEs and number of team members, check this for Eclipse
and this for IntelliJ

IBM Worklight - How does Worklight detect the project version?

Recently we'd updated our Worklight platform with the latest Fixpack (6.1.01) and everything works fine after the update.
However although we had check in all our files into our SVN repository, when we check out a fresh copy of project, the eclipse Worklight plugin will still perform an upgrade to the project.
Is there a Worklight platform version control in the project folder that we missed out and didn't commit to the repository? or is there extra setting that we need to apply before checking into the SVN repo?
Any clues will help, thank you.
EDIT
Below is the print screen taken from the SVN Repository browser in eclipse. We use Windows environment for development. The .settings folder is inside the repo.
EDIT 2
After inspecting the org.eclipse.core.resources.prefs file in the .settings folder, i notice that there's this line of properties that are not updated in the repo:
wl_version=6.1.0.00.20131219-1900
Is it this line that is causing the problem?
Edit the question with the files/folders you did commit to SVN.
Additionally, make sure to setup your PC/Mac to display hidden files and folders and see that you did not miss those.
Specifically, there is a .settings folder (. denotes a hidden folder in Mac) that also contains a org.eclipse.core.resources.prefs file.
I'd be interested to see the result of an import of a project that does contain this folder and this specific file.

Eclipse build not working

I have set up eclipse project with maven layout. I have also enabled the maven dependency management(with m2eclipse). I can run the tests from the eclipse menu.
Now, I have initialized a git repository (external to eclipse. no plugins) inside my project and I have commited the .gitignore and pom.xml files
.gitignore
*.pydevproject
.project
.metadata
bin/**
target/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
Now I have created a new branch and checked it out to work. Now my autobuild is stopped working. The eclipse menu still shows "Build automatically" as ticked.
I am not what is going wrong here.
Is there something that I am missing?
The OP Varun Naik reports in the comment that:
It seems when I "Enable dependency" in my m2eclipse, the auto build stops working
That seems a sign of a project configuration being no longer in sync with the Maven project:
It seems that my project configurations were updated somehow.
I right clicked Project -> Maven->Update Project Conf, and everything is back to normal now.
This is similar to the question "maven-archetype-webapp eclipse problem".

maven+tycho: change build folder for "eclipse-application" target from "eclipse" to something

I build my Eclipse RCP application with Maven 3 + Tycho plugin.
the build output structure is:
/target
/win32.win32.x86
/eclipse
/win32.win32.x86_64
/eclipse
/linux.gtk.x86_64
/eclipse
/linux.gtk.x86
/eclipse
/product-1.0.0.13-linux.gtk.x86.zip
/product-1.0.0.13-linux.gtk.x86_64.zip
/product-1.0.0.13-win32.win32.x86.zip
/product-1.0.0.13-win32.win32.x86_64.zip
product**.zip files have "eclipse" top folders in them.
How can I change the build so that the top level folders be called "myproduct" instead of "eclipse"?
I don't believe this is still "hardcoded" (if it ever was) but when it comes to being selective about what you want/how you want things in your archive, I've always found the antrun plugin to be a great help in renaming/deleting/rezipping; you'll just want to disable the default packaging plugin for the projects that use this as there is no point in packaging twice.