Hello, I'm going to make use of Maven repository for all project in our company.
There are both open and closed projects with complex dependencies between them. All projects are multi-module ones and mostly all have to build both ordinary artifacts and OSGi bundles, plus some complex "assemblies" that users then download from the web. All projects are built by CI server. I tried to use Maven, but didn't like it. So, I'm looking at Gradle and wonder whether it will be possible to implement the following scheme with it: 1. Imagine there are company projects A and B, A depends on B. B uses some component C, available in the central Maven repository. 2. When CI builds B, it generates version number for the build, let's say "1.0.0-SNAPSHOT-r1024_v20110418_2000". 3. B build produces B-1.0.0-SNAPSHOT-r1024_v20110418_2000.jar, plus *-source.jar and *-javadoc.jar. These jars I would like to a) upload to Maven repository and b) put into zip archive named B-1.0.0-SNAPSHOT-r1024_v20110418_2000.zip Here there first question comes - will Gradle be able to generate pom.xml and upload artifact with such a "long" file name to Maven? Will this artifact be treated properly in regards to version and its 'SNAPSHOT' type? AFAIU Maven uses its own way of generating version qualifier at the moment it uploads artifact and it expects file to be named "B-1.0.0-SNAPSHOT.jar", without any additional qualifiers. And "SNAPSHOT" is needed to let other users of Maven use our artifacts as SNAPSHOT dependencies. 4. Now project A is built. It gets all its dependencies, and for B its depenency is 'org.copmany:B:1.0.0-SNAPSHOT' - to always get the latest build of B. For component C which is external, it receives "c-1.2.3-SNAPSHOT.jar" and for B it will receive (assuming Maven repository is used) B-1.0.0-SNAPSHOT.jar. Along with its own artifact, project A will have: A-1.0.0-SNAPSHOT-r2048_vYYYYDDMM_HHmm.jar B-1.0.0-SNAPSHOT.jar C-1.2.3-SNAPHSOT.jar And, as B's jar producing is under our control, we may make sure that its Manifest contains all information necessary to rename it to B-1.0.0-SNAPSHOT-rREV_vYYYYDDMM_HHmm.jar - and this is what I like to get! So, my questions are: 1) Is it possible to upload artifact to Maven which file name is A-1.0.0-SNAPSHOT-rREV_vYYYYDDMM_HHmm.jar, so that Maven users will see that artifact as A-1.0.0-SNAPSHOT.jar? What is the minimal configuration for that might be? Is file have to be renamed just before upload? 2) Is it possible to process artifacts just after they have been downloaded, so that B-1.0.0-SNAPSHOT.jar becomes B-1.0.0-SNAPSHOT-rREV_YYYYDDMM_HHmm.jar? Is it possible to do it transparently, by providing some a pattern? Configurable pattern of such sort might be very useful for OSGi projects as OSGi bundle symbolic names usually doesn't match Maven artifact names. 3) At some moment I became concerned on whether my naming/versioning scheme is sane at all, as there is no built-in support for it in Maven! However, Gradle CI builds use very similar file names (both for jars and distribution zip), but I didn't find how (and whether) does it upload these jars to Maven. Thanks a lot in advance! -- View this message in context: http://gradle.1045684.n5.nabble.com/Artifacts-repositories-and-version-numbers-tp4309829p4309829.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
