How do I use release:perform to deploy artifacts other than jar files?

2007-06-13 Thread Danny MacMillan

Hi,

My project is a utility program comprised of Java source files that are 
compiled into a jar, plus other ancillary files (configuration files, 
batch files, etc.).  I use the assembly plugin to produce a zip file 
containing all files relevant to the project, including the compiled Jar 
file.  That works great.


Now I want to create a release.  I was able to successfully run 
release:prepare and release:perform, but it deployed into the repository 
just the jar file, when what I want to deploy is the zip file.  Is that 
possible?


The project will never be a dependency of any other project.  I want to 
deploy it so I have a centrally maintained and archived copy of the 
exact version I will be deploying to the client.  The release plugin 
seems to be the best way to do it because it keeps the version numbers 
in sync with the repository tags, etc.  Not to mention that the maven 
repository seems like a safe place to put it (my IT environment is ... 
interesting).


I would really appreciate any guidance.

--
Danny MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Coping w/ 3rd party libs ... jar plus dependencies.

2007-04-27 Thread Danny MacMillan

Hervé BOUTEMY wrote:
to write the pom, please read 
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
in your wase, it will only be used for the dependencies declaration, not to 
build the jar


once the pom is written, to deploy the existing jar with its pom, please read 
http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html


and voila
:)


Thanks ... I had read that first link before but was still confused 
since I didn't think you could have just dependencies without any Java 
build stuff in the POM.  But I figured it out by looking at the POM 
files for artifacts already in the repository and seeing how they handle 
dependencies.


The second link was very helpful :)

--
Danny MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Coping w/ 3rd party libs ... jar plus dependencies.

2007-04-26 Thread Danny MacMillan

Hi,

I am developing a project using a jar supplied by a vendor.  Their jar 
depends on all kinds of other jars, like activation.jar, etc.  I can 
easily install those other jars into my repository following the 
instructions in the Guide to installing 3rd party jars.  But how do I 
install the vendor supplied jar in such a way that gives me the 
advantage of transitive dependencies?  That is to say, I want my project 
to directly depend only on their jar, not all those other jars.


--
Danny MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Coping w/ 3rd party libs ... jar plus dependencies.

2007-04-26 Thread Danny MacMillan

ben short wrote:

There is a pomFile parm for the install:install-file goal[1] so you
can install the pom in your local repo.

[1] 
http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html


On 4/26/07, ben short [EMAIL PROTECTED] wrote:

Hi Danny,

Im not sure this is exactly what you want but, if you have an inhouse
repo, like proximity[1],  you can deploy your vendor jar to that and
include custom pom[2] that has its dependencies configured. This will
allow you to have just the one jar as a dep of your project, but when
maven downloads it it will pull in all the other deps as specified in
the pom. I dont know if this can be done with your local repository
via the install:install-file goal.

Regards

Ben Short

[1] http://proximity.abstracthorizon.org/
[2] http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html


First, thanks for the link to Proximity!  I was trying (and failing) to 
get maven-proxy set up.  I'll try this tomorrow.


Second, I think you might underestimate my newbishness.  I'm pretty sure 
I can figure out how to get it installed.  What I can't figure out is 
what to actually put in the POM.  I know how to make a POM that creates 
a jar out of my own source code, but not how to make a POM that just 
uses a JAR that already exists.


--
Danny MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where should assembly descriptors really be stored?

2007-04-19 Thread Danny MacMillan

Hi,

The standard directory layout page says that assembly descriptors should 
go in src/main/assembly.  But the maven assembly plugin usage page says 
that assembly descriptors should go in src/assembly.  Which is actually 
preferred?


--
Dan MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie Question: How do I represent my current Ant builds with Maven?

2007-04-17 Thread Danny MacMillan

Lacoste, Dana wrote:

Once again, I'm far from the right person to provide should answers to
this, but as I understand it, maven really wants
one-pom:one-target:one-build-result-file ratios.  As in a single directory

 should build exactly one thing.


BUT

I do this kind of thing in several areas: build a .jar and a .zip that
packages everything up in the same directory.

So it _can_ be done, but as I understand it, it's not best practice.

...


Dana,

Thanks for both of your replies.  You've really helped me see that 
switching to Maven is an attainable goal, so I've decided to jump in 
with both feet.  Well, with one foot ... I'm using it on my next project.


I'm going to proceed with the plan to have one Maven project whose build 
product is a zip file that contains my jar containing original code, 
required 3rd party jars, and ancillary files.  It might not be perfect 
but I don't currently see any flaws, and the only thing that will let me 
see any flaws is experience, and the only way to get experience is to 
get started.


--
Danny MacMillan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Are there any predefined variables when filtering using the Assembly plugin?

2007-04-17 Thread Danny MacMillan

Hi,

From what I've read, you can include stuff from your POM when filtering 
resources by doing something like ${pom.artifactId} -- is the same 
facility available when filtering files in the assembly plugin?  It 
doesn't seem to work that way.


What I want to do is put a filter in a batch file I'm including in the 
assembly so that the name of my jar will be included.


Thanks,

--
Danny MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Newbie Question: How do I represent my current Ant builds with Maven?

2007-04-13 Thread Danny MacMillan

Hi,

I've looked at Maven, read quite a bit of the documentation, and I can't 
figure out quite how to represent my current typical Ant build with 
Maven.  Hopefully someone here can help me.


I write a lot of console utilities in Java.  These are comprised of the 
original code for the utility, that goes in a jar, 3rd-party libraries 
the utility uses, and ancillary files.  Today, my typical folder 
structure for one of these projects looks like this:


trunk (contains IDE project files, build.xml, build.properties)
trunk/dist (contains content to be deployed 'as is')
trunk/dist/doc (contains product documentation)
trunk/dist/etc (configuration files read at runtime)
trunk/dist/lib (holds 3rd-party jars)
trunk/dist/...
trunk/java (main source code)
trunk/test (test source code)

I have a 'deploy' target in my ant build that

 1. copies the contents of 'dist' to a staging area for deployment
 2. then compiles the java source into a jar
 3. copies the jar to the staging area dist/lib directory
 4. zips up the staging area

The product is a zip file I can take to a client's site and deploy by 
unzipping and editing a few configuration files (which exist in their 
unedited state in trunk/dist/etc) and possibly batch files (which exist 
in their unedited state in trunk/dist).


Everything I read about Maven suggests that there should be one build 
product per Maven project.  Okay, I can see creating a project just for 
the jar holding the compiled Java code, but I can't quite wrap my head 
around what I'm 'supposed' to do here for the non-Java source files (the 
batch files, the configuration files, etc.)  Switching to Maven becomes 
a non-starter because at a minimum I need to duplicate the functionality 
that is currently present in my ant builds.


I would appreciate any guidance or advice you can offer.

--
Danny MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie Question: How do I represent my current Ant builds with Maven?

2007-04-13 Thread Danny MacMillan

Lacoste, Dana wrote:

I'm far from the expert in dealing with this, but Maven's assembly
plugin will do what you need: make your staging area, populate it,
and zip it up in the end.

We do something similar: I need to produce an autorun CD image:
we build, with each jar having its own directory and maven pom,
and then a packaging pom that just generates .war files, and
then another packaging pom that generates a .zip of the CD image.

(It's much more complex than that in sheer number of components,
so I can't give you a sample directory structure easily, but
I'm sure someone else will speak up :)

Something like:

Parent\pom.xml - placeholder, effectively
   jar1\pom.xml- generates your .jar
   war1\pom.xml- generates your .war
   dist1\pom.xml   - generates an assembly putting all the pieces
together
   dist1\dist.xml  - descriptor
(http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html)
   dist1\resources - flat files needed in your assembly, referred
to in the pom

Does that help?

Dana Lacoste


Yes, thanks.

The assembly.html page you reference has certainly changed since the 
last time I looked at it.  Last time I read it it seemed to suggest 
assemblies were for creating different 'views' of the same information 
(e.g. a source distribution, a binary distribution, etc.)  Now it pretty 
plainly says it is the mechanism for doing exactly what I want :)  The 
documentation on the page looks a lot more complete, too.  I had 
considered the assembly plugin the last time I looked at this but I 
thought it would be counter to the design.  It's good to have 
confirmation that this is indeed what others are using to achieve this goal.


Would it be 'wrong' to merge the jar1 and dist1 folders (in your 
example) and their corresponding poms together?  The rationale for this 
question is that the jar being produced is nothing on its own.  It's not 
a library or a shared component of any kind.  Its reason for being is to 
provide an executable, which by its nature requires the contents of the 
resources directory.  My prejudicial response to what you outline is 
that it seems kind of complicated, but I'm open minded and happy to 
revise my opinion if I understand the value in the split.


Thanks for your (astonishingly prompt) answer.

--
Danny MacMillan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]