Repository: eclipse-corrosion/corrosion (language: rust)

Issue:
Adding eclipse .dotfiles to gitignore
When running 
``
mvn clean verify
``
for the first time after importing it in eclipse, you get the error 

> [ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:build-qualifier (default-build-qualifier) on project org.eclipse.corrosion: Working tree is dirty.
[ERROR] git status org.eclipse.corrosion:
[ERROR] 
[ERROR] Changes not staged for commit:
[ERROR] 	modified:    org.eclipse.corrosion/.gitignore
[ERROR] 
[ERROR] Untracked files:
[ERROR] 	org.eclipse.corrosion/.settings/org.eclipse.m2e.core.prefs
[ERROR] 
[ERROR] You are trying to use tycho-buildtimestamp-jgit on a directory that has uncommitted changes (see details above).
[ERROR] Either commit all changes/add files to .gitignore, or enable fallback to default timestamp provider by configuring 
[ERROR] jgit.dirtyWorkingTree=warning for tycho-packaging-plugin
[ERROR] -> [Help 1]

because of the generated dotfiles for eclipse.
Adding those files to .gitignore would help for this. Also this files are generated when importing the project as maven project. 



Discussion / hints:
Tell me if e4fd24a fixes your problem.
not really iam still getting 

>[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:build-qualifier (default-build-qualifier) on project org.eclipse.corrosion: Working tree is dirty.
[ERROR] git status org.eclipse.corrosion:
[ERROR] 
[ERROR] Changes not staged for commit:
[ERROR] 	modified:    org.eclipse.corrosion/.gitignore
[ERROR] 	modified:    org.eclipse.corrosion/.classpath
[ERROR] 	modified:    org.eclipse.corrosion/.project

have a look at my pull request #30 for all dotfiles that must be ignored. Also the auto generated files of maven. 
Classpaths and project files are quite often included in project repos as far as I've seen, what is the modifications that have happened in your .classpath and .project files?
the `.project`, `.classpath` and even `.settings/` are better being kept in the Git repo as per Eclipse IDE recommendations. Valuable changes on that files should be committed.
Those files are not expected to be modified without a reason. If they are, it's something that should be fixed in the tool that modifies those files without reason, not something that Eclipse Plugin project should workaround by removing the files.
@MaSven, I see you closed #30. Did you solve the issue? If there were some actions you were required to take to get it to work, could you post them here for future reference by others?
Ok i think the problem is, 
* made a new git clone to have a clean state
*  import the project as maven project from parent. 
* Start maven clean verify from within eclipse.
* Eclipse will now alter the .gitignore file, .classpath file ,the .project file and some files in the settings folder.
* mvn clean verify will fail because of the altered files

Here is what changed. 
[0001-Altered-files-from-import-as-maven-project.txt](https://github.com/LucasBullen/corrosion/files/1720460/0001-Altered-files-from-import-as-maven-project.txt)

Also this is a patch file but github wanted a txt file.











@LucasBullen I think it's be good to accept those changes in dotfiles caused by m2e, once and for all. The only drawback is that m2e would become required, but the vast majority of Plugins Developers do have it installed and other ones would be prompted to install it, so it wouldn't be a big deal.
I closed it because i think the description isn't appropriate anymore for this issue.

Yes and i also think most of the people will try to build with maven from within eclipse. Also i think eclipse comes with m2e preinstalled for java developers.
Should i start a new pull request then? Or will somebody of you two make a new commit?
I've reverted my last commit, feel free to make the new pull request.

Fix patch:
diff --git a/.project b/.project
index e3aec00..4e2da21 100644
--- a/.project
+++ b/.project
@@ -5,7 +5,13 @@
 	<projects>
 	</projects>
 	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
 	</natures>
 </projectDescription>
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.corrosion/.classpath b/org.eclipse.corrosion/.classpath
index eca7bdb..43b9862 100644
--- a/org.eclipse.corrosion/.classpath
+++ b/org.eclipse.corrosion/.classpath
@@ -3,5 +3,5 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="output" path="target/classes"/>
 </classpath>
diff --git a/org.eclipse.corrosion/.gitignore b/org.eclipse.corrosion/.gitignore
index ae3c172..09e3bc9 100644
--- a/org.eclipse.corrosion/.gitignore
+++ b/org.eclipse.corrosion/.gitignore
@@ -1,1 +1,2 @@
 /bin/
+/target/
diff --git a/org.eclipse.corrosion/.project b/org.eclipse.corrosion/.project
index fb473d2..46146e0 100644
--- a/org.eclipse.corrosion/.project
+++ b/org.eclipse.corrosion/.project
@@ -20,8 +20,14 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 	</natures>
diff --git a/org.eclipse.corrosion/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.corrosion/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.corrosion/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/target-platform/.gitignore b/target-platform/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/target-platform/.gitignore
@@ -0,0 +1,1 @@
+/target/
diff --git a/target-platform/.project b/target-platform/.project
index cedbacf..deeeab4 100644
--- a/target-platform/.project
+++ b/target-platform/.project
@@ -5,7 +5,13 @@
 	<projects>
 	</projects>
 	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
 	</natures>
 </projectDescription>
diff --git a/target-platform/.settings/org.eclipse.m2e.core.prefs b/target-platform/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/target-platform/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1


Test patch:
diff --git a/org.eclipse.corrosion.tests/.classpath b/org.eclipse.corrosion.tests/.classpath
index eca7bdb..43b9862 100644
--- a/org.eclipse.corrosion.tests/.classpath
+++ b/org.eclipse.corrosion.tests/.classpath
@@ -3,5 +3,5 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="output" path="target/classes"/>
 </classpath>
diff --git a/org.eclipse.corrosion.tests/.gitignore b/org.eclipse.corrosion.tests/.gitignore
index 65776c3..09e3bc9 100644
--- a/org.eclipse.corrosion.tests/.gitignore
+++ b/org.eclipse.corrosion.tests/.gitignore
@@ -1,1 +1,2 @@
-/bin/
\ No newline at end of file
+/bin/
+/target/
diff --git a/org.eclipse.corrosion.tests/.project b/org.eclipse.corrosion.tests/.project
index 1742448..96ec968 100644
--- a/org.eclipse.corrosion.tests/.project
+++ b/org.eclipse.corrosion.tests/.project
@@ -20,8 +20,14 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 	</natures>
diff --git a/org.eclipse.corrosion.tests/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.corrosion.tests/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/org.eclipse.corrosion.tests/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1