RE: help needed with maven antrun plugin
On Yesterday at 1:26pm, PA=>Pankaj Agarwal wrote: PA> Here's the exact error. PA> PA> [INFO] PA> PA> [ERROR] BUILD ERROR [INFO] PA> PA> [INFO] An Ant BuildException has occured: The following error occurred PA> while executing this line: build.xml:118: PA> com.bea.util.jam.internal.javadoc.JavadocClassloadingException: An PA> error has occurred while invoking javadoc to inspect your source Here's my experience. I don't remember when I added this, but here is what I use as a dependency for the maven-antrun-plugin: sun.jdk tools 1.6 system ${java.home}/../lib/tools.jar Works for me, YMMV. Hope that helps. -- Haroon Rafique - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close
Hi there, Sorry for breaking the threading in your email reader, but I just found the fix for the above subject and alas I don't have the original thread to reply to. In any case, you may look at the thread discussion at nabble: http://old.nabble.com/maven-ant-run-plugin-1.3-error-java.lang.NoSuchMethodError:-org.apache.tools.ant.util.FileUtils.close-td25806467.html The root cause is that the OP (Doug Daniels) is using, ant-contrib in maven-antrun-plugin. The fix is to add an exclusion for ant:ant in the dependency for ant-contrib, as by default it uses ant-1.5. E.g., use: ant-contrib ant-contrib ${ant-contrib.ver} ant ant This way, whatever dependency is specified by maven-antrun-plugin will be kick in. Hope it helps someone. Cheers, -- Haroon Rafique - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
scpexe verbose output (how to suppress)
Hi, I'm using maven 2.0.9 on sun jdk 1.6.0_11 on a linux machine. I'm also using the maven-upload-plugin (1.1) to copy an .ear file to an external machine using the upload goal. The section of that plugin has a scpexe://server.ip/directory/path. I also have password-less ssh key-based login working for that user (no problems there). All in all, everything works fine. Except for one minor detail. The verbose output produced (by scpexe?? or maven??) during the file upload (consisting of a single line with bunch of ) is a little annoying. We are using continuous integration and to look at 6,829 # marks all on one line causes fair bit of horizontal scrolling (the .ear in question is to the tune of 27MB). 1) Is this the right place to look for answers? 2) If yes, does anyone know what's responsible for printing those # marks and how to suppress them? Thanks, -- Haroon Rafique - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: [SURVEY] How does your team retrieve artifacts?
[X] Our team uses HTTP to retrieve our artifacts -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [2.0.9 RC7] Release Candidate testing
On Yesterday at 5:52pm, BEF=>Brian E. Fox <[EMAIL PROTECTED]> wrote: BEF> Thank you everyone for the testing and confirmatory responses so far. BEF> It helps to gauge the progress. There was one regression identified BEF> in 2.0.9 RC6: (MNG-3495: NPE at BEF> org.apache.maven.wagon.repository.Repository.hashCode). This has been BEF> fixed and RC7 posted. BEF> BEF> [..snip..] +1 No problems with my projects Thanks, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
surefire 2.4.2 fixes manifest issue (was Re: [ANN] Maven Surefire Plugin 2.4.1 for Maven 2 Released)
On Feb 7 at 6:01pm, DF=>Dan Fabulich <[EMAIL PROTECTED]> wrote: DF> [..snip..] DF> DF> Ah, hearing that makes me strongly suspect that this is SUREFIRE-445 and DF> SUREFIRE-451. DF> DF> http://jira.codehaus.org/browse/SUREFIRE-445 DF> http://jira.codehaus.org/browse/SUREFIRE-451 DF> DF> Thanks for doing this research; I've moved these bugs into the upcoming DF> 2.4.2 release. DF> DF> -Dan DF> Hi Dan, I can report that my earlier reported problems with jdk 1.6 and surefire 2.4.1 and errors with the manifest have now been fixed with surefire 2.4.2. Running under cruisecontrol with surefire 2.4.2 and the jdk 1.6, I no longer get the manifest related errors. Regards, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
surefire-booter manifest issue (was Re: Surefire 2.4.1 classpath order)
On Today at 4:50pm, ak=>amit kumar <[EMAIL PROTECTED]> wrote: ak> Hi, ak> I have another related query regarding surefire, all of a sudden from ak> today we started getting this error while executing JUnit tasks, the ak> compilation of source file happens fine and the when compiling the ak> test source files, the maven gives build failure telling that it was ak> not able ak> Its not exactly related but you might be running into: http://jira.codehaus.org/browse/SUREFIRE-451 Its been fixed and should be in 2.4.2 (I have no idea when it will be released. I am not a committer). You can read the last comment on the jira which points you to a previous thread on the mailing list: http://jira.codehaus.org/browse/SUREFIRE-451#action_122858 ak> ak> to load main class from ak> C:\WINDOWS\TEMP\surefirebooter59557.jar ak> ak> What is going wrong here? ak> Could someone please help on this? ak> ak> Regards, ak> Amit ak> Cheers, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Maven Surefire Plugin 2.4.1 for Maven 2 Released
On Today at 3:30pm, DD=>Donnchadh Ó Donnabháin <[EMAIL PROTECTED]> wrote: DD> Hi Dan, DD> DD> When I switch from surefire 2.4 to 2.4.1 I get the error below. DD> /tmp/surefirebooter22682.jar doesn't seem to even exist. Any idea what DD> might be causing this? DD> Not knowing much about surefirebooter, I can at least tell you (paraphrasing here) that the /tmp/surefirebooter*.jar files are created at runtime and then deleted when the test is over. If you run with mvn -X, the /tmp/surefirebooter*.jar will be left in tact to aid in the debugging process. For me when the error about "Failed to load Main-Class manifest attribute from /tmp/surefirebooter???.jar" appeared, I re-ran the tests with mvn -X and then opened up the /tmp/surefirebooter???.jar file. It is a .jar file with only one entry META-INF/MANIFEST.MF. Inside the MANIFEST.MF there are 2 entries. Class-Path and Main-Class. Sure enough, the file was in tact, yet surefirebooter would say it can't find the Main-Class. You can even try the actual "java -jar /tmp/surebooter???.jar ." command and it still failed. Looking a little bit more, I was able to extract the MANIFEST.MF file and change its format from "dos" to "unix" in vim and repackaged it back into a jar and sure enough the "java -jar /tmp/surefirebooter???.jar ." command was able to run. This is as far as I've gotten so far. Two other data points: 1) Problems are fixed when dropping jdk to 1.5.0_14 2) Problem only appears running inside cruisecontrol (not on the command line) I would be tempted to file a jira but my project is pretty big and I'm finding it absolutely difficult to localize the issue so that I can present a minimal test case. So, with the information that I have provided to you so far, hopefully you can provide a minimal test case :-) (or at least, I can wish). Regards, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Maven Surefire Plugin 2.4.1 for Maven 2 Released
On Today at 3:30pm, DD=>Donnchadh Ó Donnabháin <[EMAIL PROTECTED]> wrote: DD> Hi Dan, DD> DD> When I switch from surefire 2.4 to 2.4.1 I get the error below. DD> /tmp/surefirebooter22682.jar doesn't seem to even exist. Any idea what DD> might be causing this? DD> DD> Thanks DD> DD> Donnchadh DD> Funny that you mention that. It happens for me too on jdk 1.6.0_04 but only when running under cruisecontrol. I'm on maven 2.0.8, surefire 2.4. Later, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
On Today at 9:56am, HR=>Haroon Rafique <[EMAIL PROTECTED]> wrote: HR> HR> Hi Nico, HR> HR> Could you add another js tool to the list? I haven't started using it, but HR> it also looks promising in the link/compress category. HR> HR> Its the yuicompressor-maven-plugin HR> http://alchim.sourceforge.net/yuicompressor-maven-plugin/overview.html HR> based on YUICompressor: HR> http://www.julienlecomte.net/blog/2007/09/28/yui-compressor-version-221-now-available/ HR> http://www.julienlecomte.net/yuicompressor/ HR> Sorry for the noise. I looked up my sourceforge ID and reset the password and updated the wiki with an entry for YUI Compressor Maven Plugin. Cheers, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using maven for JavaScript projects
On Today at 7:09am, ndl=>nicolas de loof <[EMAIL PROTECTED]> wrote: ndl> I've created a wiki entry ndl> (http://hammerfest.wiki.sourceforge.net/mavan-javascript-tools) ndl> to resume the ideas exposed in this thread. ndl> ndl> please be nice and don't blame me for my ugly english ;-) ndl> (any native english reader is welcome to fix my linguistics errors) ndl> Hi Nico, Could you add another js tool to the list? I haven't started using it, but it also looks promising in the link/compress category. Its the yuicompressor-maven-plugin http://alchim.sourceforge.net/yuicompressor-maven-plugin/overview.html based on YUICompressor: http://www.julienlecomte.net/blog/2007/09/28/yui-compressor-version-221-now-available/ http://www.julienlecomte.net/yuicompressor/ ndl> Nico ndl> Later, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TestCase and resources in src/main/webapp
On Yesterday at 9:05pm, =>[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: [..snip..] this doesn't work as "src/main/webapp/" is not on the classpath. Is there a way to tell maven to have src/main/webapp on its classpath? Or what else is best practice to test resources in src/main/webapp? kind regards, janning Hi Janning, You cannot achieve this with the current surefire. We do it by patching surefire. Essentially, by using the patch: http://jira.codehaus.org/secure/attachment/23139/additionalClasspaths.patch from this JIRA item: http://jira.codehaus.org/browse/SUREFIRE-118 surefire now has the capability to add additional classpath elements. If you like this feature, vote for this jira item. I have been using this patch for about almost a year now. In our case our plugin config looks something like: maven-surefire-plugin ${surefire.ver} src/main/webapp You can add more nodes based upon your needs. Hope that helps. Cheers, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] add resources to surefire execution
On Friday at 8:03am, DT=>Dan Tran <[EMAIL PROTECTED]> wrote: DT> perhaps make a request to to surefire plugin to allow addition of classpath DT> DT> -D DT> Bug report exists already: http://jira.codehaus.org/browse/SUREFIRE-118 Please vote for it. -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant-Contrib foreach in Maven 2
On Today at 5:05pm, HR=>Haroon Rafique <[EMAIL PROTECTED]> wrote: HR> I have the following in the section of my pom HR> HR> HR> ant-contrib HR> ant-contrib HR> 0.6 HR> provided HR> HR> The maven2 official repos have the following versions: 1.0b2 20020829 I decided to put 0.6 in my internal repo (which is how maven finds it now in my project). HR> HR> [..snip..] HR> -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant-Contrib foreach in Maven 2
On Today at 11:30am, MAUGM=>Morgovsky, Alexander (US - Glen Mills)...: AM> I am trying to create an Ant task using the maven-antrun-plugin in AM> Maven 2. I would like to use the optional task foreach. In Ant, I AM> did this by declaring the Ant-Contrib jar in a taskdef object in the AM> build.xml. How may I do this in Maven 2? Thanks. AM> AM> I have the following in the section of my pom ant-contrib ant-contrib 0.6 provided then in my maven-antrun-plugin section, I have the following: .. Hope this helps. -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resource filtering using environment variables
On Today at 11:20am, HR=>Haroon Rafique <[EMAIL PROTECTED]> wrote: HR> [..snip..] HR> Something like the following should work (not tested): import org.codehaus.plexus.util.cli.CommandLineUtils; HR> filterProperties = new Properties(); HR> HR> // System properties HR> filterProperties.putAll( System.getProperties() ); HR> HR> // Project properties HR> filterProperties.putAll( project.getProperties() ); HR> follow the above two calls with: // Environment variables filterProperties.putAll( CommandLineUtils.getSystemEnvVars() ); Anyone willing to give it a try? Later, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resource filtering using environment variables
On Today at 2:08am, GT=>Gareth Tilley <[EMAIL PROTECTED]> wrote: GT> GT> Hi All, GT> GT> Gunther Popp-2 wrote: GT> - All (platform-specific) Environment variables (Just add the prefix GT> env. For example ${env.M2_HOME} returns the Maven2 installation path). GT> GT> Has anyone actually been able to get this working? All of the filtering GT> works fine for me, but the environment variable stuff does not. As a test I GT> have a properties file that contains: GT> ${env.JAVA_HOME} GT> ${user.home} GT> ${pom.version} GT> GT> After the process-resources phase (with filtering turn on in the pom), the GT> file looks like this: GT> ${env.JAVA_HOME} GT> /home/build GT> 1.2-SNAPSHOT GT> GT> JAVA_HOME is definitely set, is there something I am doing wrong, or does GT> this just not work? GT> GT> Regards GT> Gareth GT> Hi Gareth, Environment variables tend to be second-class citizens in my experience. See my earlier post about profile activation based on environment variables: http://www.nabble.com/profile-activation-based-on-environment-variables-t2585492s177.html In addition, looking at the source for ResourcesMojo.java http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java?revision=422969&view=markup we see that there is no mention of environment variables during filtering (just system properties and project properties): filterProperties = new Properties(); // System properties filterProperties.putAll( System.getProperties() ); // Project properties filterProperties.putAll( project.getProperties() ); I am not familiar with the maven codebase at all, but I might try my luck with figuring this out (when I get some spare time). Later, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: profile activation based on environment variables
On Today at 11:07am, AB=>Arnaud Bailly <[EMAIL PROTECTED]> wrote: AB> [..snip..] AB> AB> Not sure but I think that what you call environment variables are AB> actually system properties set on maven's cli: Try AB> AB> AB> AB> BLAH AB> blah AB> AB> AB> AB> mvn -DBLAH=blah help:active-profile AB> AB> AB> HTH Hi Arnaud, Thanks for the reply, but I'm positive I want environment variables and not system properties. From http://maven.apache.org/settings.html env.X: Prefixing a variable with "env." will return the shell's environment variable. For example, ${env.PATH} contains the $path environment variable (%PATH% in Windows). I believe this has been in maven since 2.0.1+ (was implemented via MNG-1525). http://jira.codehaus.org/browse/MNG-1525 Any more insight would be helpful. Regards, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
profile activation based on environment variables
Hi, I'm using maven 2.0.4 on a Gentoo Linux machine. Does anyone have experience in activating profiles based on environment variables? I figure using the env prefix would do the trick. So, far I have tried: haroon-workstation env.BLAH blah /www/tomcat After setting: export BLAH=blah and execuging: mvn help:active-profile I still get: [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'ca.utoronto.sis:sws:war:1.0': There are no active profiles. On an aside, the only way I can activate that profile is to use !env.BLAH: haroon-workstation !env.BLAH /www/tomcat Is this a bug? Should I raise a jira issue? What I'm eventually trying to do is to do some per host profile activation, so I was thinking of using env.HOSTNAME as the activation. Any ideas to do something similar? Thanks, -- Haroon Rafique <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]