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

v0.3.0 pom doesn't have dependencies in the right scope #10

Open
rtyler opened this issue Sep 22, 2015 · 3 comments
Open

v0.3.0 pom doesn't have dependencies in the right scope #10

rtyler opened this issue Sep 22, 2015 · 3 comments
Assignees
Labels

Comments

@rtyler
Copy link
Member

rtyler commented Sep 22, 2015

The currently released pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.jruby-gradle</groupId>
  <artifactId>jem</artifactId>
  <version>0.3.0</version>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.3.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap</groupId>
      <artifactId>shrinkwrap-depchain</artifactId>
      <version>[1.2.2,1.3)</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>[2.5.4,2.6)</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>[1.7.12,1.8)</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>[1.7.12,1.8)</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib-nodep</artifactId>
      <version>3.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.spockframework</groupId>
      <artifactId>spock-core</artifactId>
      <version>1.0-groovy-2.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap</groupId>
      <artifactId>shrinkwrap-bom</artifactId>
      <version>[1.2.2,1.3)</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>[2.5.4,2.6)</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
      <version>[2.5.4,2.6)</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>

All of these dependencies should be in the runtime scope, but it appears that the default maven plugin doesn't include the dependencies in the compile configuration by default in the runtime scope, see this thread

The behavior is expected. Parent configurations won't be considered when mapping configurations to scopes (doing so wouldn't work for 'compile' and 'runtime', for example). I recommend to change the way you share common dependencies, but I'd have to know/see more about your current solution to give concrete recommendations.

Experimenting locally with the maven-publish plugin gives promising results

@rtyler rtyler added the bug label Sep 22, 2015
@rtyler rtyler self-assigned this Sep 22, 2015
@mkristian
Copy link
Contributor

mkristian commented Sep 22, 2015 via email

@rtyler
Copy link
Member Author

rtyler commented Sep 22, 2015

I added this last night to make sure I didn't forget it. I may be misattributing the classloader errors I was seeing to the difference in what I expected from the pom. Part of why I assumed the compile scope was wrong is due to the jruby-gradle-plugin not having anything in that scope.

@mkristian
Copy link
Contributor

compile implies runtime so this part should be OK.

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

No branches or pull requests

2 participants