It is my honor :-), but where is the new patch to apply ???
On 6/21/07, Karan Malhi <[EMAIL PROTECTED]> wrote:
Thats because you are running mvn from within the openejb-standalone module. From within the module we are running all phases of the lifecycle, however ff you run it from the root, it should not work. This is because the assembly package phase is bound to the attached goal, which attaches it to a multi-module build process. So , if the build is done from the root, some parent pom would have executed the resources:resources and not found the resources to copy to the target assemblies archive file (this is where i got around by explicitly calling the resources plugin in the package phase of the build) So if a new user comes in and does mvn -Dassemble clean install, without applying the change it should not work. I also noticed something strange in your maven output, the resources plugin gets executed "after" the assembly plugin. In the build of the pom.xml, I had added the resources plugin "before" the assembly plugin, and from my little exeperience with maven, i thought the sequence in which the plugins are defined, are the sequence in which they should be executed. I am getting this behaviour on my machine (win xp), and am surprised to see its behaviour change on a non-windows machine. Maybe its a bug or something, but I am really not happy with this behaviour of maven. One thing I am glad about is that you are very careful and helpful with the process of submitting and committing the patch. Thanks for all the help On 6/21/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote: > The console output is attached, and BTW the shell script files are filtered > and added to the distros without applying your latest change !!! > > > On 6/21/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote: > > Sure, but now cauz I am preparing to go to work :-) > > > > > > > > On 6/21/07, Karan Malhi < [EMAIL PROTECTED]> wrote: > > > Can you send me your maven console output? > > > > > > On 6/20/07, Karan Malhi < [EMAIL PROTECTED]> wrote: > > > > I am not sure why it is not working for you. Its working fine for me, > > > > I have tested it multiple times > > > > > > > > On 6/20/07, Mohammad Nour El-Din < [EMAIL PROTECTED]> wrote: > > > > > Yeah I know that, but it didn't work for me, I mean when you use the > > > > > target/classes it is not included in the *.zip or *.tar.gz files ??? > Any > > > > > explanation for that ? > > > > > > > > > > On 6/20/07, Karan Malhi <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Nice catch!! > > > > > > > > > > > > I have attached a new patch. I had to revert back to > target/classes. > > > > > > Below is an explanation of why it has to be reverted back to > > > > > > target/classes. I will explain the various sections of the pom.xml > in > > > > > > openejb-standalone module (see the comments before each plugin in > the > > > > > > build element) > > > > > > <!-- This plugin basically picks up the files from > src/main/resources > > > > > > and copies them to target/classes. In the process it uses a > directory > > > > > > target/archive-tmp where it first puts the "filtered" versions of > the > > > > > > files from src/main/resources. Then it copies those "filtered" > > > > > > versions to target/classes> --> > > > > > > <plugin> > > > > > > > <artifactId>maven-resources-plugin</artifactId> > > > > > > <version>2.2</version> > > > > > > <executions> > > > > > > <execution> > > > > > > <id>filter-resources</id> > > > > > > <phase>package</phase> > > > > > > <goals> > > > > > > <goal>resources</goal> > > > > > > </goals> > > > > > > </execution> > > > > > > </executions> > > > > > > </plugin> > > > > > > <!-- This plugin creates the assembly. This will use the > descriptor in > > > > > > src/main/assembly/bin.xml --> > > > > > > <plugin> > > > > > > > > > > > > > <artifactId>maven-assembly-plugin</artifactId> > > > > > > > > > > > > <version> 2.1</version> > > > > > > > > > > > > <executions> > > > > > > > > > > > > <execution> > > > > > > > > > > > > <id>assembly-bin-distributions</id> > > > > > > > > > > > > <phase>package</phase> > > > > > > > > > > > > <goals> > > > > > > > > > > > > <goal>attached</goal> > > > > > > > > > > > > </goals> > > > > > > > > > > > > </execution> > > > > > > > > > > > > </executions> > > > > > > > > > > > > <configuration> > > > > > > > > > > > > <descriptors> > > > > > > > > > > > > > <descriptor>src/main/assembly/bin.xml</descriptor> > > > > > > > > > > > > <!-- Creates some bizarre file --> > > > > > > > > > > > > <!-- > descriptor>src/main/assembly/test.xml</descriptor --> > > > > > > > > > > > > </descriptors> > > > > > > > > > > > > <archive> > > > > > > > > > > > > <manifest> > > > > > > > > > > > > <mainClass>org.apache.openejb.test.Main </mainClass> > > > > > > > > > > > > </manifest> > > > > > > > > > > > > </archive> > > > > > > > > > > > > <finalName>openejb-${pom.version}</finalName> > > > > > > > > > > > > </configuration> > > > > > > > > > > > > </plugin> > > > > > > <!-- This is the last plugin to execute the run goal in the > package > > > > > > phase. This just removes the target/archive-tmp and target/classes > > > > > > directories which were required temporarily by > maven-resources-plugin > > > > > > and maven-assembly-plugin above --> > > > > > > <plugin> > > > > > > > <artifactId>maven-antrun-plugin</artifactId> > > > > > > <version>1.1</version> > > > > > > <executions> > > > > > > <execution> > > > > > > <id>cleanup-target</id> > > > > > > <phase>package</phase> > > > > > > <configuration> > > > > > > <tasks> > > > > > > <delete dir='${basedir}/target/classes' /> > > > > > > <delete > dir='${basedir}/target/archive-tmp' /> > > > > > > </tasks> > > > > > > </configuration> > > > > > > <goals> > > > > > > <goal>run</goal> > > > > > > </goals> > > > > > > </execution> > > > > > > </executions> > > > > > > </plugin> > > > > > > > > > > > > Now here is the explanation for specifying target/classes in > > > > > > src/main/assembly/bin.xml. Since the resources plugin is executed > > > > > > first, it copies the "filtered" files to target/classes. We just > need > > > > > > to make sure that we pick up the filtered versions of the files > > > > > > instead of the "unfiltered" versions in src/main/resources . Hence > we > > > > > > do something like below (in bin.xml): > > > > > > <fileSet> > > > > > > <directory>target/classes</directory> > > > > > > <includes> > > > > > > <include>README*</include> > > > > > > </includes> > > > > > > <outputDirectory>beans/</outputDirectory> > > > > > > </fileSet> > > > > > > > > > > > > So in the above we are basically saying that "Copy the README.xxx > file > > > > > > from the target/classes directory and paste it in the beans > directory > > > > > > of the zip or tar.gz file". This README.xxx is the filtered > version of > > > > > > the file. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 6/20/07, Mohammad Nour El-Din < [EMAIL PROTECTED] > > wrote: > > > > > > > Well it worked by making the assembly plugin to look for files > into the > > > > > > > src/main/resources dir, I will commit that, but I will make the > JIRA > > > > > > open > > > > > > > and assigned to you for further comments, and when done we can > close it. > > > > > > > Thanks a lot Karan :-). > > > > > > > > > > > > > > On 6/20/07, Mohammad Nour El-Din < [EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > > Done man, revision 549000 , filtering works, but there is > something > > > > > > new > > > > > > > > happens, the openejb sheel script the only file I have in the > /bin dir > > > > > > under > > > > > > > > the *.zip and *.tar.gz files. I guess it is something related > to maven > > > > > > > > assembly plugin too, cauze in the bin.xml all files should be > looked > > > > > > for > > > > > > > > in the target/classes dir except the openejb shell sript one, > which is > > > > > > > > looked for in the src/main/resources dir. I will try it out > and till > > > > > > you. I > > > > > > > > will not colse the OPENEJB-595 issue till we solve this > problem. > > > > > > > > > > > > > > > > On 6/19/07, Karan Malhi <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > I have submitted a patch for the filtering issue in maven. > created a > > > > > > > > > new jira for this and attached the patch. Please test the > patch and > > > > > > > > > let me know if you face any issues. Suggestions welcome :) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > Karan Malhi > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Thanks > > > > > > > > - Mohammad Nour > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > Thanks > > > > > > > - Mohammad Nour > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Karan Malhi > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Thanks > > > > > - Mohammad Nour > > > > > > > > > > > > > > > > > -- > > > > Karan Malhi > > > > > > > > > > > > > -- > > > Karan Malhi > > > > > > > > > > > -- > > Thanks > > - Mohammad Nour > > > > -- > Thanks > - Mohammad Nour > -- Karan Malhi
-- Thanks - Mohammad Nour