deploy:copy-deps
Hi, I have the following dependency declared in my project.xml : dependency groupIddrutt/groupId artifactIdDRUTT_ddr/artifactId version2/version jarDRUTT_ddr_v2.jar/jar /dependency I want to copy all my other dependencies using deploy:copy-deps. How can i declare that this one shouldn't be copied ? deploy:copy-deps needs dependency id's in his excludes list... What is the id of this one ? Sebastien BRUNOT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing the dependancies in maven.xml
Great that works fine. Cheers Neil -Original Message- From: Brian Ewins [mailto:[EMAIL PROTECTED] Sent: 15 July 2003 17:13 To: Maven Users List Subject: Re: accessing the dependancies in maven.xml You probably want 'pom.artifacts' if you want to get at the jar. 'pom.dependencies' is a list of dependencies, but you can always get to the dependency via the jar. eg j:forEach var=lib items=${pom.artifacts} j:set var=dep value=lib.dependency/ /j:forEach this would give you the artifacts (so lib.file would give you the jar) plus the dependency fields via the 'dep' object. Alternatively, if you really just want dependencies: j:forEach var=dep items=${pom.dependencies} /j:forEach does the trick. Neil Blue wrote: Hello, we are trying to access the collection of pom dependancies in the maven.xml file. Is there a variable we can access that will give us access to the dependancy jar information? Thanks Neil - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Class Loader problem (I suspect)
Hello all, I want to use external ant task in my maven.xml. I declare this : path id=jagtool.classpath j:forEach var=dep items=${pom.dependencies} j:if test=${dep.groupId == 'sybase'} pathelement location=${maven.repo.local}/${dep.groupId}/jars/${dep.artifact}/ /j:if /j:forEach /path ant:taskdef name=jag_connect classname=com.sybase.jaguar.management.jagtool.ant.ConnectTask ant:classpath ant:path refid=jagtool.classpath/ /ant:classpath /ant:taskdef ant:taskdef name=jag_gen_stubs classname=com.sybase.jaguar.management.jagtool.ant.GenerateStubsTask ant:classpath ant:path refid=jagtool.classpath/ /ant:classpath /ant:taskdef Then I want to use as this : goal name=serviceslayer:generate-stub ant:jag_connect host=${props} password=${props} port=${props} user=${props}/ /goal See the console output, in the attach file. (the windows output) I suspect the org.omg.CORBA.ORB is loaded in the parent classloader whereas the others are loaded by the ant loader. And the parent class loader can't load the com.sybase.CORBA.ORB which is in the ant loader. (In a solaris output, i obtain the message : --- Nested Exception --- org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.sybase.CORBA.ORB vmcid: 0x0 minor code: 0 completed: No at org.omg.CORBA.ORB.create_impl(ORB.java:297) at org.omg.CORBA.ORB.init(ORB.java:336) at com.sybase.jaguar.management.jagtool.JTContext.initialize(JTContext.java:125 ) at com.sybase.jaguar.management.jagtool.ant.ConnectTask.execute(ConnectTask.jav a:74) at org.apache.tools.ant.Task.perform(Task.java:341) at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128) at com.werken.werkz.Goal.fire(Goal.java:639) at com.werken.werkz.Goal.attain(Goal.java:575) at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:434) at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348) at org.apache.maven.cli.App.doMain(App.java:525) at org.apache.maven.cli.App.main(App.java:1088) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.werken.forehead.Forehead.run(Forehead.java:543) at com.werken.forehead.Forehead.main(Forehead.java:573) Caused by: java.lang.ClassNotFoundException: com.sybase.CORBA.ORB at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:217) at org.omg.CORBA.ORB.create_impl(ORB.java:295) ... 21 more Is it possible to extend the maven-classpath ? Thanks a lot, Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: deploy:copy-deps
I think it's drutt:DRUTT_ddr But i'm not sure :) -Message d'origine- De : BRUNOT Sébastien [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 juillet 2003 09:42 À : '[EMAIL PROTECTED]' Objet : deploy:copy-deps Hi, I have the following dependency declared in my project.xml : dependency groupIddrutt/groupId artifactIdDRUTT_ddr/artifactId version2/version jarDRUTT_ddr_v2.jar/jar /dependency I want to copy all my other dependencies using deploy:copy-deps. How can i declare that this one shouldn't be copied ? deploy:copy-deps needs dependency id's in his excludes list... What is the id of this one ? Sebastien BRUNOT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ce message est protege par les regles relatives au secret des correspondances ; il peut en outre contenir des informations a caractere confidentiel ou protegees par differentes regles et notamment le secret des affaires ; il est etabli a destination exclusive de son destinataire. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message, ou des informations qu'il contient, doit etre prealablement autorisee. Tout message electronique est susceptible d'alteration et son integrite ne peut etre assuree. Les AGF declinent toute responsabilite au titre de ce message s'il a ete modifie ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur de l'erreur de distribution et de la destruction du message. This message is protected by the secrecy of correspondence rules ; furthermore it may contain privileged or confidential information that is protected by law, notably by the secrecy of business relations rule ; it is intended solely for the attention of the addressee . Any disclosure, use, dissemination or reproduction (either whole or partial) of this message or the information contained herein is strictly prohibited without prior consent. Any electronic message is susceptible to alteration and its integrity can not be assured. AGF declines any responsibility for this message in the event of alteration or falsification.. If you are not the intended recipient, please destroy it immediately and notify the sender of the wrong delivery and the mail deletion. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : deploy:copy-deps
It doesn't work :-( -Message d'origine- De : GONNOT boris [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 juillet 2003 11:59 À : Maven Users List Objet : RE: deploy:copy-deps I think it's drutt:DRUTT_ddr But i'm not sure :) -Message d'origine- De : BRUNOT Sébastien [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 juillet 2003 09:42 À : '[EMAIL PROTECTED]' Objet : deploy:copy-deps Hi, I have the following dependency declared in my project.xml : dependency groupIddrutt/groupId artifactIdDRUTT_ddr/artifactId version2/version jarDRUTT_ddr_v2.jar/jar /dependency I want to copy all my other dependencies using deploy:copy-deps. How can i declare that this one shouldn't be copied ? deploy:copy-deps needs dependency id's in his excludes list... What is the id of this one ? Sebastien BRUNOT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ce message est protege par les regles relatives au secret des correspondances ; il peut en outre contenir des informations a caractere confidentiel ou protegees par differentes regles et notamment le secret des affaires ; il est etabli a destination exclusive de son destinataire. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message, ou des informations qu'il contient, doit etre prealablement autorisee. Tout message electronique est susceptible d'alteration et son integrite ne peut etre assuree. Les AGF declinent toute responsabilite au titre de ce message s'il a ete modifie ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur de l'erreur de distribution et de la destruction du message. This message is protected by the secrecy of correspondence rules ; furthermore it may contain privileged or confidential information that is protected by law, notably by the secrecy of business relations rule ; it is intended solely for the attention of the addressee . Any disclosure, use, dissemination or reproduction (either whole or partial) of this message or the information contained herein is strictly prohibited without prior consent. Any electronic message is susceptible to alteration and its integrity can not be assured. AGF declines any responsibility for this message in the event of alteration or falsification.. If you are not the intended recipient, please destroy it immediately and notify the sender of the wrong delivery and the mail deletion. -- - 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]
Re: own checkstyle
Check http://maven.apache.org/reference/plugins/checkstyle/properties.html for the description of all available properties. Regards Am Mittwoch, 16. Juli 2003 13:33 schrieb Kristine Weissbarth: hi, how can I integrate my own checkstyle.xml to be checked during the checkstyle report. What do I have to do with my checks_project.xml? I found out that the standart checks are situated in maven-1.0-beta-9/plugins/maven-checkstyle-plugin-2.0-SNAPSHOT.jar but how can I intergate my own check? Thanks. - 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]
Resources not going into proper directory in jar file.
I am a new user of Maven and most likely are simply missing something. I have this existing project structure src/package/images/group1/*.gif src/package/images/group2/*.gif src/package/*.java I want the contents of src/package/images to end up in the jar file under package/images/group1 and package/images/group2 I have the resource defined as resource directorysrc/package/images/directory includes include**/*.gif/include /includes targetpathpackage/images/targetpath /resource But all the images end up in the jar file at the root directory level. No package/images/group1 or package/images/group2 gets created. What is the proper way to get the gif files into the proper directories? Thanks in advance. -- Erik Husby Team Lead for Software Quality Automation Whitehead Institute/MIT Center for Genome Research Rm. 2192 320 Charles St Cambridge, MA 02141-2023 mobile: 781.354.6669 office: 617.258.9227 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resources not going into proper directory in jar file.
On Wed, 2003-07-16 at 09:31, Ben Walding wrote: You want: resource directorysrc/directory includes includepackage/images/**/*.gif/include /includes /resource No idea of whether that target path thing works or not, but it isn't required. target path works as it's used by Maven itself to package up the localized mesages. Erik Husby wrote: I am a new user of Maven and most likely are simply missing something. I have this existing project structure src/package/images/group1/*.gif src/package/images/group2/*.gif src/package/*.java I want the contents of src/package/images to end up in the jar file under package/images/group1 and package/images/group2 I have the resource defined as resource directorysrc/package/images/directory includes include**/*.gif/include /includes targetpathpackage/images/targetpath /resource But all the images end up in the jar file at the root directory level. No package/images/group1 or package/images/group2 gets created. What is the proper way to get the gif files into the proper directories? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- jvz. Jason van Zyl [EMAIL PROTECTED] http://tambora.zenplex.org In short, man creates for himself a new religion of a rational and technical order to justify his work and to be justified in it. -- Jacques Ellul, The Technological Society - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Getting current date/time?
You can use tstamp/ (which is an ant tag). It set 2 properties DSTAMP and TSTAMP with date and time (see ant documentation for more details) Ex: tstamp/ property name=log.filename value=log-${DSTAMP}.${TSTAMP}.log/ -Message d'origine- De : James CE Johnson [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 juillet 2003 16:27 À : [EMAIL PROTECTED] Objet : Getting current date/time? Hey all, Is there any way for my maven.xml to fetch the current date/time so that I can subsequently write (using echo...) it to a file? Thanks, James - 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]
automate versioning
Gang, I've been tasked with developing a build process and want to use Maven for numerous reasons. One of the primary requirements is to devise an automated versioning process that will append an updated version to each of the project jar files as they are generated. Then, when the master build is executed, in the depencencies it should default to the most recent versions unless it is manually over-riden by a property file. My initial thought was to use some type of date formate, such as abc-07162003.jar because our builds occur daily. But incase the decision is to version such as abc-1.0.1.jar I'm not sure how feasible this will be. Any suggestions from the gurus? Thanks
Re: codehaus.org samples
I've fixed this now. It was a permission problem inside the wiki, Cheers, Ben Kumar, Vaidhyanatha K. wrote: I am trying to test the sample webapp mentioned in http://wiki.codehaus.org/maven/CreatingWebApplications maven-war-example-1.0-dev-src.zip http://wiki.codehaus.org/maven/CreatingWebApplications?action=AttachFiledo=gettarget=maven-war-example-1.0-dev-src.zip . When I click on that link I get a unknown action. I tried saving. The zip is not in the correct format. Any alternate locations for this file? Thanks a lot Vaidhy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 1.0 beta 10 : Repositories
Just a question: I would like to understand what is the motivation to let Maven puts his repository onto ~/.maven ??? This would lead to as many repositories as connected users... Regards, Did. Andy Jefferson wrote: On Tue, 2003-07-15 at 22:08, Jason van Zyl wrote: The default value for maven.repo.local is now defined in the default.properties file and it has a value of: ${maven.home.local}/repository This will default to ~/.maven/repository So you can override the value of maven.repo.local to set it to whatever you desire but it now defaults to ~/.maven/repository to enable to use of shared repositories. Thanks Jason, I've set ~/build.properties and it finds the shared repository and downloads into that. The next problem I have is that I have 2 dependencies dependency groupIdxdoclet/groupId artifactIdxdoclet-ejb-module/artifactId version1.2b4/version urlhttp://xdoclet.sourceforge.net//url /dependency dependency groupIdxdoclet/groupId artifactIdxjavadoc/artifactId version1.0/version urlhttp://xdoclet.sourceforge.net//url /dependency In beta9 this went to the repository and found xdoclet/jars/xdoclet-web-module-1.2b4.jar xdoclet/jars/xjavadoc-1.0.jar In beta10 this finds the xdoclet/jars/xdoclet-web-module-1.2b4.jar BUT complains about the second one and seems to be looking for xdoclet/jars/xdoclet-xjavadoc-1.0.jar Is this correct behaviour ? Why is it putting the groupId as a prefix for the second one yet didn't add it on for the first one ? TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 1.0 beta 10 : Repositories
did wrote: Just a question: I would like to understand what is the motivation to let Maven puts his repository onto ~/.maven ??? This would lead to as many repositories as connected users... Regards, Did. I think locking is the problem... running as shared users might have inconsistent behaviours if two persons are building the same at the same time... Presumably (and at worst with java.nio), a better version will do this locking complete... imitating, for example, CVS, on this. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 1.0 beta 10 : Repositories
Excellent! Thanks Jason. Everything is more clear now for me. Did. Jason van Zyl wrote: On Wed, 2003-07-16 at 17:42, did wrote: Just a question: I would like to understand what is the motivation to let Maven puts his repository onto ~/.maven ??? This would lead to as many repositories as connected users... This is no different then it has been in the past but I'll explain the reasoning. As far as a repository per user, that's always been an option. So that each user has a single repository of artifacts as opposed to having a duplicated artifacts in lib/ directories of each build. One repository per user is a lot better than having N copies of xerces lying around. We made the new default directory for the repository ~/.maven so that it is easier to upgrade Maven when the repository isn't hiding inside $MAVEN_HOME. Upon inspection maybe this shouldn't have been made .maven as I'm not sure if this is still a problem for Windows users. I haven't used a Windows box in 5 years so I don't know. We also started using ~/.maven so that there was a place to expand the plugins so that there would be a local cache for each user and the base installation could be read-only. You can always override the property that controls where the local repository is. If you and your co-developers have a shared drive then you can share a local repository by pointing at a shared directory. Regards, Did. Andy Jefferson wrote: On Tue, 2003-07-15 at 22:08, Jason van Zyl wrote: The default value for maven.repo.local is now defined in the default.properties file and it has a value of: ${maven.home.local}/repository This will default to ~/.maven/repository So you can override the value of maven.repo.local to set it to whatever you desire but it now defaults to ~/.maven/repository to enable to use of shared repositories. Thanks Jason, I've set ~/build.properties and it finds the shared repository and downloads into that. The next problem I have is that I have 2 dependencies dependency groupIdxdoclet/groupId artifactIdxdoclet-ejb-module/artifactId version1.2b4/version urlhttp://xdoclet.sourceforge.net//url /dependency dependency groupIdxdoclet/groupId artifactIdxjavadoc/artifactId version1.0/version urlhttp://xdoclet.sourceforge.net//url /dependency In beta9 this went to the repository and found xdoclet/jars/xdoclet-web-module-1.2b4.jar xdoclet/jars/xjavadoc-1.0.jar In beta10 this finds the xdoclet/jars/xdoclet-web-module-1.2b4.jar BUT complains about the second one and seems to be looking for xdoclet/jars/xdoclet-xjavadoc-1.0.jar Is this correct behaviour ? Why is it putting the groupId as a prefix for the second one yet didn't add it on for the first one ? TIA - 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]
Re: 1.0 beta 10 : Repositories
You have to wonder if the shared local repo might be a useful thing to have in addition to personal local repo. personal local - shared local - remote repo1 - remote repo2 Items would only be copied into personal local if they came from remote repo * This is definitely a use case that codehaus would be able to use. i.e. shared untrusted users ;). It would also be highly applicable for a site such as sourceforge where you don't want to mirror multiple full local repos. Perhaps for maven2 / maven-new / maven-ng... Jason van Zyl wrote: On Wed, 2003-07-16 at 17:42, did wrote: Just a question: I would like to understand what is the motivation to let Maven puts his repository onto ~/.maven ??? This would lead to as many repositories as connected users... This is no different then it has been in the past but I'll explain the reasoning. As far as a repository per user, that's always been an option. So that each user has a single repository of artifacts as opposed to having a duplicated artifacts in lib/ directories of each build. One repository per user is a lot better than having N copies of xerces lying around. We made the new default directory for the repository ~/.maven so that it is easier to upgrade Maven when the repository isn't hiding inside $MAVEN_HOME. Upon inspection maybe this shouldn't have been made .maven as I'm not sure if this is still a problem for Windows users. I haven't used a Windows box in 5 years so I don't know. We also started using ~/.maven so that there was a place to expand the plugins so that there would be a local cache for each user and the base installation could be read-only. You can always override the property that controls where the local repository is. If you and your co-developers have a shared drive then you can share a local repository by pointing at a shared directory. Regards, Did. Andy Jefferson wrote: On Tue, 2003-07-15 at 22:08, Jason van Zyl wrote: The default value for maven.repo.local is now defined in the default.properties file and it has a value of: ${maven.home.local}/repository This will default to ~/.maven/repository So you can override the value of maven.repo.local to set it to whatever you desire but it now defaults to ~/.maven/repository to enable to use of shared repositories. Thanks Jason, I've set ~/build.properties and it finds the shared repository and downloads into that. The next problem I have is that I have 2 dependencies dependency groupIdxdoclet/groupId artifactIdxdoclet-ejb-module/artifactId version1.2b4/version urlhttp://xdoclet.sourceforge.net//url /dependency dependency groupIdxdoclet/groupId artifactIdxjavadoc/artifactId version1.0/version urlhttp://xdoclet.sourceforge.net//url /dependency In beta9 this went to the repository and found xdoclet/jars/xdoclet-web-module-1.2b4.jar xdoclet/jars/xjavadoc-1.0.jar In beta10 this finds the xdoclet/jars/xdoclet-web-module-1.2b4.jar BUT complains about the second one and seems to be looking for xdoclet/jars/xdoclet-xjavadoc-1.0.jar Is this correct behaviour ? Why is it putting the groupId as a prefix for the second one yet didn't add it on for the first one ? TIA - 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]
Re: Need suggestions...
I trieds, using b10, to put my tld into src/conf/META-INF/ However the tld is not included into the Jar. I use in my project.xml the following setup: !-- build information for the project -- build sourceDirectorysrc/main/java/sourceDirectory unitTestSourceDirectorysrc/test/java/unitTestSourceDirectory unitTest resources resource directorysrc/test/java/directory includesinclude**/*/include /includes excludesexclude**/*.java/exclude /excludes /resource /resources includes include**/*Test.java/include /includes /unitTest resources resource directorysrc/conf/directory includes include*.properties/include include*.tld/include /includes /resource /resources /build But got no tld on my jar. Only: 0 Thu Jul 17 02:51:18 CEST 2003 META-INF/ 430 Thu Jul 17 02:51:16 CEST 2003 META-INF/MANIFEST.MF 0 Thu Jul 10 22:22:14 CEST 2003 META-INF/LICENSE.txt 279 Thu Jul 17 02:51:16 CEST 2003 META-INF/INDEX.LIST Any idea? Thx, Did. Brian Ewins wrote: did wrote: Hi all, We are developping a JSP taglib project. In this project we would like to provide the following artifacts: - The taglib jar - The Tld definition file - A sample web site demonstrating the lib features. (A War containing the some extra java classes + the taglib jar + JSP resources) How can I drive Maven to generate 2 Artifacts (the jar and the demo war) ? What is the ideal directory layout? What is the related project.xml configuration? I thought of something like: src\ src\conf\file.tld src\java\com.myproject src\webapp\WEB-INF\... src\samples\com.myproject.samples src\ src\conf\META-INF\taglib.tld src\main\com\myproject JSP taglibs are designed so that if the tld is in the jar's META-INF, you don't need to distribute it separately, or declare it in your web.xml. In JSP 1.2 + 2.0, any .tld in META-INF is recognized this way, but in older JSP 1.1 systems only 'META-INF/taglib.tld' is recognized. Best practice is therefore to name your taglib as shown above. Distributing the tld in the jar is definitely the way to go as you guarantee that your jar and tld are in sync, and simplifies use of the taglib - no web.xml hacking. To use it just make sure that when you do: [EMAIL PROTECTED] prefix=foo uri=http://some/uri/i/just/made/up% in your JSP, the uri must match the uri in your TLD file. Best practice is to use the same URI for every version of your taglib, so that clients can drop a new version into their webapp without editing any files. I used 'main' not 'java' for the source dir above; you'll notice a lot of the plugins are now written that way. The point is that if you have e.g. 'java', 'test', 'webapp' - then 'test' contains java as well; and why would 'webapp' not be called 'jsp' or 'velocity'. 'main' is a slightly better description. This isnt a hard fast rule though, just a suggestion. You should also consider using xdoclet to generate your tld. Does it makes sense? Also notes I would not like to create 2 different projects with a reactor because the final artifact is just the Jar. The War is only for a demo and I think we should not distribute it in a binary repository. ... However I could go on to describe how to get this jar included in your demo webapp (a postGoal of war:webapp would be the way to go in b10, plus code to compile your 'extra' classes...) but frankly it is a lot easier to do with two projects and the reactor[1]. Don't fight what works. Its also useful to use the demo project for testing, e.g. using Cactus. Your setup will become horrendously complex if you try to do this while still working around generating the second artifact. Hope this helps -Baz Thanks for your help and for this great tools that is Maven! Didier. [1] it would be a little simpler if war:webapp built wars using the jar rather than the separate classes; but thats not how it works. You can also make building a demo webapp simpler if you keep the tld in the .war, not the .jar - all your 'preGoal' would need to do then is compile the extra code. But while this second approach makes building your demo app easier, it makes using/distributing your taglib harder. Whats more, the demo wouldn't be demoing the taglib as people would actually use it, i.e. by having the jar in the webapp, since it has the expanded classes. - 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]
Re: RE : Getting current date/time?
There's also a jelly format date tag too. See http://jakarta.apache.org/commons/jelly/libs/fmt/tags.html#fmt:formatDate -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ Work: http://www.multitask.com.au Andy Paul [EMAIL PROTECTED] wrote on 17/07/2003 05:13:21 AM: James, Just in case you're interested or want to do more formatting with the date, I believe this is a Jellified version where you can set up the format... !-- create a Java Date instance for 'today' -- new var=now className=java.util.Date/ !-- create a Java Date formatter -- new var=formatter className=java.text.SimpleDateFormat arg value=EEE dd/MM/yy/ new !-- create a new jelly variable (xx) from the output of putting the date through the formatter -- invoke var=xx on=${formatter} method=format j:arg value=${now}/ /j:invoke !-- display the variable -- The time according to jelly is ${xx} Regards Andy You can use tstamp/ (which is an ant tag). It set 2 properties DSTAMP and TSTAMP with date and time (see ant documentation for more details) Ex: tstamp/ property name=log.filename value=log-${DSTAMP}.${TSTAMP}.log/ Great! That's exactly what I was after and I just couldn't find it. -Message d'origine- De : James CE Johnson [mailto:[EMAIL PROTECTED] Envoyé : mercredi 16 juillet 2003 16:27 À : [EMAIL PROTECTED] Objet : Getting current date/time? Hey all, Is there any way for my maven.xml to fetch the current date/time so that I can subsequently write (using echo...) it to a file? Thanks, James - 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]