1

I'm using git-wagon wagon-git plugin to store jars at github repository (this is just for test, my company have own gitlab repository). I've created project "wagon_test", and deployed it (https://github.com/Bresiu/wagon_test/tree/releases/com/bresiu). Than I've created second project: "wagon_test_dependience" and deployed it too to the same repository, under same "release" branch. I added to "wagon_test" dependency:

<dependency> <groupId>com.bresiu</groupId> <artifactId>wagon_test_dependience</artifactId> <version>1.0</version> </dependency>

And deleted wagon_test_dependience artifact from maven local repository.

Now Maven can't download wagon_test_dependience.jar from github.

My pom.xml from wagon_test:

<?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.bresiu</groupId>
<artifactId>wagon_test</artifactId>
<version>1.0</version>
<name>wagon_test</name>
<properties>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<packaging>jar</packaging>

<dependencies>
    <dependency>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-provider-api</artifactId>
        <version>2.4</version>
    </dependency>
    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.4</version>
    </dependency>
    <dependency>
        <groupId>com.bresiu</groupId>
        <artifactId>wagon_test_dependience</artifactId>
        <version>1.0</version>
    </dependency>
</dependencies>

<build>
    <finalName>wagon_test</finalName>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <inherited>true</inherited>
            <configuration>
                <source>${java.version}</source>
                <target>${java.version}</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <finalName>${project.version}</finalName>
                <archive>
                    <manifest>
                        <mainClass>Main</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>Main</mainClass>
                    </manifest>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
            <executions>
                <execution>
                    <id>make-assembly</id>
                    <!-- this is used for inheritance merges -->
                    <phase>package</phase>
                    <!-- bind to the packaging phase -->
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
    <extensions>
        <extension>
            <groupId>ar.com.synergian</groupId>
            <artifactId>wagon-git</artifactId>
            <version>0.2.3</version>
        </extension>
    </extensions>
</build>
<pluginRepositories>
    <pluginRepository>
        <id>synergian-repo</id>
        <url>https://raw.github.com/synergian/wagon-git/releases</url>
    </pluginRepository>
</pluginRepositories>

<distributionManagement>
    <repository>
        <id>wagon_test</id>
        <name>wagon_test</name>
        <url>git:releases://git@github.com:Bresiu/wagon_test.git</url>
    </repository>
</distributionManagement>
<repositories>
    <repository>
        <id>wagon_test</id>
        <name>wagon_test</name>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <!--
           distributionManagement url was
           <url>git:your-branch://git@github.com:yourgithubusername/your-github-repo.git</url>
        -->
        <url>https://raw.github.com/Bresiu/wagon_test/releases</url>
    </repository>
</repositories>

How can I enable storing my private dependieces in Github/Gitlab? I know that storing binaries in Github has its pros and cons, but we have own gitlab repository only for jars and ruby gems, and we would like to keep all binaries in one place.

Bresiu
  • 2,123
  • 2
  • 19
  • 31
  • What error are you getting? – Martín Schonaker Apr 25 '15 at 02:39
  • @mschonaker it was long time ago, so I do not remember. I remember, that we successfully configured github with public repos, but we did encounter some problems with out private gitlab repository, so we stick with amazon s3. – Bresiu Apr 28 '15 at 08:21

0 Answers0