maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Broyer <t.bro...@gmail.com>
Subject Re: Using github as a maven repo
Date Wed, 05 Mar 2014 21:56:40 GMT
>From the point of view of Git, you're bloating your repo forcing everyone
to download all the JARs when they clone your repo.

>From the point of view of GitHub, they don't want you to do that and might
very well break it in the future. At least use gh-pages, but that doesn't
solve the Git issue.

>From the point of view of Maven, repos are a pain for users of your libs,
because each repo will be checked for each dependency. What seemed like a
good idea was badly executed and didn't work well in practice. Please stick
to Central or possibly Bintray.
Le 5 mars 2014 21:24, "Howard" <howard@renci.org> a écrit :

> Hi all
>
> I should preface this all by saying that I am not an experienced maven
> user, though I would not describe myself as a complete newbie, so I won't
> be too surprised if I am just doing something stupid here.  Please let me
> know if this is the wrong group for this type of question.
>
> I've got a project where we are keeping all of our code on GitHub. The
> project name is DataBridge Because this is an National Science Foundation
> funded Open Source project I thought it might make sense to store the jar
> files we produce in a maven repository on GitHub. I found this web page
>
> http://stackoverflow.com/questions/14013644/hosting-a-
> maven-repository-on-github
>
> and followed the instructions for one project that produces one jar.  It
> seems to have worked great for putting the jar file up on Github. The
> problem is occurring when I try to download the jar as an artifact in
> another pom for another project that depends on it. I can download the jar
> and it's pom using wget at the following addresses:
>
> wget https://github.com/HowardLander/DataBridge/blob/
> mvn-repo/org/renci/databridge-util/1.0-BETA/databridge-util-1.0-BETA.jar
> wget https://github.com/HowardLander/DataBridge/blob/
> mvn-repo/org/renci/databridge-util/1.0-BETA/databridge-util-1.0-BETA.pom
>
> but I don't seem to be able to find the magic to get maven to grab them.
> I'm thinking the problem is that I have the repository set incorrectly.
>  It's set to
>
>   <repositories>
>     <repository>
>         <id>github</id>
> <url>https://github.com/HowardLander/DataBridge/blob/mvn-repo</url>
>         <snapshots>
>             <enabled>true</enabled>
>             <updatePolicy>always</updatePolicy>
>         </snapshots>
>     </repository>
>   </repositories>
>
> Here's what I get from mvn -e compile
>
> howard@databridge.renci.org:/projects/databridge/howard/
> DataBridge/network/BigData/XMLSim $ mvn -e compile
> [INFO] Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] Building XMLTest 1
> [INFO] ------------------------------------------------------------
> ------------
> Downloading: https://github.com/HowardLander/DataBridge/blob/
> mvn-repo/org/renci/databridge-util/databridge-util/1.0-BETA/
> databridge-util-1.0-BETA.pom
> [WARNING] The POM for org.renci.databridge-util:databridge-util:jar:1.0-BETA
> is missing, no dependency information available
> Downloading: https://github.com/HowardLander/DataBridge/blob/
> mvn-repo/org/renci/databridge-util/databridge-util/1.0-BETA/
> databridge-util-1.0-BETA.jar
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] Total time: 1.593s
> [INFO] Finished at: Wed Mar 05 11:56:41 EST 2014
> [INFO] Final Memory: 4M/15M
> [INFO] ------------------------------------------------------------
> ------------
> [ERROR] Failed to execute goal on project XMLTest: Could not resolve
> dependencies for project com.RENCI.app:XMLTest:jar:1: Could not find
> artifact org.renci.databridge-util:databridge-util:jar:1.0-BETA in github
> (https://github.com/HowardLander/DataBridge/blob/mvn-repo) -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal on project XMLTest: Could not resolve dependencies for project
> com.RENCI.app:XMLTest:jar:1: Could not find artifact
> org.renci.databridge-util:databridge-util:jar:1.0-BETA in github (
> https://github.com/HowardLander/DataBridge/blob/mvn-repo)
>
> That seems fairly clear: it can't find https://github.com/
> HowardLander/DataBridge/blob/mvn-repo/org/renci/databridge-
> util/1.0-BETA/databridge-util-1.0-BETA.jar. Any suggestions?
>
> For reference here's the part of the pom that is trying to download the
>  jar:
>
>    <dependency>
>       <groupId>org.renci.databridge-util</groupId>
>       <artifactId>databridge-util</artifactId>
>       <version>1.0-BETA</version>
>     </dependency>
>
> The jar in question is part of the databridge-util project.  Here's the
> jar that pushes (successfully as far as I can tell) the jar and it's
> related artifacts to the github.
>
>       <plugin>
>           <groupId>com.github.github</groupId>
>           <artifactId>site-maven-plugin</artifactId>
>           <version>0.8</version>
>           <configuration>
>               <message>Maven artifacts for ${project.version}</message>
>  <!-- git commit message -->
> <noJekyll>true</noJekyll> <!-- disable webpage processing -->
> <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
> <!-- matches distribution management repository url above -->
> <branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
> <includes><include>**/*</include></includes>
> <repositoryName>DataBridge</repositoryName>      <!-- github repo name
-->
> <repositoryOwner>HowardLander</repositoryOwner> <!-- github username 
-->
>           </configuration>
>           <executions>
>             <!-- run site-maven-plugin's 'site' target as part of the
> build's normal 'deploy' phase -->
>             <execution>
>               <goals>
>                 <goal>site</goal>
>               </goals>
>               <phase>deploy</phase>
>             </execution>
>           </executions>
>       </plugin>
>
> Thanks much
> Howard Lander
>
> --
> Howard Lander <mailto:howard@renci.org>
> Senior Research Software Developer
> Renaissance Computing Institute (RENCI) <http://www.renci.org>
> The University of North Carolina at Chapel Hill
> Duke University
> North Carolina State University
> 100 Europa Drive
> Suite 540
> Chapel Hill, NC 27517
> 919-445-9651
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message