On Thu, Jan 29, 2009 at 5:37 AM, Karl Heinz Marbaise <khmarba...@gmx.de> wrote: > Hi David, >> >> Thanks for your help. I kept seeing the assembly file referenced, but >> nothing too much on where it should be. > > http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) > > Isn't this enough ? Or do i misunderstand things ?
That was handy, but when you're reading what is suppose to be the definitive Maven reference book on Assemblies, and the book doesn't mention whether or not the Assembly file is suppose to be a separate file or where it is stored... Well, you can see why I can get frustrated. There may be a lot of information about Maven out there, but it can be difficult to track down. For example, I spent hours on the distribution plugin: <http://maven.apache.org/maven-1.x/plugins/dist/goals.html> which I found doing a Google search. I just couldn't get it to work. I finally decided that maybe I have to put the plugin into my local repository, went to the download page and suddenly realized not one of those links points to a downloadable distribution plugin file. Each one was one 404 error after another. (Yes, I now realize that this is a Maven 1.x plugin). When I went up the Maven web page hierarchy, I discovered that this plugin was not listed. <http://maven.apache.org/plugins/index.html>. So, I then looked at the Packaging Types/Tools since a tarball is a type of package. I then played with the shade type since it says this is an "Uber-Jar", I thought maybe that's a way to package things instead of using tarballs or zip files. Spent another few hours playing with that. It took me a while to realize what I wanted to do was to create an "Assembly". It is certainly difficult to look at the description of an Assembly on Maven's plugin page to realize that this would be a tool you need in order to actually build a tarball or zip file. It isn't even listed under packaging tools. However, once I realized I wanted to create an Assembly, I could start reading the chapter on Assemblies in Maven -- The Definitive Guide. But as I mentioned above, the book doesn't seem to mention where assembly files are stored or even if they are a separate file from your POM. It isn't that I am new at using open source software world. Nor, do I expect to be trained or have people do my work for me. But, Maven is an extremely complex piece of software and the documentation is not well organized. Take a look at Subversion. One of the reasons Subversion has done so well is that it has excellent documentation. The definitive Subversion book isn't merely a reference, but a well written step-by-step manual explaining how Subversion is used. It then goes through administration, explaining possible gotchas, and gives some nice examples. The FAQ section is quite clear. Ant's documentation isn't quite as nice, but at least it gives some nice examples on how the various tasks are used. It took me a while to learn Ant, but I was able to through the web page. Plus, there are a lot of excellent books on Ant. The whole purpose of Maven was to eliminate the need for me, the CM, to do the build scripting. I've spent most of my career writing or helping developers to write makefiles and later on Ant build scripts. Most of the time, it falls on me to do this type of work. Maven was suppose to be a way for developers not to worry about how builds happen because Maven will take care of it. Now, I am sitting around and writing Maven POMs for my developers. And, because the way Maven works, I now have to fiddle with the source code, something I didn't have to do with Ant and Makefiles. Our developers hate Maven and simply find it incomprehensible. Here's the latest request from one of our developers: > Thanks for arranging the folder structure to generate > deployable artifact as per requirement. We have taken > latest code from SVN. We need following change in > generated 'target' folder when we run the 'mvn compile' < command. > 1) Generated 'target' folder contains 'test-classes'. > But some of the test cases are failing because they have > dependency on 'conf' and 'data' folders. Can you please > modify the maven script such a way that it will put 'conf' > and 'data' into 'target\test-classes\' Why in the F in RFTM am I responsible for this? I was doing this for developers in Ant build.xml files. Maven is suppose to take me out of the picture! So, please understand my frustration. I am not a developer, and this is the first time I am working with Maven. Once you get the hang of everything in Maven, it might be easier to understand and tweak things the way you want. But, Maven is a difficult piece of software to understand, and the documentation for Maven is still in a rather preliminary state. > >> There are two issues I am having: >> >> 1). In the tarball, the "lib" directory is owned by build/user, but >> the bin and conf directory is owned by 0/0. Is there a way to set >> this? I didn't see anything in the Assembly settings. > > http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_fileSet > You should take a look at the filemode ... > Hm. under which user are you running maven ? I actually am using filemode, and it is setting the file mode for these files. However, it seems that the username and usergroup are being set to 0/0. I don't think this is due to the filemode parameter because this was happening before I used it. And, yes, the username and groupname are being set on the lib folder to the username and groupname I am logged in as. But, the question is why does the "lib" folder get set to build/users while the bin and conf get set to 0/0? And, how can I set this? In Ant, there were parameters in the tar task that allowed me to set the user and group. I didn't see anything in the Maven assembly parameters.. > >> 2). My boss wants to know why is the assembly file called bin.xml. I >> told him because the assembly file is a "bin" type, and you name the >> assembly file after the assembly type. He wants to see documentation >> to this effect. Is there such documentation? I know you can call your >> assembly file anything you want, but if this is the Maven standard, I >> want to stick with it. > > First you can call it the way you like but there are some defaults in there > http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html#descriptorRefs > > Or in Maven: The definitive Guid at section "Predefined Assembly > Descriptors"...you can see things linke bin are referenced... Once I saw what Assemblies were, I was able to search for assembly files that happen to be on the Internet. I found a lot of examples, and it became obvious that they were named bin.xml. After a while, I realized why since you can have multiple assemblies, and this assembly is a "bin" type. Unfortunately, my boss thought the name was confusing. I pointed out this was "standard" practice and he wanted to see the actual written standard. I think I convinced him why it is done that way. I pointed out that the file is already stored in a directory called "assemblies", and that projects can have multiple assembly files (for example, source code distribution, and tarball distribution. He was reasonably happy with that. -- David Weintraub qazw...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org