0

Ive setup a github repo to store custom archetypes, and I can start a new project off these archetypes (on separate vm) using something like

 mvn archetype:generate -Dcatalog=https://raw.github.etc./archetype-catalog.xml

now i'm trying to store some 3rd party jars remotely in the same repo and reference them from a pom.xml as dependancies

First I installed the jar locally with

mvn install:install-file ..params..

the repo structure I have goes like:

https://github.com/myappco/myrepo

 |
 |___releases
 |           | 
              (group id)adobe.flex.messaging   (ie. adobe/flex/messaging)
                               common  
                                     1.0  
                                        (common-1.0.jar) 
                                        * trying to make this work
 |___snapshots
              |
               (group id)com.acme.archetypes   (ie. com/acme/archetypes)
                                my-archetype
                                           1.0-SNAPSHOT   
                                           * archetype resolved ok

 archetype-catalog.xml

The settings in my project:

<dependency>
  <groupId>adobe.flex.messaging</groupId>
  <artifactId>common</artifactId>
  <version>1.0</version>
  <scope>test</scope>
</dependency>

 <repositories>
  <repository>
    <id>orb-snapshots</id>
       <url>https://github.com/myappco/myrepo/releases</url>
    </repository>
 </repositories>  

I think I must be doing something dumb, because I can archetype:generate from the github repo archetype-catalog.xml. Can anyone see what I messed up?

Ta

MikeW
  • 4,749
  • 9
  • 42
  • 83

1 Answers1

0

You need to deploy your artifacts in github using mvn deploy. You would need to have set up github appropriately - perhaps similar to what is mentioned in Hosting Maven Repos on Github.

Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • Yea is the same link I used to setup, and works quite well - is there a difference between archetype storage and jar storage for maven dependancies? I used his method of -DaltDeploymentRepository, and it works fine for archetypes. I then push it to github. So far Maven error says: Could not find artifact flex.messaging:common:jar:1.0-SNAPSHOT in..{github repo url} – MikeW Sep 16 '12 at 11:36
  • 1
    A follow up to the link that Raghuram posted is this solution, which automates the solution: http://stackoverflow.com/a/14013645/82156 – emmby Dec 23 '12 at 19:15