Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[polyglot-groovy] Dependencies are not resolved via dependencyManagement from parent #107

Open
eddumelendez opened this issue Nov 25, 2016 · 3 comments

Comments

@eddumelendez
Copy link

In the pom.xml below, dependencies are resolved via parent so it isn't required to add version in the dependency section. Maven commands execution run ok.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.example</groupId>
	<artifactId>demo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>demo</name>
	<description>Demo project for Spring Boot</description>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.4.2.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>

But, when pom.groovy is used the following exception is thrown.

[ERROR]   The project com.example:demo:0.0.1-SNAPSHOT (C:\Users\eddu.melendez\IdeaProjects\demo\.polyglot.pom.groovy) has 1 error
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing.

pom.groovy is:

project {
  modelVersion '4.0.0'
  parent {
    groupId 'org.springframework.boot'
    artifactId 'spring-boot-starter-parent'
    version '1.4.2.RELEASE'
    relativePath ''
  }
  groupId 'com.example'
  artifactId 'demo'
  version '0.0.1-SNAPSHOT'
  name 'demo'
  description 'Demo project for Spring Boot'

  properties {
    'project.reporting.outputEncoding' 'UTF-8'
    'java.version' '1.8'
    'project.build.sourceEncoding' 'UTF-8'
  }
  dependencies {
    dependency 'org.springframework.boot:spring-boot-starter-web'
    dependency {
      groupId 'org.springframework.boot'
      artifactId 'spring-boot-starter-test'
      scope 'test'
    }
  }

  build {
    plugins {
      plugin {
        groupId 'org.springframework.boot'
        artifactId 'spring-boot-maven-plugin'
      }
    }
  }
}
@mosabua
Copy link
Member

mosabua commented Nov 26, 2016

I think you can not yet mix parent and child poms with different formats. Can you confirm @jdillon or @jvanzyl ?

@mxmind
Copy link

mxmind commented May 15, 2019

Hi @mosabua,
I have the same issue, is it resolved?

@mosabua
Copy link
Member

mosabua commented May 21, 2019

no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants