Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

do not assume that JavaNature already exist in project

  • Loading branch information...
commit 2d3f14735fca33dab23e319a4de65e3de8a46322 1 parent 6060527
Simon Søndergaard authored
6 org.maven.ide.eclipse.scala/.settings/org.eclipse.jdt.core.prefs
... ... @@ -1,4 +1,3 @@
1   -#Wed Nov 24 10:29:41 CET 2010
2 1 eclipse.preferences.version=1
3 2 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
4 3 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -160,9 +159,12 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
160 159 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
161 160 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
162 161 org.eclipse.jdt.core.formatter.indentation.size=2
  162 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
163 163 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
164   -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
  164 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
  165 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
165 166 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
  167 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
166 168 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
167 169 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
168 170 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
2  org.maven.ide.eclipse.scala/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
2 2 Bundle-ManifestVersion: 2
3 3 Bundle-Name: Maven Integration for Scala IDE
4 4 Bundle-SymbolicName: org.maven.ide.eclipse.scala;singleton:=true
5   -Bundle-Version: 0.4.0
  5 +Bundle-Version: 0.4.1
6 6 Bundle-RequiredExecutionEnvironment: J2SE-1.5
7 7 Require-Bundle:
8 8 org.eclipse.jdt.core,
2  org.maven.ide.eclipse.scala/pom.xml
@@ -5,7 +5,7 @@
5 5 <parent>
6 6 <groupId>org.maven.ide.eclipse.scala</groupId>
7 7 <artifactId>m2eclipse-scala</artifactId>
8   - <version>0.4.0</version>
  8 + <version>0.4.1</version>
9 9 </parent>
10 10 <artifactId>org.maven.ide.eclipse.scala</artifactId>
11 11 <packaging>eclipse-plugin</packaging>
3  org.maven.ide.eclipse.scala/src/org/maven/ide/eclipse/scala/ScalaProjectConfigurator.java
@@ -115,6 +115,9 @@ public void configure(ProjectConfigurationRequest request, IProgressMonitor moni
115 115 if (request != null) {
116 116 IProject project = request.getProject();
117 117 if(!project.hasNature(scalaNature) && isScalaProject(request.getMavenProjectFacade(), monitor)) {
  118 + if(!project.hasNature("org.eclipse.jdt.core.javanature")) {
  119 + addNature(project, "org.eclipse.jdt.core.javanature", monitor);
  120 + }
118 121 addNature(project, scalaNature, monitor);
119 122 }
120 123 }
2  org.maven.ide.eclipse.scala_feature/feature.xml
@@ -2,7 +2,7 @@
2 2 <feature
3 3 id="org.maven.ide.eclipse.scala_feature"
4 4 label="Maven Integration for Scala IDE"
5   - version="0.4.0"
  5 + version="0.4.1"
6 6 provider-name="Sonatype, Inc.">
7 7
8 8 <description url="github.com/sonatype/m2eclipse-scala/">
2  org.maven.ide.eclipse.scala_feature/pom.xml
@@ -5,7 +5,7 @@
5 5 <parent>
6 6 <groupId>org.maven.ide.eclipse.scala</groupId>
7 7 <artifactId>m2eclipse-scala</artifactId>
8   - <version>0.4.0</version>
  8 + <version>0.4.1</version>
9 9 </parent>
10 10
11 11 <artifactId>org.maven.ide.eclipse.scala_feature</artifactId>
2  org.maven.ide.eclipse.scala_site/pom.xml
@@ -5,7 +5,7 @@
5 5 <parent>
6 6 <groupId>org.maven.ide.eclipse.scala</groupId>
7 7 <artifactId>m2eclipse-scala</artifactId>
8   - <version>0.4.0</version>
  8 + <version>0.4.1</version>
9 9 <relativePath>../pom.xml</relativePath>
10 10 </parent>
11 11
2  pom.xml
@@ -4,7 +4,7 @@
4 4 <modelVersion>4.0.0</modelVersion>
5 5 <groupId>org.maven.ide.eclipse.scala</groupId>
6 6 <artifactId>m2eclipse-scala</artifactId>
7   - <version>0.4.0</version>
  7 + <version>0.4.1</version>
8 8 <packaging>pom</packaging>
9 9
10 10 <properties>
14 samples/prj-parent-with-plugin/child/pom.xml
... ... @@ -0,0 +1,14 @@
  1 +<?xml version="1.0"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  4 + <modelVersion>4.0.0</modelVersion>
  5 +
  6 + <parent>
  7 + <groupId>example</groupId>
  8 + <artifactId>parent</artifactId>
  9 + <version>0.0.1-SNAPSHOT</version>
  10 + <relativePath>..</relativePath>
  11 + </parent>
  12 +
  13 + <artifactId>child</artifactId>
  14 +</project>
46 samples/prj-parent-with-plugin/pom.xml
... ... @@ -0,0 +1,46 @@
  1 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  3 + http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4 + <modelVersion>4.0.0</modelVersion>
  5 +
  6 + <groupId>example</groupId>
  7 + <artifactId>parent</artifactId>
  8 + <version>0.0.1-SNAPSHOT</version>
  9 + <packaging>pom</packaging>
  10 +
  11 + <build>
  12 + <pluginManagement>
  13 + <plugins>
  14 + <plugin>
  15 + <groupId>net.alchim31.maven</groupId>
  16 + <artifactId>scala-maven-plugin</artifactId>
  17 + <version>3.0.1</version>
  18 + <executions>
  19 + <execution>
  20 + <id>scala-compile-first</id>
  21 + <phase>process-resources</phase>
  22 + <goals>
  23 + <goal>add-source</goal>
  24 + <goal>compile</goal>
  25 + </goals>
  26 + </execution>
  27 + <execution>
  28 + <id>scala-test-compile</id>
  29 + <phase>process-test-resources</phase>
  30 + <goals>
  31 + <goal>testCompile</goal>
  32 + </goals>
  33 + </execution>
  34 + </executions>
  35 + </plugin>
  36 + </plugins>
  37 + </pluginManagement>
  38 +
  39 + <plugins>
  40 + <plugin>
  41 + <groupId>net.alchim31.maven</groupId>
  42 + <artifactId>scala-maven-plugin</artifactId>
  43 + </plugin>
  44 + </plugins>
  45 + </build>
  46 +</project>

1 comment on commit 2d3f147

Simon Søndergaard
Owner

Try importing child in the new example, the project does not import correctly as adding the Scala nature fails. The nature has a dependency to the java nature and in this case that nature does not exist in the project.

Please sign in to comment.
Something went wrong with that request. Please try again.