Skip to content

All dependencies get packaged into jar #90

Open
@georgewfraser

Description

@georgewfraser

All the classes from dependencies end up in the packaged jar. This is different than the default of maven, and not what you want when you intend to publish the project to a maven repository and consume it in another project.

Minimal pom.xml that reproduces the error:

<?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.fivetran</groupId>
    <artifactId>clojure-sandbox</artifactId>
    <version>1.0-SNAPSHOT</version>

    <packaging>clojure</packaging>

    <dependencies>
        <!-- Clojure language runtime -->
        <dependency>
            <groupId>org.clojure</groupId>
            <artifactId>clojure</artifactId>
            <version>1.6.0</version>
        </dependency>

        <!-- Fancy clojure JSON / Jackson wrapper -->
        <dependency>
            <groupId>cheshire</groupId>
            <artifactId>cheshire</artifactId>
            <version>5.3.1</version>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src</sourceDirectory>

        <testSourceDirectory>test</testSourceDirectory>

        <plugins>
            <!-- Teach maven about clojure -->
            <plugin>
                <groupId>com.theoryinpractise</groupId>
                <artifactId>clojure-maven-plugin</artifactId>
                <version>1.3.20</version>
                <extensions>true</extensions>

                <configuration>
                    <sourceDirectories>
                        <sourceDirectory>src</sourceDirectory>
                    </sourceDirectories>

                    <testSourceDirectories>
                        <testSourceDirectory>test</testSourceDirectory>
                    </testSourceDirectories>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions