I don't think Simon is telling you to use Ant's jar command -- instead he is suggesting that you use Ant's <delete> task to physically remove the unwanted files out of /target/ before allowing Maven to do its own packaging step. (Right, Simon?) You would probably want to bind this to prepare-package as you have done below.
Here's the Ant Delete task page: http://ant.apache.org/manual/CoreTasks/delete.html Also, you should be using -X to get full debugging information. And if it "doesn't work" this time, please reply back with a lot more details about what exactly happened when you tried this eg what errors were reported, what seemed to happen, etc. Simply saying "it didn't work" tells us absolutely nothing about what actually happened vs what you were expecting etc. Wayne On 1/10/08, amit kumar <[EMAIL PROTECTED]> wrote: > Hi Simon, > Being totally unaware of ANT although I tried but of no use. > I used this with google's help > > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <phase>prepare-package</phase> > <configuration> > <tasks> > <target name="jar-file" depends="compile-src,copy"> > <jar destfile="${root}/target/file.jar" basedir="${build}" > excludes="*.xsd,*.xsb" /> > </target> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > > > Where am I lacking? > > > Regards, > Amit > > On Jan 10, 2008 9:45 PM, amit kumar <[EMAIL PROTECTED]> wrote: > > > Hi, > > I have downloaded the patches from the link mentioned by you. But I don't > > know how to apply them. > > > > regards, > > Amit > > > > > > On Jan 10, 2008 6:29 PM, Olivier Lamy < [EMAIL PROTECTED]> wrote: > > > > > Hi, > > > No you don't miss something here. > > > It's a know issue [1] and it's fixed in trunk. > > > You can try last snapshot to test the fix. > > > > > > -- > > > Olivier > > > [1] http://jira.codehaus.org/browse/MJAR-30 > > > > > > 2008/1/10, amit kumar < [EMAIL PROTECTED]>: > > > > HI, > > > > Just like WAR can I as well exclude some files from JAR builds as > > > well? > > > > > > > > I have used this, but not working. > > > > > > > > </plugin> > > > > <plugin> > > > > <groupId>org.apache.maven.plugins</groupId> > > > > <artifactId>maven-jar-plugin</artifactId> > > > > <version>2.1</version> > > > > <executions> > > > > <execution> > > > > <goals> > > > > <goal>jar</goal> > > > > </goals> > > > > </execution> > > > > </executions> > > > > <configuration> > > > > <excludes>**/*.xsd</excludes> > > > > <schemaDirectory>src/schema/xsd</schemaDirectory> > > > > </configuration> > > > > </plugin> > > > > > > > > Am I missing something? > > > > > > > > Amit > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
