Maven parallel build with selective dependency exclusions
Hi, I have a multi-module project and I want to create a shorter version of the build that selectively builds a sub-set of the modules. I am using a maven profile for this. So if total I have module a, b, c, d and e, in a profile I have a module list of a, b and c. The module c's pom.xml has a dependency on d which I don't want to build, and even if I have to build I do not want to execute its Testcases. The optional = true doesn't work and if a dependency exclusion in the profile is not working either. So how can I write a profile to either skip d and e but still build 'c' or execute Testcases (cucumber testcases + Junit) for a, b and c but just compile d and e if I have to. Appreciate your help, -Ashish
Managing module dependency in Maven parallel build
Hi, (I just subscribed to the mailing list so would appreciate if you could reply directly to my email address too) I am trying out the parallel build feature of Maven 3. My project is divided into multiple modules and one of the module generates a deployable zip file. Another module takes this zip file and runs some deployment and performance tests. This worked with sequential build but with the parallel build the build fails because most of the time the module could not find the zip file because it is picked up before the zip could be created. As the module that generates the zip file does not produce a jar file having a dependency to this module would not work (or so as per my understanding). Is there a way in Maven 3 parallel build that such module dependency can be instructed? Appreciate your help, -Ashish
Removing some modules in a maven profile
Hi, I have say a few modules defiled in the parent pom.xml as: modules modulea/module moduleb/module modulec/module /modules I want the default profile builds the entire module list but create a new profile that say only builds a and b but not c. I have seen a thread where adding a module is suggested in a profile instead of removing (excluding) one. I tried to give module a and b in the profile and still mvn built everything, I guess because it builds the parent list first (?). Is there a way to accomplish this? Thanks for your help, -Ashish
Removing a module in a maven profile
Hi, (sorry if this mail was sent twice) I have many modules in the parent pom.xml (a, b, c) and by default it should build all these modules. I want to create a new profile that should only build a subset of these modules (say only a and b but not c). I have read a similar thread on this forum where it was suggested to add a module in a profile but what I want is to exclude some. Is there a way to accomplish this? Thanks, -Ashish
Maven download is failing checksum?
I am trying to download 2.2.1 version and checksum is failing. Not able to unzip file. Any idea? Thanks Ashish Jain - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven download is failing checksum?
sorry false alarm. I was using wrong url for wget. Thanks Ashish Jain On Sun, Jul 11, 2010 at 4:04 PM, Ashish Jain aja...@gmail.com wrote: I am trying to download 2.2.1 version and checksum is failing. Not able to unzip file. Any idea? Thanks Ashish Jain - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Deprecating and banning artifacts with repository metadata
Hi, The problem with this approach is that the consumer of the dependencies needs to know what dependencies are prohibited. The plugin which Wendy mentioned tries to address this problem. The way it will work is 1. Consumers need not configure any list within their POMs, just a reference to the plugin in their plugins section. They can also configure if they want to fail the build or just have warnings. 2. During execution the plugin will look for the version-metadata file in repository for every dependency. 3. See if the current version being downloaded matches any of the deprecation or ban version 4, If it does, it will throw a warning or error message. Depending on the user setting, this will either fail the build or just generate a log statement. This will free consumers of keeping a track of what dependencies are prohibited as it will automatically come in their reports. Also it enables the producers of the components to indicate anytime that they are no longer supporting a particular version. All consumers consuming that dependency will start getting warning/errors in their build automatically without any explicit change in their POMs. Ashish Freddy Mallet wrote: Hi, FYI I've created a ticket few months ago to create such Sonar plugin : http://jira.codehaus.org/browse/SONARPLUGINS-41. This Sonar plugin could work like this : 1 - Accept a text list of prohibited dependencies. For instance : libGroupeId1:libArtifactId1:[libScope1]:[libType1]:(,libVersion1] libGroupeId2:libArtifactId2:[libScope2]:[libType2]:(,libVersion2] 2 - Automatically configure and launch the Maven dependency plugin ( http://maven.apache.org/plugins/maven-dependency-plugin/) to dump the dependency tree in a report file 3 - Read the report file, look for dependencies which could match the prohibited ones and insert those violations in the Sonar DB I'll glad to support anyone interested by writing such plugin. Freddy Freddy Mallet www.SonarSource.com Sonar.codehaus.org http://twitter.com/FreddyMallet On Fri, Sep 11, 2009 at 11:00 PM, Jim Sellers jim.sell...@gmail.com wrote: Sounds useful to me. We were going to build a similar plugin - but the plan for it to be a sonar plugin rather than a maven plugin. Jim On Fri, Sep 11, 2009 at 10:23 AM, Ben Lidgey blid...@movenetworks.com wrote: It sounds like it could be useful, but perhaps with a warning as there are maintenance projects applying bug fixes to existing projects that may not want to update older components to avoid too many changes. Ben On 10/09/2009 22:03, Wendy Smoak wsm...@gmail.com wrote: A group I work with had a requirement to be able to deprecate and ban old versions of their artifacts. The dev team is very large and simply sending out an email telling everyone not to use version 1.0 of some artifact won't work. The team needed a way to warn and/or enforce that the old version is no longer supported and should not (or must not) be used. I think they started out writing a rule for the Enforcer plugin, but at some point it turned into a separate plugin. (There was a concern about teams simply re-configuring the Enforcer plugin to get around the rules.) In the repository, they have a versions-metadata.xml file sitting next to the maven-metadata.xml file. The plugin examines all the dependencies in the build and looks for the versions-metadata.xml file to see if it needs to warn or fail. They're considering contributing the plugin and are wondering whether it sounds useful to the general Maven community before they start wading through the corporate legal stuff that would be necessary to make that happen. Does it sound like something you might use? Let me know if you want more details on it, or perhaps one of the devs that's involved will chime in. Thanks, -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org E-Mail : blid...@movenetworks.com __ Move Networks UK Enterprise House Navigation Park Abercynon CF45 4SN t: +44 (0)8445 460100 f: +44 (0)8445 460200 / (0)1443 742 568 w: www.movenetworks.com -- View this message in context: http://www.nabble.com/Deprecating-and-banning-artifacts-with-repository-metadata-tp25391001p25427364.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven plugin depedency issue
Hi, I have a custom maven plugin that does not seem to be picking up a compile time dependency. The project structure is something like super-pom: defines the plugin build usage - goal/phase(generate-sources) project-pom: inherits from super-pom. defines a default(compile scope) dependency (called xyz-1.0) When the custom maven plugin is invoked via project-pom, it does not contain xyz-1.0.jar in its classpath. What am I missing here ? How do I get a compile time dependency defined in a project pom in the classpath of the custom plugin ? Thanks Ashish
MVN POM giving error with Weblogic 8.1 while working fine with tomcat 5.0
Hi , When I a m trying to deploy my project using weblogic , I am getting errors. My weblogic server is getting stopped and I am getting error == # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x080c3381, pid=3920, tid=172 # # Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) # Problematic frame: # V [jvm.dll+0xc3381] # # An error report file with more information is saved as hs_err_pid3920.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp My pom.xml is == ?xml version=1.0 encoding=UTF-8? project modelVersion4.0.0/modelVersion parent groupIdcom.fareis/groupId artifactIdpom-web/artifactId version1.0.0/version /parent groupIdcom.fareis/groupId artifactIdStellentLogin/artifactId packagingwar/packaging version1.0-SNAPSHOT/version nameStellent Redirect/name descriptionThis application is used to redirect the user to an image repository based on whether the image has been converted from SourceCorp (Fastrieve) to Stellent. /description urlhttp://fada1scmd01.firstam-reis.net/stellent/url dependencies dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.3/version /dependency dependency groupIdjavax.servlet/groupId artifactIdjstl/artifactId version1.1.2/version scopeprovided/scope /dependency dependency groupIdstruts/groupId artifactIdstruts/artifactId version1.2.7/version /dependency dependency groupIdactivation/groupId artifactIdactivation/artifactId version1.0.2/version /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-all/artifactId version1.2.6/version /dependency !-- added later-- dependency groupIdweblogic/groupId artifactIdwebserviceclient/artifactId version8.1.6/version /dependency dependency groupIdcom.fareis/groupId artifactIdwlst/artifactId version1.0.0/version scopeprovided/scope exclusions exclusion artifactIdcom.bea/artifactId groupIdwlst/groupId /exclusion /exclusions /dependency !-- added later till here-- dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version8.1.6/version scopeprovided/scope /dependency dependency groupIdcom.bea/groupId artifactIdjython/artifactId version6.4/version scopeprovided/scope /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin artifactIdmaven-war-plugin/artifactId configuration archive manifest addClasspathtrue/addClasspath classpathPrefixlib//classpathPrefix /manifest /archive /configuration /plugin plugin artifactIdmaven-antrun-plugin/artifactId !-- executions execution phaseinstall/phase -- configuration forktrue/fork !-- compilerVersion1.4/compilerVersion -- tasks tstamp / property environment=env / path id=project.classpath pathelement location=${env.WL_HOME}/server/lib/weblogic.jar / pathelement location=${env.WL_HOME}/server/lib/wlst-6.4.jar / pathelement location=${env.WL_HOME}/server/lib/jython-6.4.jar / /path property name=project.version value=1.0-SNAPSHOT / !-- property name=distDir value=/source/stellent/target/ -- java classname=weblogic.WLST fork=yes classpathref=project.classpath arg line=-loadProperties src/main/weblogic/stellent.py.properties src/main/weblogic/stellent.py ${project.version} ${basedir}/target / /java java classname=com.fareis.wlst.ModifyStartupScript fork=yes classpathref=project.classpath arg line=target/staging/startstellent.cmd / !-- arg line=${basedir}/target/staging/startstellent.cmd/ -- /java /tasks /configuration !-- goals goalrun/goal /goals /execution /executions -- /plugin /plugins /build !-- scm connection scm:svn: http://fada1scmd01.firstam-reis.net/svn/repos/${project.artifactId}/trunk/ /connection developerConnection scm:svn: http://fada1scmd01.firstam-reis.net/svn/repos/${project.artifactId}/trunk/ /developerConnection url http://fada1scmd01.firstam-reis.net/svn/repos/${project.artifactId}/ /url /scm -- /project === Please give your suggestion. Regards, Ashish Srivastava
maven multi-module war build too slow
I have multiple war modules. To have files of all these modules in single war file, I some war modules have dependency on others. dependency groupIdashish.prgcal/groupId artifactIdcoreWeb/artifactId version1.0-SNAPSHOT/version typewar/type /dependency Every time I want to build the war, I run a packagingpom/packaging POM that builds all these modules. To resolve war dependency, maven builds each war, copies it to repository and then explodes repository war again. This has made my build process very slow. What am I doing wrong? Ashish
Re: how to use my own jar as dependencies
Thanks Tom. Where do I need to create the library-version.pom file? If say I have a a.jar file in lib/ where to put the following in? project modelVersion4.0.0/modelVersion groupIdGROUIDYOUDEFINE /groupId artifactIdARTIFACTIDYOUDEFINE /artifactId versionYOUVERSION /version /project Thanks, -Ashish --- Tom Joad [EMAIL PROTECTED] wrote: You can install your jar in your local repository. Run command mvn -e -X install:install-file -Dfile=(Relative or absolute path)ServletPortlet .jar -Dversion=YOUVERSION -Dartifactid=ARTIFACTIDYOUDEFINE -DgroupId=GROUIDYOUDEFINE -Dpackaging=jar -Dgeneratepom=true It's install your local repository with maven standard tree structrur GROUIDYOUDEFINE/ARTIFACTIDYOUDEFINE/YOUVERSION/ServletPortlet.jar ~/ServletPortlet.pom You must declare your jar as dependency inside your project pom file. If this command needs a project with pomfile Create a directory and copy in your jar create a simple pom.xml file project modelVersion4.0.0/modelVersion groupIdGROUIDYOUDEFINE /groupId artifactIdARTIFACTIDYOUDEFINE /artifactId nameClover/name versionYOUVERSION /version /project and run the above command. Tom. 2006/2/24, Srikanth Reddy [EMAIL PROTECTED]: Hi, I am new to maven environment i started intigrating an already existing project with maven, i have to use ServletPortlet jar in one of the files but http://www.ibiblio.org/maven2 dosent have any thing by which i could map to that repositry and download that jar into my local repository by providing that info in dependency/dependency in pom.xml right. Can u plz let me know how to compile my project by specifing ServletPortal.jar externally or any other way by which I can compiling my project Regards Srikanth Reddy - Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
import statements in Eclipse and maven2
Hi, I am using maven2 plugin on Eclipse and working on a project which uses maven2. In the eclipse' Java editor all the import statements (and the classes) are underlined red as if it could not find the jars. How can I configure the project to read the pom.xml and work out all the dependencies? -Ashish __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creating WEB-INF/lib directory
How can I create the WEB-INF/lib directory and copy the jars which the web-app depends on during the maven packaging? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Creating WEB-INF/lib directory
Yes everything gets compiled in the target directory. I do not want to use antrun to copy or create these directories. I want to keep the libraries with in its' own web contexts and do not want to copy them in the directories accessbile across the web contexts. --- Wendy Smoak [EMAIL PROTECTED] wrote: On 2/19/06, Ashish Srivastava [EMAIL PROTECTED] wrote: I am using maven2 and have defined the dependencies in the pom.xml. What scope should I use? I used compile and provided but it doesn't create the WEB-INF/lib directory. Please keep replies on the mailing list. Using 'provided' will cause the problem you're describing-- it means you expect the dependency to be provided for you at runtime, so Maven will not include it in your webapp. (Compile scope is the default; you don't need to specify it.) What commands are you running? Is the rest of the webapp getting built under 'target'? -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Warning messages on remote repository
Hi, I created a remote repository for a bunch of jars we use in our application. The way I did is manually created the library.pom as : pre project moduleVersion4.0.0/noduleVersion groupIdlibName/groupId artifactIdlibName/groupId version1.0/version /project /pre When I compile the project I get the following warning messages (for each such library) but the application gets compiled and packaged.: [WARNING] POM for 'libName:...' is invalid. It will be ignored for artifact resolution. Reason: Not a valid v4.0.0 POM. Looks like as if the format of the pom is wrong. How can I get a jar (not built by us) and deploy it properly in a remote repository which we created? I searched through the maven.apache.org and didn't find any document on how to create a remote repository sp. with our own set of jars. Help is appreciated. Thanks, -Ashish __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
patternset in maven2
Hi, I am very new to maven and even newer to maven2. How can I define a dependency in pom.xml in maven2 so that all the jars/zips in a directory gets included when I compile or package the project? In maven1.x I think it was done by the patternset and then include but don't know in maven2. Help is appreciated. Thanks, -Ashish __ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]