Re: Corrupt GIF image file resource when filtered on Linux
Whatever the cause of the different behavior on Windows versus Linux, binary resources should never be filtered. An image file could contain bytes that equal ${pom.version} (or some other filterable variable) when viewed as a string. Filtering binary files is asking for trouble, and wastes time during the build, too. -Max Morris Jones wrote: I would have suspected CR vs. CRLF treatment as well, but in such an instance the file size would change, and it doesn't in this case. I haven't analyzed the actual change to the file with a hex dump (they're small enough that I could), but noted that the checksum of the file was certainly changed while its size was the same. Thanks for the confirmation! Mojo Torsten Stolpmann wrote: Hi Morris, I can confirm this behavior - we also stumbled upon this problem. AFAIK this relates to a CR/LF - CR conversion occurring during the filtering of the binary image resources. HTH, Torsten Morris Jones wrote: Hi ... I subscribed to the list to pose this problem, but I found a solution and wanted to share it. In my resources folder (src/main/resources) for a webapp I have several property files which get filtered for local environment, along with a couple of GIF icon image files. I thought nothing of filtering all the resources, and on Windows the package worked just fine. When it came time to release my webapp, I checked out my project and did a mvn package on a Linux system. But when the WAR file was deployed to Tomcat, the image files were corrupt. I solved the problem by adding an excludes element to the resource with filtering on, and a second resource element with filtering off for the image files. I haven't looked at any source to see what might cause the different behavior between the two environments. As far as I know they're all Intel little-endian machines. The JVM on both is 1.5_06. Best regards, Mojo - 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: Advice on moving to Maven 2.x
On Thu, 2006-12-07 at 09:12 +, Rakesh Patel wrote: Hi, I have just joined a new company which uses Maven 1.x. I have no experience with Maven at all and have been charged with evaluating a move to Maven 2.x. I am looking for some high-level information about the implications of moving: 1. The existing infrastructure includes a repository for maven 1.x builds - this must remain in place so is it possible to have a separate repository for maven 2.x builds? Absolutely. You can keep the m1 repo and setup a separate m2 repo with no conflict. (It sounds like you can also use some tools to serve as a dual m1+m2 repo as well, but I have no experience with that.) 2. We have a build machine which must be used for compiling all releases. This is hooked to the maven 1.x repository. Can it (easily) aslo use the maven 2.x repositiory or would we be better off starting with a new build box? Yes, m1 and m2 are configured independently, so you can point m1 at the m1 repo and m2 at the m2 repo with no conflict. I have m1 and m2 installed on my PC, both pointing to different internal repos, and I can run both without having to change any settings in between. 3. Any other issues? Be aware that m1 and m2 are different, and that the conversion is probably not going to be as easy as just installing m2 and running a build. M1 and m2 both use the project.xml file, and you won't be able to have one project.xml file that works for both m1 and m2. So that means you can't have both builds working at the same time, generally. You could have both working if you set one up in a parallel structure as shown below, but I would avoid this because it is troublesome to configure and maintain, IME: root/ |-module1/ | |-project.xml (for m1) | |-src/ |-module2/ | |-project.xml (for m1) | |-src/ |-maven2build/ |-module1/ | |-project.xml (for m2, refers to ../../module1/src, etc.) |-module2/ |-project.xml (for m2, refers to ../../module2/src, etc.) The maven.xml file (used for scripting in m1) is gone in m2. I would review what is in your maven.xml files and see if equivalent functionality can be achieved with core or 3rd party m2 plugins. For stuff that you can't do with off-the-shelf m2 plugins, you will need to write your own plugins or use the maven-antrun-plugin to hook in some Ant scripts. -Max Like i said, i have not used Maven before and the hope is that if its feasible to move to Maven 2.x on my project, then i can begin to learn there. Thanks Rakesh - 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: DefaultArtifactRepository subversion location?
[EMAIL PROTECTED]:~/svn/apache/maven$ find . -name DefaultArtifactRepository.java ./components/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java -Max Ole Ersoy wrote: Hi, Does anyone have a link to the Subversion DefaultArtifactRepository.java? I looked all over in the various maven-artifact directories... If I could find it, I could probably figure this out. Here's what I'm trying to figure out just in case you have know. I created a testcase with a DefaultArtifactRepository instance, like this: artifactRepository = new DefaultArtifactRepository(/home/ole/.m2/,/home/ole/.m2/, null); Then I try to get it to tell me the path to an artifact like this: public void testTemp() { String artifactId = apacheds-server-main; String groupId = org.apache.directory.server; String version = 1.5.0-SNAPSHOT; ArtifactFactory artifactFactory = mojo.getArtifactFactory(); assertNotNull(artifactFactory); Artifact pom = artifactFactory.createArtifact(groupId, artifactId, version, null, pom); assertNotNull(pom); String string = artifactRepository.pathOf(pom); System.out.println(string); } However when I run this I get a NullPointerException like this: java.lang.NullPointerException at org.apache.maven.artifact.repository.DefaultArtifactRepository.pathOf(DefaultArtifactRepository.java:107) Thanks, - Ole Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index - 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: Maven and Eclipse
Jarret, Try this: 1. Run 'mvn eclipse:eclipse' from your Common directory. 2. Starting with an empty workspace in Eclipse, setup the M2_REPO classpath variable. 3. Use the File - Import - Existing projects into workspace feature. Choose the root directory of your project (NOT Common, but Common/..), and all of your Maven modules should show up in the list of projects to import in the dialog box. Make sure they are all checked, and Next/Close your way out of the dialog. You should end up with a workspace that has a separate (but inter-dependent) Eclipse project for each of your modules (Common. MidTier, etc.). They should all be setup with proper dependencies and src and output dirs such that Eclipse will build them (and not show any compile errors). I have noticed that 'mvn eclipse:eclipse' doesn't produce a .project file for non-Java projects. For instance, it might not produce one for your Common project. In that case, just add that module as a Simple Project in Eclipse, and commit the resulting .project file into your source control (so other team members don't have to suffer this step). -Max Jarret R wrote: All, I hope this question hasn't been asked a million times already, but I have been playing around with this issue for quite a while now and I think it is time to ask for some professional help. I am working on setting up an enterprise Java application. I am trying to get a basic project structure set up for use, but I am running into difficulties. My desired project structure is below. Each top level directory is an Eclipse project. Common contains the top level pom.xml and the dependencies are pretty easy to work out, or I can include them if necessary. Common/ MidTier/ Domain/ Web/ Plugin/ Following the directions here: http://maven.apache.org/guides/mini/guide-ide-eclipse.html Gets me one project with multiple subdirectories. It all builds find in Maven, but Eclipse won't build the project at all. I assume it doesn't recognize the directories under src/main/java as containing Java source. Is there a good guide for getting Maven set up under Eclipse utilizing Eclipse's inline building? I can't seem to get a sane build that works in Maven and Eclipse, just one or the other. Thanks, Jarret R - 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: starting, then deploying to JBoss?
Two things come to mind: * It looks like you are missing the 'configure' goal for jboss-maven-plugin. * My team has had trouble with the jboss:start and jboss:stop goals on Windows. The Windows users on my team run the following scripts directly to start and stop the jboss instance: target\jboss\bin\run.sh target\jboss\bin\shutdown.sh -Max Mick Knutson wrote: I am wanting to start JBoss the deploy my ear and I can't seem to get a connection: plugin groupIdorg.codehaus.mojo/groupId artifactIdjboss-maven-plugin/artifactId version1.0/version executions execution phasepackage/phase goals goalstart/goal goalundeploy/goal goaldeploy/goal !--goalstop/goal-- /goals configuration jbossHome${jbossPath}/jbossHome port9090/port /configuration /execution /executions /plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unknown file status: 'S' in line Skipped '.'.
I don't know why your build failed, but this table of file/dir statii from the Subversion Book may help you figure it out: http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.tour.cycle.examine.status Maybe the svn repo specified on the maven command line does not match the repo (in a precise, I'm a computer, and I demand precision kind of way) that was used to check out the working directories? It isn't clear to me how that would switch your working dirs, but the fact that you have to specify the repo when running the command raises a red flag to me in terms of it's consistent use over time. You might try 'svn stat' to see what the subversion status of your working directory tree is. -Max On Sun, 2006-11-12 at 14:40 -0600, [EMAIL PROTECTED] wrote: I am running : mvn 2.0.4 JDK 1.5 subversion Multiple project structure! *Why does this build has a SUCCESSFUL status? It did not do an update?* *Is there something wrong with my pom.xml? This did work back in July 2006!* ** ** Parent pom.xml | | Child pom.xml If am trying to do a scm:update mvn scm:update -DconnectionUrl=scm:svn:svn://csspap/CSS_JAVA_DEVELOPMENT/trunk [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] CSS JAVA APPLICATIONS *-- Parent* [INFO] OPER_MET*--- Child* [INFO] Searching repository for plugin with prefix: 'scm'. [INFO] [INFO] Building CSS JAVA APPLICATIONS [INFO]task-segment: [scm:update] (aggregator-style) [INFO] [INFO] [scm:update] [INFO] Executing: svn --non-interactive update [INFO] Working directory: /usr2/local/builds/CSS_JAVA_DEV/projects [INFO] Unknown file status: 'S' in line Skipped'.'. *--- This is the issue I believe* [INFO] Storing revision in 'scm.revision' project property. [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 5 seconds [INFO] Finished at: Fri Nov 10 16:27:38 CST 2006 [INFO] Final Memory: 6M/225M [INFO] *But this does not update the any of the src directories!* *PARENT POM.XML* ** ?xml version=1.0 encoding=UTF-8? project modelVersion4.0.0/modelVersion groupIdcom.weenergies.development/groupId artifactIdJavaDev/artifactId version1.0-SNAPSHOT/version packagingpom/packaging nameCSS JAVA APPLICATIONS/name description This is our main pom.xml. This file ^M will control the sub-modules for builds, ^M test and deploy. This main project will provide the basic values that will be passed to sub-modules. /description pluginRepositories pluginRepository idibiblio.net/id urlhttp://www.ibiblio.net/pub/packages/maven2/url /pluginRepository /pluginRepositories properties war.deploy/usr2/local/jboss-4.0.3SP1 /server/JTEST/deploy//war.deploy /properties modules moduleOPER_MET/module /modules dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.13/version scopecompile/scope /dependency /dependencies build plugins /plugins /build distributionManagement site idwebsite/id urlfile:///usr2/local/jboss-4.0.3SP1/server/JSTAGE/deploy/Reports.war/ /url /site /distributionManagement /project *CHILD POM.XML* ?xml version=1.0 encoding=UTF-8? project parent groupIdcom.weenergies.development/groupId artifactIdJavaDev/artifactId version1.0-SNAPSHOT/version /parent modelVersion4.0.0/modelVersion groupIdcom.weenergies.development.tools/groupId artifactIdOPER_MET/artifactId packagingwar/packaging version1.0-SNAPSHOT/version nameOPER_MET/name descriptionThis will configure the Operating Metrics Web Application!/description pluginRepositories /pluginRepositories build sourceDirectorysrc//sourceDirectory testSourceDirectorytest//testSourceDirectory finalNameOPER_MET/finalName pluginManagement plugins plugin artifactIdmaven-release-plugin/artifactId configuration tagBasesvn://csspap/CSS_JAVA_DEVELOPMENT/tags/tagBase tagRB_TAG/tag generateReleasePomsfalse/generateReleasePoms /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.0/version /plugin
Re: JDK 1.5 Problem
Run 'java -version' and 'which java' and see what you get. Here's what I get on my Ubuntu 6.06 box with Java 1.5 installed, configured, and working properly (my project requires JDK 1.5, and we have the pom.xml stuff configured as well): $ java -version java version 1.5.0_06 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) I have this in my .bashrc file, but I can't remember if I did this in ignorance of update-alternatives or if something wasn't working properly: export JAVA_HOME=/usr/lib/j2sdk1.5-sun export PATH=$JAVA_HOME/bin:$PATH It appears that my .bashrc entries are responsible for which java binary is run: $ which java /usr/lib/j2sdk1.5-sun/bin/java I do see that /usr/bin/java is linked to the Sun 1.5 JDK also: $ /usr/bin/java -version java version 1.5.0_06 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) And 'sudo update-alternatives --config java' also shows that /usr/lib/j2sdk1.5-sun/bin/java is the default. If this turns out to be a Java-on-Ubuntu problem, see the Java (1.5) section of this page: https://help.ubuntu.com/6.06/ubuntu/desktopguide/C/programming.html -Max David Lund wrote: JDK Problem : Im using Ubuntu Dapper Drake v6.06. I have an existing project that I'm trying to convert to maven2 from ant. However, I'm having JDK issues, basically its compiling in JDK 1.3 rather than 1.5, see error below: LinkGroup.java:[16,25] generics are not supported in -source 1.3 (try -source 1.5 to enable generics) public CollectionContentLink getEntities(); I have set the JAVA_HOME variable to point to JDK 1.5, however the interesting thing is I dont have java 1.3 installed so I dont know where its picking that version up from. Could this be a Unbuntu problem, as I noticed Maven2 hadn't been tested on it. - 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: maven2+subclipse+svn+m2eclipse plugin
Each of your maven modules will be a separate Eclipse project. Eclipse does not support hierarchical project structures (#), so if you want to be able to edit the parent pom in Eclipse, you will need to move it into a module also. Here's my recommendation, based on how my project team uses maven and eclipse: * Put your parent pom in a module, rather than in the root directory of your project. Ours is in a module named maven. * I recommend checking out your project tree using svn (or SmartCVS, Tortoise, etc.), apart from where your Eclipse workspace is. * Then run 'mvn -DdownloadSources=true eclipse:eclipse'. Do this from the build root of your project (which may now be the maven directory), so that project-to-project dependencies are created properly. * Then create an Eclipse workspace in a directory that does not overlap with where you checked out your project. Don't forget to setup the M2_REPO classpath variable. * The use the File - Import - General/Existing projects into workspace command in Eclipse, select the root directory of where you checked out your project. Click the Select All button, and then finish the operation. Each module in your project will be a separate Eclipse project, but they will have proper project-to-project dependencies. We don't use the m2eclipse plugin. It sounds interesting, but I haven't tried it yet. My (perhaps erroneous) understanding is that for a given project, you can effectively use m2eclipse or 'mvn eclipse:eclipse', but not both. This page has a short tutorial on how to use maven with eclipse, including the flat project layout that I outlined above: http://maven.apache.org/guides/mini/guide-ide-eclipse.html If you don't plan to put the .project, .classpath, and .settings files in subversion, add them to svn:ignore so they don't show up as unknown files. However, for the most part, you really can check these in. The only non-sharable aspect that I am aware of relates to the version of Eclipse WTP, but I've never explicitly overridden the default (and I don't think anyone else on my team has, either), so this probably isn't a concern for my project, and it may not be an issue for yours, either. Checking them in would allow developers on your team to setup a workspace and checkout your project modules in one place, without using a separate subversion client. And when someone on the team changes a dependency, they will run 'mvn eclipse:eclipse' and commit the change to the pom.xml and .classpath files together. The rest of the team will get the change the next time they update, which will save time on the project when compared to everyone running 'mvn eclipse;eclipse' individually, after someone tells them that the deps have changed, or they scratch their head in wonder at some compile errors showing up in Eclipse. You might want to try having your Eclipse .project, .classpath, and .settings files in subversion, as it does change the process for setting up a workspace and modifying dependencies. I think the m2eclipse plugin also shares some of these advantages. -Max (#) There is a trick that was discussed on this list a while back to allow you to have overlapping projects in Eclipse. This allows you to have one root project that contains your whole project directory, in addition to separate projects for each module under the root. IMO, this is less acceptable than moving your parent pom into a module, so I don't use this trick. Tomasz Pik wrote: On 11/6/06, szefo [EMAIL PROTECTED] wrote: Hi, Can someone give me any clues how to integrate maven2+subclipse+svn+m2eclipse plugin ? I have a multi-module project, stored in one repository. The problem is that when I checkout this project from repo using subclipse it is seen by eclipse as single project... I can go to the folder of the project and run mvn eclipse:eclipse but it doesn't help... and then go to 'File' menu and 'Import' as 'Existing project into workspace' subdirectories. Regards, Tomek Thanks in advance... Tom - 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: How to customize pre-archive directory?
The war plugin will create an exploded (pre-archived) version of the webapp in the directory you configure using the webappDirectory property. However, it sounds like you might be trying to build the exploded webapp in your warSourceDirectory, which you have configured to be src/webapp. If you want to build the exploded webapp in your source directory, use 'mvn war:inplace' instead of changing the webappDirectory property. Be aware that building inplace is undesirable for a number of reasons, mainly relating to the mixing of source and build artifact files in the same directory structure. maven-war-plugin usage doc: http://maven.apache.org/plugins/maven-war-plugin/usage.html -Max jiangshachina wrote: Oh, I may find the problem. I shall use following scripts, configuration warSourceDirectorysrc/webapp/warSourceDirectory outputDirectorytarget/outputDirectory /configuration The warSourceDirectory is my pre-archived directory ^_^ In fact, I didn't understand the doc correctly. Really, I don't understand webappDirectory well, too. How to explain the parameter? a cup of Java, cheers! Sha Jiang jiangshachina wrote: Hello, I'm using customized project directory structure. To standard Maven Web application project, when run mvn package, a folder generated at directory target, the folder includes all of files/dirs would be archived to war file. I call the folder pre-archived directory :D I customized three parameters in maven-war-plugin, configuration webappDirectorysrc/webapp/webappDirectory warSourceDirectorysrc/webapp/warSourceDirectory outputDirectorytarget/outputDirectory /configuration and then Maven regards src/webapp as pre-archived directory, that's not my want. But I don't find which parameter is used for setting pre-archived directory :( a cup of Java, cheers! Sha Jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why don't Overriding the default destination directory of a web resource?
Why don't you just put the files in src/webapp/WEB-INF/app, instead of src/config/app? That would solve your problem, with a minimum of fuss. -Max On Mon, 2006-11-06 at 20:18 -0800, jiangshachina wrote: Hello, I want to add some resource files into sub-directory of WAR/WEB-INF, I'm using following scripts, build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0.1/version configuration webappDirectorysrc/webapp/webappDirectory webResources resource directorysrc/config/app/directory targetPathWEB-INF/app/targetPath /resource /webResources /configuration /plugin /plugins /build But the plugin doesn't comply with my mind. a cup of Java, cheers! Sha Jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Consistency of deployed modules
To avoid running the tests twice, set maven.test.skip=true in the properties section of the 'mvn deploy' Builder. I am not sure if this would work, but to avoid the double-install, perhaps you could run 'mvn clean package' (instead of install) on the first phase. Are you sure running install twice uses more disk space than running it once? I am not using SNAPSHOTs, so installing mygroup:myartifact:1.0 twice doesn't take any more disk space than installing it once. -Max [EMAIL PROTECTED] wrote: Thanks for response. That's similat what I have in place, and I am using luntbuild: mvn clean install (on success: post build ) mvn deploy site site:deply But the problem is that now I have to run unit tests multiple times. My unit tests run for around 15 minutes. That brings the total build time to 1 hour. This also doubles disk usage in the local repository on the build machine because the install phase is invoked twice. There should be a more elegant way to do this than this ( IMO ) hack. Thanks, -Moiz -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 31, 2006 2:08 PM To: Maven Users List Subject: Re: Consistency of deployed modules Run maven twice: mvn clean install if (success) mvn deploy Build server software like Luntbuild can automate this for you. -Max [EMAIL PROTECTED] wrote: I have a multi-project build. I run a mvn clean deploy build every night. Sometimes the builds fail with one of the modules and I end up with an inconsistent set of deployed modules. How can I delay the deployment of the modules so that the deploy happens only when all of the modules have sucessfully completed the install phase of the life-cycle. This way, I always have a consistent set of modules. Thanks -Moiz - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Consistency of deployed modules
Run maven twice: mvn clean install if (success) mvn deploy Build server software like Luntbuild can automate this for you. -Max [EMAIL PROTECTED] wrote: I have a multi-project build. I run a mvn clean deploy build every night. Sometimes the builds fail with one of the modules and I end up with an inconsistent set of deployed modules. How can I delay the deployment of the modules so that the deploy happens only when all of the modules have sucessfully completed the install phase of the life-cycle. This way, I always have a consistent set of modules. Thanks -Moiz - 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: Additional features for maven2 plugin
Maven already requires you to define the versions for all of your dependencies before it builds: http://maven.apache.org/pom.html#Dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.0/version /dependency If you mean something else, please describe it more clearly, perhaps with an example. -Max On Wed, 2006-11-01 at 08:13 +0200, Rahamim, Zvi (Zvi) wrote: Hi, I think that a very important feature is to have the ability to define, before maven starts building, the versions of the dependencies. Is there an intention to add this feature? Thanks! Zvi. - 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: Debug project?
On Sun, 2006-10-29 at 22:18 -0800, jiangshachina wrote: Hi Max, I suspect that this is what was really happening in your previous setup anyway, and that the Eclipse WTP plugin just took care of the details for you. Really, I always don't care the detail WTP plugin does. But in my memory, it's needn't set any extra statements into run.sh/run.bat(JBoss) for (local) debugging, when I use plugins(Eclipse WTP, MyEclipse) . My point was just that WTP almost certainly runs JBoss with debugging on, and sets up the Eclipse debug session for you, without requiring you to be aware of the details. There is more than one way to turn debugging on in JBoss, without editing run.bat. On Windows, setting debug options in the JAVA_OPTS environment variable before calling run.bat would turn debugging on. Or you could ignore run.bat completely and use your own script to run JBoss, setting whatever options you want. Maybe WTP even starts JBoss in the same process as Eclipse (doubtful, but possible), I don't know. My team doesn't actually edit JBoss's run.bat to turn debugging on. We use a heavily customized version of jboss-maven-plugin, which has it's own run scripts. We modified the script to optionally set debug options in JAVA_OPTS, before the script calls the standard JBoss run.bat script. -Max a cup of Java, cheers! Sha Jiang Max Cooper wrote: To make the JBoss JVM listen for debugger, you set some params in the run.bat script (or run.sh/run.conf on *nix). There should be a section already in the run script to turn debugging on -- look for JPDA options. You just uncomment the lines to enable remote debugging. Note that by default it sets suspend=y, which will cause the JVM to wait until you connect the debugger before it does anything (like start the server). This is useful if you need to debug things at startup, but I normally set suspend=n, so the server will start normally, and I can just connect and disconnect the debugger whenever I want. You probably want to change this to suspend=n. Note what the port number is (default is 8787) -- you will need to tell Eclipse the port number when you setup the debug session. No other files are affected. Debugging (JPDA) is a standard feature of Java, and has nothing to do with Maven. In Eclipse, you setup a debug session, and tell eclipse which server and port number the JBoss JVM is listening to (e.g. localhost:8787). I suspect that this is what was really happening in your previous setup anyway, and that the Eclipse WTP plugin just took care of the details for you. -Max jiangshachina wrote: Hi Max, I think remote debug local server(I'm using JBoss) would be OK. But it there alternative approach for local debugging? If use remote debugging, shall I re-config some parameters in web.xml or other conf files? Thanks! a cup of Java, cheers! Sha Jiang Max Cooper wrote: It sounds like your primary requirement is how can I debug my webapp. My project uses Maven to build and deploy a webapp to a server running on the local machine, and then we connect the Eclipse debugger to the local server via the standard Java remote debugging interface. -Max On Sun, 2006-10-29 at 00:28 -0700, jiangshachina wrote: Hello, Currently, I use an Eclipse plugin(WTP) to create a Web application. And I use the plugin to export(deploy) the Web application to an Web/Application Server(JBoss)'s deploy directory. Then I can debug the application when the server is running. The function is provided by the plugin. If the project isn't created by the plugin, the plugin cannot deploy the app(may since directory layout). And I cannot debug the app with server(it's a serious problem). Now I want to use Maven and it's standard directory structure. But how Maven to fulfil the requirement? a cup of Java, cheers! Sha Jiang - 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]
Re: Migrating to a new build machine
What do you use this repository for, specifically? For example, my team has a maven-proxy instance that we use for jars that can't be on public repos because of license issues. We have no other shared repos. How does the team access it (web server, Samba share, NFS, ...)? Where is the configuration stored that indicates that the repo you are moving should be used (as part of the pom.xml for your projects, as part of each developer's settings.xml, via an abstract name that will need to be changed in your DNS server, ...)? -Max Prashanth Krishnamurthy wrote: Hi, We are planning to move the maven repository to a new build machine. Is there a recommended process/steps ? (How to,...etc) Please advise. (This maven repository is used by 2-3 different project teams and is very imp for a smooth migration.) thanks --Prashanth Access over 1 million songs - Yahoo! Music Unlimited (http://music.yahoo.com/unlimited) - 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: Debug project?
It sounds like your primary requirement is how can I debug my webapp. My project uses Maven to build and deploy a webapp to a server running on the local machine, and then we connect the Eclipse debugger to the local server via the standard Java remote debugging interface. -Max On Sun, 2006-10-29 at 00:28 -0700, jiangshachina wrote: Hello, Currently, I use an Eclipse plugin(WTP) to create a Web application. And I use the plugin to export(deploy) the Web application to an Web/Application Server(JBoss)'s deploy directory. Then I can debug the application when the server is running. The function is provided by the plugin. If the project isn't created by the plugin, the plugin cannot deploy the app(may since directory layout). And I cannot debug the app with server(it's a serious problem). Now I want to use Maven and it's standard directory structure. But how Maven to fulfil the requirement? a cup of Java, cheers! Sha Jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Debug project?
To make the JBoss JVM listen for debugger, you set some params in the run.bat script (or run.sh/run.conf on *nix). There should be a section already in the run script to turn debugging on -- look for JPDA options. You just uncomment the lines to enable remote debugging. Note that by default it sets suspend=y, which will cause the JVM to wait until you connect the debugger before it does anything (like start the server). This is useful if you need to debug things at startup, but I normally set suspend=n, so the server will start normally, and I can just connect and disconnect the debugger whenever I want. You probably want to change this to suspend=n. Note what the port number is (default is 8787) -- you will need to tell Eclipse the port number when you setup the debug session. No other files are affected. Debugging (JPDA) is a standard feature of Java, and has nothing to do with Maven. In Eclipse, you setup a debug session, and tell eclipse which server and port number the JBoss JVM is listening to (e.g. localhost:8787). I suspect that this is what was really happening in your previous setup anyway, and that the Eclipse WTP plugin just took care of the details for you. -Max jiangshachina wrote: Hi Max, I think remote debug local server(I'm using JBoss) would be OK. But it there alternative approach for local debugging? If use remote debugging, shall I re-config some parameters in web.xml or other conf files? Thanks! a cup of Java, cheers! Sha Jiang Max Cooper wrote: It sounds like your primary requirement is how can I debug my webapp. My project uses Maven to build and deploy a webapp to a server running on the local machine, and then we connect the Eclipse debugger to the local server via the standard Java remote debugging interface. -Max On Sun, 2006-10-29 at 00:28 -0700, jiangshachina wrote: Hello, Currently, I use an Eclipse plugin(WTP) to create a Web application. And I use the plugin to export(deploy) the Web application to an Web/Application Server(JBoss)'s deploy directory. Then I can debug the application when the server is running. The function is provided by the plugin. If the project isn't created by the plugin, the plugin cannot deploy the app(may since directory layout). And I cannot debug the app with server(it's a serious problem). Now I want to use Maven and it's standard directory structure. But how Maven to fulfil the requirement? a cup of Java, cheers! Sha Jiang - 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: Impossible to build ourproject from scratch
I don't have an answer for you, but our project has the same problem. You have to 'mvn install' a plugin that is part of our project tree before you can build from the top of the project. We tried adding a dependency on the plugin module, in hopes that it would cause maven to build the plugin first, but it didn't work. Does anyone know how to do this? It seems like this would be somewhat common, since many projects may need to build one or more special plugins to support the rest of their builds. -Max On Fri, 2006-10-27 at 11:09 +0200, Emmanuel Lecharny wrote: Hi all, it's actually impossible to build Apache Directory Server project just after a svn co, with a clean maven repo (like a new user will do), for some (unknown) reason, maven is looking for a missing plugin, which will always miss, because this plugin is generated later :) (kind of chicken/egg pb, isn't it ;) This is sad, because to be able to build the project, a new user must go through a tough path (like building MINA, then shared, then apacheds/sar-plugin, then apacheds ...) Is somebody can figure out why maven tries to download this missing plugin *before* doing anything else, even if modules are described in an order which has been selected to avoid such a burden ? Any help wecome !!! Emmanuel PS : for those who want to experiment such a problem, it's easy : just svn co http://svn.apache.org/repos/asf/directory/branches/apacheds/1.0-trunks/ and type mvn install after having removed ~/.m2/repository - 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: dependcy vs one lib of jars
A few ideas... You could write a plugin (or perhaps leverage maven-dependency-plugin and/or maven-assembly-plugin) to produce a zip file containing all the jars, and deliver that with the releases of your webapp(s). Perhaps you would tell the plugin about each of the war projects, and it would add all of their dependencies into the jars zip. This assumes that you are using Maven to build all the wars, so that Maven can look at the pom.xml files for each to determine their dependencies. You may also consider moving some or all of the jars out of the server classpath and into the webapps. This may end up being easier to manage since each webapp could depend on whichever version it needs, and not be forced to use the version from the server classpath. Have you ever experienced such issues with your current process? Maven has excellent support for packaging dependent jars into the war's WEB-INF/lib dir. -Max Attila Mezei-Horvati wrote: I was reading a lot about how one of maven's best features is the dependency handling: there is no need for a directory of jar files. Everything is specified in the dependency management and the repository has the needed jars. Sounds good. One of my coworkers raised however an issue the other day which I couldn't answer. Any ideas welcome. Here is the story: building with ant, our project had one directory with all the jar files. On our production server the contents of this dir was in the tomcat/shared library (we have several apps running on the servers and they share a lot of the dependencies). Keeping it up to date with new jars was as easy as synching with our ext_libs folder. Now, we use maven. There is no more ext libs folder. The dependencies however are not included in the wars (scope: provided). They are already in the shared lib of tomcat. Question is: how are we supposed to generate the contents of the tomcat ext libs folder at this point? Looking up 100 dependencies from several pom files and extracting the jars from the repository doesn't seem so great. It seems as with the dependency managament suddenly we lost the ease of keeping our production server shared library up to date. I wonder if there is some solution to this. Attila __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Malformed manifest classpath entry
I agree that it is ugly, but the Jar Specification requires the wrapping, see Line length in this section: http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files The plugin is doing the right thing. -Max pjungwir wrote: Yeah, I wish maven wouldn't wrap the Class-Path entry, too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clear separation of source and target
solo, When you say backup, do you mean commit changes to an SCM system? Or are you referring to actually backing up a working copy of a module that was checked out from the SCM server (e.g. with a nightly desktop backup system)? On team projects, SCM commits aren't really backups, since it is the SCM repo that is the one true source of your project's source code at any given time. Working copies are just temporary individual working areas that allow team members to contribute changes to the repo. If you mean SCM commits, the ignore lists are the perfect solution. That's what they were invented for. Their primary functions are: * preventing build artifacts from being committed to the repo * preventing build artifacts from appearing to be local changes, since their presence would make it hard to tell if you had real local changes at a glance (an issue that leads to team members forgetting to commit a file or two when they change several files as part of a task) If you are facing some issues with a backup system, I would guess that that system could be configured to ignore certain directories as well. And really, it probably doesn't matter that much if the build artifacts get backed up -- they would never be mistaken for source code anyway. -Max solo turn wrote: mvn clean would be a possibility ... but doing that always before doing a backup? we'd prefer to run it independently. but remy and max propositions help already a lot concerning verison control. a few entries in the ignore is doable. -solo On 10/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I didn't write the docs, but I can share in your difficulties. I've flailed around at times with maven, but it gets better as you stick with it. I like the scm approach better because maven is tempermental about directory layout. Yes, you can modify that, but who knows what plugins might make assumptions about things being in their default locations. Scm just seems less risky to me. If I'm understanding your motivation, is 'mvn clean' not satisfactory? It deletes all the generated resources. Greg Vaughn [EMAIL PROTECTED] solo turn [EMAIL PROTECTED] wrote on 10/20/2006 02:57:52 AM: thanks greg, this is a very user friendly documentation ... no default values are there so you have to guess or code read what it stands for :) our motivation is that all files should be organised by backup class, i.e. we want a simpe way to throw away all built files if necessary, and we do not want to backup it. also i'd consider setting one company rule where to put all build/generated things would be simpler. why do you think the scm approach better? do you have a sample ignore file? best regards, solo. On 10/18/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I've never tried configuring maven to put generated files outside of its default location, but this link http://maven.apache.org/ref/current/maven-model/maven.html#class_build seems to imply it can by setting the builddirectory element. I have setup both cvs and svn to ignore certain directories. Either one should work for you, but I'd recommend the scm approach. The details will depend on which scm tool you use. Greg Vaughn [EMAIL PROTECTED] solo turn [EMAIL PROTECTED] 10/18/2006 03:56 PM Please respond to Maven Users List users@maven.apache.org To Maven Developers List users@maven.apache.org cc Subject clear separation of source and target hi, is there an easy possibility to separate source code (which we write) from generated things? we'd prefer to keep the directory where the pom is to stay clean of all built and generated things to use source code control systems like mercurial or darcs on that tree. is it possible to do that by: * configuring maven to put generated files somewhere out of this directory, or * configuring the source code control by excluding a directory resp a fixed set of directories ? -solo. == Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For
Re: clear separation of source and target
Solo, The conventional approach is that Maven will put all build artifacts in the target directory. And then you setup your version control system to ignore this directory. It works very well. Unless you have an extremely compelling reason to deviate from this convention, I wouldn't. The details of setting up an ignore list depends on which version control system you are using. Here are two examples. Run these commands from the root of your module (the directory in which target will appear). I assume that target is the first ignore for the directory; if not, you should use 'svn propedit', and you won't need to 'cvs add'. Subversion: svn propset svn:ignore target . svn commit -m ignore target . (or use the add to svn:ignore command in a GUI tool to add the target dir to the ignore list, and commit the change to the directory in which you are ignoring target) CVS: echo target .cvsignore cvs add .cvsignore cvs commit -m ignore target .cvsignore (or use the add to .cvsignore command in a GUI tool to add the target directory to the ignore list, and commit the change to / creation of the .cvsignore file) You can add more than one pattern to an ignore list. Here's an example of the ignore list from one module in my current project: .settings .classpath .project velocity.log* target -Max solo turn wrote: thanks greg, this is a very user friendly documentation ... no default values are there so you have to guess or code read what it stands for :) our motivation is that all files should be organised by backup class, i.e. we want a simpe way to throw away all built files if necessary, and we do not want to backup it. also i'd consider setting one company rule where to put all build/generated things would be simpler. why do you think the scm approach better? do you have a sample ignore file? best regards, solo. On 10/18/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I've never tried configuring maven to put generated files outside of its default location, but this link http://maven.apache.org/ref/current/maven-model/maven.html#class_build seems to imply it can by setting the builddirectory element. I have setup both cvs and svn to ignore certain directories. Either one should work for you, but I'd recommend the scm approach. The details will depend on which scm tool you use. Greg Vaughn [EMAIL PROTECTED] solo turn [EMAIL PROTECTED] 10/18/2006 03:56 PM Please respond to Maven Users List users@maven.apache.org To Maven Developers List users@maven.apache.org cc Subject clear separation of source and target hi, is there an easy possibility to separate source code (which we write) from generated things? we'd prefer to keep the directory where the pom is to stay clean of all built and generated things to use source code control systems like mercurial or darcs on that tree. is it possible to do that by: * configuring maven to put generated files somewhere out of this directory, or * configuring the source code control by excluding a directory resp a fixed set of directories ? -solo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] == Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. == - 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: LIB's in war ear
You may need to declare more stuff, see: http://maven.apache.org/plugins/maven-ear-plugin/howto.html Specifically, I think you need to declare your common.jar as a javaModule with includeInApplicationXml=true in your ear/pom.xml: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ear-plugin/artifactId configuration [...] modules javaModule groupIdorg.delta.npi.common/groupId artifactIdcommon-jar/artifactId includeInApplicationXmltrue/includeInApplicationXml /javaModule /modules /configuration /plugin /plugins /build -Max Mick Knutson wrote: Well, this does not seem to work the way I invision it. I have the following: pom.xml --common/pom.xml --ear/pom.xml --war/pom.xml I declared my dependancies in my master pom, then added a provided scope in my ear: dependency groupIdorg.delta.npi.common/groupId artifactIdcommon-jar/artifactId scopecompile/scope /dependency and in my war: dependency groupIdorg.delta.npi.common/groupId artifactIdcommon-jar/artifactId scopeprovided/scope /dependency The common-jar _is_ in my ear, but the deployment fails as it can't seem to access a class in common-jar On 10/11/06, Max Cooper [EMAIL PROTECTED] wrote: Scope is subject to inheritance as well. Deciding where to put it is a judgment call. In the context of your whole project, I wouldn't consider a jar that goes in the ear to be provided. I would only consider it to be provided in the context of the war module. So, I would set the scope in the child pom. And the version in the dependencyManagement section of the parent pom. -Max Wayne Fay wrote: I'd imagine you could omit both, but I'm not currently doing that. Version I'm sure would flow through, and I'd expect scope would as well. Wayne On 10/11/06, Mick Knutson [EMAIL PROTECTED] wrote: Can I omit the version and scope as they are already defined in the master pom.xml in DependancyManagement? Or did that not work? On 10/11/06, Wayne Fay [EMAIL PROTECTED] wrote: Sure, here's my war and ear pom (not all of them, but some of the dependencies)... war/pom.xml dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-jms/artifactId version1.1-rc4/version scopeprovided/scope /dependency dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-ejb/artifactId version2.1-rc4/version scopeprovided/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.3/version scopeprovided/scope /dependency dependency groupIdtaglibs/groupId artifactIdstandard/artifactId version1.1.2/version scopecompile/scope exclusions exclusion artifactIdtaglibs/artifactId groupIdstandard/groupId /exclusion /exclusions optionaltrue/optional /dependency dependency groupIdjavax.servlet/groupId artifactIdjstl/artifactId version1.1.2/version scopecompile/scope exclusions exclusion artifactIdjavax.servlet/artifactId groupIdjstl/groupId /exclusion /exclusions optionaltrue/optional /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.12/version scopecompile/scope exclusions exclusion artifactIdlog4j/artifactId groupIdlog4j/groupId /exclusion /exclusions optionaltrue/optional /dependency dependency groupIdquartz/groupId artifactIdquartz/artifactId version1.5.1/version scopecompile/scope exclusions exclusion artifactIdquartz/artifactId groupIdquartz/groupId /exclusion /exclusions optionaltrue/optional /dependency ear/pom.xml dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-jms/artifactId version1.1-rc4/version scopeprovided/scope /dependency dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-ejb/artifactId version2.1-rc4/version scopeprovided/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.3/version scopeprovided/scope /dependency dependency groupIdtaglibs/groupId artifactIdstandard/artifactId version1.1.2/version scopecompile/scope /dependency dependency
Re: LIB's in war ear
Bah, now I am totally confused. I am not having a problem that I need fixed, but I hope that my musings here will help Mick find the answer to his problem (and then maybe post the solution so I can use the info to improve the situation on my project :-)). The BBWM book seems to use the javaModule approach. However, it seems like javaModule may really be for deploying ejb-jars and not for deploying utility-jars. I am not sure which of the jars in the BBWM book are utility-jars vs. ejb-jars, so maybe I misread the example from the book. My project is using javaModule, but I wasn't the one that set it up and I haven't really experimented with building ears in maven2. Our project setup might be flawed, and we might just be getting lucky due to JBoss's classloader architecture. This topic of Optional Packages (= utility-jars) is addressed in the J2EE 1.4 spec in section J2EE.8.2. The spec will tell you precisely what your build should be producing, but it doesn't tell you how to make Maven do it (of course). In the past, I have setup Ant to create an ear with a war and ejb-jar sharing a utility-jar, and the key was to setup the Class-Path: entries in the war and ejb-jar manifests. This is in line with what the spec says. You can get the spec here: http://java.sun.com/j2ee/j2ee-1_4-fr-spec.pdf I just checked the manifest in the war file of my current project and it has no Class-Path: entries. We must just be getting lucky with the JBoss classloader. Or maybe specifying a utility-jar as a java module (in application.xml) AND using Class-Path: entries are both valid approaches. I'm just not sure. :-( -Max Wayne Fay wrote: Hmmm... I checked my WAR and EAR poms... I am doing this: WAR dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.12/version scopecompile/scope exclusions exclusion artifactIdlog4j/artifactId groupIdlog4j/groupId /exclusion /excusions optionaltrue/optional /dependency EAR dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.12/version scopecompile/scope /dependency (snip) plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ear-plugin/artifactId configuration archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin So perhaps that's why its working for me, without using javaModule etc? ;-) Wayne On 10/19/06, Max Cooper [EMAIL PROTECTED] wrote: You may need to declare more stuff, see: http://maven.apache.org/plugins/maven-ear-plugin/howto.html Specifically, I think you need to declare your common.jar as a javaModule with includeInApplicationXml=true in your ear/pom.xml: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ear-plugin/artifactId configuration [...] modules javaModule groupIdorg.delta.npi.common/groupId artifactIdcommon-jar/artifactId includeInApplicationXmltrue/includeInApplicationXml /javaModule /modules /configuration /plugin /plugins /build -Max Mick Knutson wrote: Well, this does not seem to work the way I invision it. I have the following: pom.xml --common/pom.xml --ear/pom.xml --war/pom.xml I declared my dependancies in my master pom, then added a provided scope in my ear: dependency groupIdorg.delta.npi.common/groupId artifactIdcommon-jar/artifactId scopecompile/scope /dependency and in my war: dependency groupIdorg.delta.npi.common/groupId artifactIdcommon-jar/artifactId scopeprovided/scope /dependency The common-jar _is_ in my ear, but the deployment fails as it can't seem to access a class in common-jar On 10/11/06, Max Cooper [EMAIL PROTECTED] wrote: Scope is subject to inheritance as well. Deciding where to put it is a judgment call. In the context of your whole project, I wouldn't consider a jar that goes in the ear to be provided. I would only consider it to be provided in the context of the war module. So, I would set the scope in the child pom. And the version in the dependencyManagement section of the parent pom. -Max Wayne Fay wrote: I'd imagine you could omit both, but I'm not currently doing that. Version I'm sure would flow through, and I'd expect scope would as well. Wayne On 10/11/06, Mick Knutson [EMAIL PROTECTED] wrote: Can I omit the version and scope as they are already defined in the master pom.xml in DependancyManagement? Or did that not work? On 10/11/06, Wayne Fay [EMAIL PROTECTED] wrote: Sure, here's my war and ear pom (not all of them, but some of the dependencies)... war
Re: System scope and transitive dependencies
I would expand that a bit to say that there are three types of repos that I think are common for teams using maven: * the public repos like ibiblio * a repo that your team maintains for your project or organization (often using the local repo part of a maven-proxy or proximity instance), to serve as a common place to store jars that are neither built as part of your project nor available on public repos (due to license restrictions, etc.). This is a good place to put proprietary db driver libs, weblogic.jar, project-that-does-not-publish-on-ibiblio.jar, etc. * Your own personal local repo. Don't try to share it. It caches artifacts from the other repos, and it is where jars end up when you 'mvn install' your project. -Max Manuel Ledesma wrote: There cases where jars needs to be taken from there installation directory otherwise, It won't work. That's the case for weblogic.jar, which will load jars are need it base of its own path. Simon Kitching-2 wrote: On Thu, 2006-03-23 at 04:28 -0800, Richard Sladek wrote: Thanks for your opinion, it seems to me that I am gonna to abondon the use of system scope then. However, I still think there should be a way how to define dependencies that are specific to a certain project only and you do not want to store them in a repository. This is maybe because of my bad underastanding of what a repository is intended to be for: I understand it as a store where I can place my SHARED /=common/ libraries so that I have a central management point over them. For project specific libs, I do not want to have them in a repo as they are pretty unlikely to be used in any other project and I don't see a point to have a lib in repo just because of one specific project. Another reason for this might be some kind of encapsulation when I want to have all my project-related stuff on one place only (so that I can back it up easily, for instance. If local repository was involved, I would have at least 2 things to backup: repo and project itself.) But as I said, this is probably just my bad understanding of things and ALL depenendies in Maven /both common and special/ shall be stored in repo. Any discussion on this is welcome :) There are two types of repository: * remote ones, such as ibiblo, or a repo for your development team * the local repository on your development machine (really a cache). It typically exists in directory ~/.m2 If your project has dependencies on something available from a remote repository, then declare that as normal; the dependencies will automatically be downloaded to your local repository. If your project has dependencies on other projects you've developed, however, you can simply check those out and run mvn install to get the jar that project generates installed into your *local* repository. That is much tidier than trying to use system scope. If the local projects you have dependencies on are not built with maven, then you can take each jar and run a command to install it into your local repo anyway (a pom is created for it). I can't remember the actual command for the moment, but it has been discussed on this list in the last day or two. If the process of installing jars into a local repo is inconvenient because there are lots of them, or a development *team* that needs to do this, then you should look at setting up a real shared repository instead. A repository is just a webserver or ftpserver; nothing complicated. There's really no reason to use system scope at all, except for libs that may vary from machine to machine, eg the tools.jar of whatever the locally installed JDK is. And there is no need to back up the local repository; it is only a cache of stuff that is already available elsewhere. Regards, Simon - 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: LIB's in war ear
Scope is subject to inheritance as well. Deciding where to put it is a judgment call. In the context of your whole project, I wouldn't consider a jar that goes in the ear to be provided. I would only consider it to be provided in the context of the war module. So, I would set the scope in the child pom. And the version in the dependencyManagement section of the parent pom. -Max Wayne Fay wrote: I'd imagine you could omit both, but I'm not currently doing that. Version I'm sure would flow through, and I'd expect scope would as well. Wayne On 10/11/06, Mick Knutson [EMAIL PROTECTED] wrote: Can I omit the version and scope as they are already defined in the master pom.xml in DependancyManagement? Or did that not work? On 10/11/06, Wayne Fay [EMAIL PROTECTED] wrote: Sure, here's my war and ear pom (not all of them, but some of the dependencies)... war/pom.xml dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-jms/artifactId version1.1-rc4/version scopeprovided/scope /dependency dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-ejb/artifactId version2.1-rc4/version scopeprovided/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.3/version scopeprovided/scope /dependency dependency groupIdtaglibs/groupId artifactIdstandard/artifactId version1.1.2/version scopecompile/scope exclusions exclusion artifactIdtaglibs/artifactId groupIdstandard/groupId /exclusion /exclusions optionaltrue/optional /dependency dependency groupIdjavax.servlet/groupId artifactIdjstl/artifactId version1.1.2/version scopecompile/scope exclusions exclusion artifactIdjavax.servlet/artifactId groupIdjstl/groupId /exclusion /exclusions optionaltrue/optional /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.12/version scopecompile/scope exclusions exclusion artifactIdlog4j/artifactId groupIdlog4j/groupId /exclusion /exclusions optionaltrue/optional /dependency dependency groupIdquartz/groupId artifactIdquartz/artifactId version1.5.1/version scopecompile/scope exclusions exclusion artifactIdquartz/artifactId groupIdquartz/groupId /exclusion /exclusions optionaltrue/optional /dependency ear/pom.xml dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-jms/artifactId version1.1-rc4/version scopeprovided/scope /dependency dependency groupIdgeronimo-spec/groupId artifactIdgeronimo-spec-ejb/artifactId version2.1-rc4/version scopeprovided/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.3/version scopeprovided/scope /dependency dependency groupIdtaglibs/groupId artifactIdstandard/artifactId version1.1.2/version scopecompile/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdjstl/artifactId version1.1.2/version scopecompile/scope /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.12/version scopecompile/scope /dependency dependency groupIdquartz/groupId artifactIdquartz/artifactId version1.5.1/version scopecompile/scope /dependency HTH. Wayne On 10/11/06, Mick Knutson [EMAIL PROTECTED] wrote: Can I see your war pom.xml to see how you excluded everything? On 10/11/06, Wayne Fay [EMAIL PROTECTED] wrote: I generally only allow my JARs to be placed in my EAR lib to reduce the overall size of my EAR and eliminate duplication of code (I'm using Oracle OAS 10.1.2 right now). But you'll need to check your container's documentation and perhaps the J2EE Specs to see what works for you. Currently this requires me to declare and then simultaneously exclude most every dependency in my WAR pom, and also declare them in the EAR. So not a lot of fun from a managing your poms perspective. Wayne On 10/11/06, Mick Knutson [EMAIL PROTECTED] wrote: I have many LIB's that are in both my war and my ear. Is this correct or should they just be in the ear? -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: mvn eclipse:eclipse
The resource dirs are probably marked as source in Eclipse so that Eclipse can copy their contents to the output directory (when the files are changed), which means that they will be available in the classpath if you execute a program or test within Eclipse. -Max Sybren Stüvel wrote: I had this: build ... resources ... !-- Include this file in the Jar file so that it may be used as a starting point by other components. -- resource directory./directory includes includeproject.xml/include /includes /resource /resources /build Removing this resource fixed the issue. Of course, project.xml is no longer used, so it's no big deal. I find it strange however, that a resource directory entry in the POM inserts a classpathentry kind=src in the .classpath file. Thanks, Sybren Max Cooper wrote: 'mvn eclipse:eclipse' goal works for me, and it does NOT create an entry like this: classpathentry kind=src path=./ Is there a setting in your pom.xml file that would lead Maven to believe that . is a Java source directory? Or perhaps there is a bug in the plugin that only occurs when you don't follow the Maven directory structure conventions (my project does follow the conventions). I don't know if such a bug exists. If such a bug exists, perhaps you could reorganize your directory structure to avoid it. -Max Sybren Stüvel wrote: Hi folks, When I perform a mvn eclipse:eclipse command in our argus-core project, Eclipse bugs on the generated .classpath file. This is what's generated: classpath classpathentry kind=src path=./ classpathentry kind=src path=resources/configuration/syst output=target/test-classes/ classpathentry kind=src path=src/java/ classpathentry kind=src path=src/test output=target/test-classes/ classpathentry kind=output path=target/classes/ classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry kind=var path=M2_REPO/commons-beanutils/commons-beanutils/1.6.1/commons-beanutils-1.6.1.jar/ classpathentry kind=var path=M2_REPO/concurrent/backport-util-concurrent/2.0_01/backport-util-concurrent-2.0_01.jar/ [ snipped a lot more .jar files] /classpath The error that Eclipse gives me is: Cannot nest 'argus-core/resources/configuration/syst' inside 'argus-core'. To enable the nesting exclude 'resources/' from 'argus-core' If I remove this line: classpathentry kind=src path=./ from the .classpath file, Eclipse accepts it and everything works fine. Is there any way to get M2 to create the proper .classpath in the first place? Greetings, - 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: [m204] Issue with transistive dependancies and Springframework
Mick, I am using Spring 2.0 and Acegi 1.0.2. Use dependency excludes to suppress the Spring 1.2.7 stuff. -Max Mick Knutson wrote: Is anyone else using spring 2.0 and acegi 1.0.2 It seems acegi 1.0.2 is requiring spring 1.2.7 and adds 1.2.7 and 2.0 into my ear. Is this an issue with the spring libs I imported? On 9/18/06, Wendy Smoak [EMAIL PROTECTED] wrote: On 9/18/06, Mick Knutson [EMAIL PROTECTED] wrote: I am trying to use this: ... {spring dependencies} ... But my war seems to be getting 1.2.7 and 2.0-rc3 jars Why? Did you upgrade this app to Spring 2? If so, did you 'mvn clean' after changing the dependency versions? The old ones may have been left in WEB-INF/lib under 'target'. If that's not it, run mvn package -X output.txt and take a look at the output, which will include an indented tree view of dependencies. You'll be able to see where each dependency is coming from, and exclude the ones you don't want. You can get two versions of the same library if the groupId has changed without being relocated in the repository. (Didn't Spring change from 'springframework' to 'org.springframework'?) Maven has no way of knowing they are the 'same'. HTH, -- Wendy - 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: mvn eclipse:eclipse
'mvn eclipse:eclipse' goal works for me, and it does NOT create an entry like this: classpathentry kind=src path=./ Is there a setting in your pom.xml file that would lead Maven to believe that . is a Java source directory? Or perhaps there is a bug in the plugin that only occurs when you don't follow the Maven directory structure conventions (my project does follow the conventions). I don't know if such a bug exists. If such a bug exists, perhaps you could reorganize your directory structure to avoid it. -Max Sybren Stüvel wrote: Hi folks, When I perform a mvn eclipse:eclipse command in our argus-core project, Eclipse bugs on the generated .classpath file. This is what's generated: classpath classpathentry kind=src path=./ classpathentry kind=src path=resources/configuration/syst output=target/test-classes/ classpathentry kind=src path=src/java/ classpathentry kind=src path=src/test output=target/test-classes/ classpathentry kind=output path=target/classes/ classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry kind=var path=M2_REPO/commons-beanutils/commons-beanutils/1.6.1/commons-beanutils-1.6.1.jar/ classpathentry kind=var path=M2_REPO/concurrent/backport-util-concurrent/2.0_01/backport-util-concurrent-2.0_01.jar/ [ snipped a lot more .jar files] /classpath The error that Eclipse gives me is: Cannot nest 'argus-core/resources/configuration/syst' inside 'argus-core'. To enable the nesting exclude 'resources/' from 'argus-core' If I remove this line: classpathentry kind=src path=./ from the .classpath file, Eclipse accepts it and everything works fine. Is there any way to get M2 to create the proper .classpath in the first place? Greetings, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: Is there any instructional book for Maven-1?
I second this recommendation. Maven - A Developer's Notebook is a good book for learning Maven 1. -Max Naess, Ronny wrote: Take a look at Maven - A Developer's Notebook ISBN 0596007507, or http://www.amazon.com/Maven-Developers-Notebook-Timothy-OBrien/dp/059600 7507/ref=sr_11_1/102-6924759-4708143?ie=UTF8 -Ronny -Opprinnelig melding- Fra: Neeraj Bisht [mailto:[EMAIL PROTECTED] Sendt: 3. oktober 2006 14:11 Til: Maven Users List Emne: Re: Is there any instructional book for Maven-1? hi Actully ,there is no such document available in which u will get whole maven 1.0.2 but if u search in google u will find the relevent matterial Regards Neeraj On 10/3/06, Evi [EMAIL PROTECTED] wrote: Hello! I do have the the book Better Builds with Maven 2, but have to use Maven-1.0.2 (as JetSpeed2 does not work wit Maven2 as far as I know). Is there any older version of the Better Builds with Maven that can be used to understand Maven-1? Thanks in advance for suggestions, Evi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4522541338522065019448! - 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: [M2] Where to place servlet code in a WAR project?
Justin, I am not sure where the imported_classes directory is coming from. That is not the normal behavior for Maven. Normally, the setup you describe would result in the sources from src/main/java being compiled into WEB-INF/classes inside the war file. However, be aware that I *DON'T* mean src/main/webapp/WEB-INF/classes. All the files produced during the build (including .class files) end up inside the target dir. Search your pom.xml file for the string imported_classes. Perhaps you adapted your pom.xml from another project and inherited an unwanted setting. Are you using an IDE? Maybe it is compiling the sources to that location. Here is a link to the maven-war-plugin documentation, which is very helpful for setting up a war project in maven (or figuring out why a war project isn't building the way you expect it to): http://maven.apache.org/plugins/maven-war-plugin/ src/main/java is the standard location for Java sources in Maven. If you are asking why not in src/main/webapp/WEB-INF/src (or similar)?, I have two responses: * most projects don't want their source code in the war file structure * using the Maven standard location means you can use all the Maven reports, etc. without having to configure a custom location -Max [EMAIL PROTECTED] wrote: In my web project, I have the following: src main java -com/my/package/MyServlet webapp *.jsp WEB-INF In the WAR file that is generated, MyServlet ends up in a folder called imported_classes. It cannot be reference after I deploy my WAR as it is not in the classpath. Can anybody please advise how I would go about making it visible and what the point of having a src/main/java/... path would be in a web project? Thanks, -j --- Justin Fung [EMAIL PROTECTED] Consultant, Business Systems IT Banking Systems, e-Business HSBC Bank Canada http://www.hsbc.ca p: (604) 643-6605 f: (604) 643-6727 *** This email may contain confidential information, and is intended only for the named recipient and may be privileged. Distribution or copying of this email by anyone other than the named recipient is prohibited. If you are not the named recipient, please notify us immediately and permanently destroy this email and all copies of it. Internet email is not private, secure, or reliable. No member of the HSBC Group is liable for any errors or omissions in the content or transmission of this email. Any opinions contained in this email are solely those of the author and, unless clearly indicated otherwise in writing, are not endorsed by any member of the HSBC Group. *** Ce courriel peut renfermer des renseignements confidentiels et privilégiés et s'adresse au destinataire désigné seulement. La distribution ou la copie de ce courriel par toute personne autre que le destinataire désigné est interdite. Si vous n'êtes pas le destinataire désigné, veuillez nous en aviser immédiatement et détruire de façon permanente ce courriel ainsi que toute copie de celui-ci. La transmission de courriel par Internet ne constitue pas un mode de transmission confidentiel, sécuritaire ou fiable. Aucun membre du Groupe HSBC ne sera responsable des erreurs ou des omissions relatives au contenu ou à la transmission de ce courriel. L'auteur de ce courriel est seul responsable des opinions émises dans ce courriel, lesquelles, à moins d'un avis contraire fourni par écrit, ne sont pas endossées par aucun membre du Groupe HSBC. *** SAVE PAPER - THINK BEFORE YOU PRINT! ÉCONOMISEZ LE PAPIER – PENSEZ-Y À DEUX FOIS AVANT D'IMPRIMER! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Property overwriting - resource filtering for sub project
The current source for maven-resources-plugin gives project properties a higher precedence than system properties. I think that is backwards (but it is an improvement over the old code, which effectively did not consider system properties for token replacement at all :-)): private void initializeFiltering() throws MojoExecutionException { filterProperties = new Properties(); // System properties filterProperties.putAll( System.getProperties() ); // Project properties filterProperties.putAll( project.getProperties() ); Here's an idea for a work-around for your issue: Define a profile (in your pom.xml) that is only active if the db property is NOT set: profile iddb-profile/id activation property !-- this profile is active when db is NOT set -- name!db/name /property /activation properties !-- put the default value here -- dbhsql/db /properties /profile If you set db on the command line (or in settings.xml), this profile will not be activated. But if you don't set it, the profile will activate and give the default value of hsql. -Max fagfa wrote: I'm still stuck with this one and can't believe no one knows the answer ... fagfa wrote: We have a parent project which contains several J2EE subprojects, such as web, ejb, ear, etc.. In the parent POM, a property db is defined, whose default is hsql, for example. Build for various databases can be switched by specifying commandline, mvn -Ddb=mysql, or changing db property directly. In our sub projects, there are some resource files that depend on this db property and we hope these resource files are properly filtered during the building. If I just change db property in parent POM file, everything works perfectly. But when I specify -Ddb=mysql, the resource files are filtered, but still by the properties in the parent POM, not from command line. Based on my understanding, property specified in command line should precede elsewhere specified, which is NOT happending here. Any ideas? Thanks, fagfa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Simplifying Archetype Plugin Command Line Arguments
Since you will need to communicate what commands to run to the developers anyway, it doesn't seem like that much of a burden to have the commands be somewhat complex. Developers, please run: mvn myplugin:new-web (-Dname.of.new.project=)myWebProject ...is not really much different from... Developers, please run: mvn archetype:create -DartifactId=user-guide \ -DgroupId=com.mergere.mvnbook.proficio \ -DarchetypeArtifactId=maven-archetype-site-simple In my opinion, having the developers run the full commands is preferable. You don't have to create, maintain, and distribute a plugin, and the developers get some exposure to real Maven. For instance, it is very likely that your developers will need to install 3rd party jars in a team repository or in their local repositories, which are commands that require many command line arguments. It probably doesn't make sense to hide this complexity from your developers. We expect carpenters to be able to use saws and hammers; we should expect developers to be able to use the tools of their trade (build tools, version control, etc.). -Max Scott Seiter wrote: I've created archetypes for different project types and am looking for a method of creating a new project without having to type in all the extra arguments (as in): archetype:create -DartifactId=user-guide -DgroupId=com.mergere.mvnbook.proficio -DarchetypeArtifactId=maven-archetype-site-simple Clearly I could use a batch job/shell script to avoid the arguments, but I'd like to make it easy for all our developers to do this without having to distribute a set of scripts. The initial thought is to create a plugin that feeds parameters to the archetype plugin. Using this mythical plugin, creating a web project could be done by typing something like: mvn myplugin:new-web myWebProject Has anyone done something like this? If so, how do you call a plugin from another plugin. I noticed Maven 1 had a 'caller' plugin but one page said this wasn't needed in Maven 2. Any suggestions? Thanks in advance! Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange Compile Error
I don't know the solution to your problem, but I have some info and ideas that might help you find a solution... It looks like the compiler is finding .java files in the gwt-user-1.1.10.jar dependency. I read recently that google puts the source code some libs in the jar, and it looks like this is one such case. I am not sure quite what the compiler error means, but it seems like it is perhaps trying to compile the sources from the dependency jar, which seems odd. It seems like having source in the jar would not be a problem, but perhaps it is. Does the jar also contain the .class files (you could look inside the jar to verify), or does it only contain source? Perhaps the problem is that it is ONLY a source jar, and does not contain the .class files. That is just a guess, but it is something I would check. I don't see that jar on ibiblio. How did it get into your local repository? I would examine where the jar came from carefully -- perhaps it is incompatible with maven for some reason. Does the jar also contain the class files (you could look inside the one you have), or does it only contain source? And maybe there is a compatible version of the same lib available by some other means. -Max Allison, Bob wrote: I have been using one machine for development and having no problem. I copied my development tree to another machine and tried to build my project; the compiler created a bunch of errors because of source files in a jar on the class path. I ran mvn -X compile on both the old machine and the new machine and compared the output from the two runs. The only differences between the logs (until the compile error) consisted of differences in paths because of a different home directory. I have verified that the jar holding the sources is the same on both machines. I have included the complete log from the failed compile in the hopes that someone can figure out where I should start looking to figure out what is wrong. + Error stacktraces are turned on. Maven version: 2.0.4 [DEBUG] Building Maven user-level plugin registry from: '/home/allisord/.m2/plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: '/opt/maven/2/conf/plugin-registry.xml' [INFO] Scanning for projects... [DEBUG] Searching for parent-POM: qaccess:webapp::5.0-SNAPSHOT of project: qaccess:mit:war:5.0-SNAPSHOT in relative path: ../webapp/pom.xml [DEBUG] Using parent-POM from the project hierarchy at: '../webapp/pom.xml' for project: qaccess:mit:war:5.0-SNAPSHOT [DEBUG] Searching for parent-POM: qaccess:product::5.0-SNAPSHOT of project: qaccess:webapp:pom:5.0-SNAPSHOT in relative path: ../product/pom.xml [DEBUG] Using parent-POM from the project hierarchy at: '../product/pom.xml' for project: qaccess:webapp:pom:5.0-SNAPSHOT [INFO] [INFO] Building Manual ITs [INFO]task-segment: [compile] [INFO] [DEBUG] maven-resources-plugin: resolved to version 2.2 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-resources-plugin:maven-plugin:2.2 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository. [DEBUG] maven-compiler-plugin: resolved to version 2.0.1 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-compiler-plugin:maven-plugin:2.0.1 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository. [DEBUG] maven-checkstyle-plugin: resolved to version 2.1 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-checkstyle-plugin:maven-plugin:2.1 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository. [DEBUG] maven-release-plugin: resolved to version 2.0-beta-4 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-release-plugin:maven-plugin:2.0-beta-4 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving
Re: Modified WAR Plugin
I think we found that maven just used the plugin from our tree. I tested this by adding silly debug statements in one of the Java files from the plugin. But that might only be true if you are building the whole project tree, as opposed to just building a war module. Hmmm... I don't think we tested that. We also tweaked the version in our copy of the plugin's pom.xml. We added a string to the version, so that our version would always be unique from plugin releases -- e.g. 2.0companyname. Then we specified this new new version in our parent pom, in the build section, similar to this snippet from our current parent pom where we force the use of maven-resources-plugin, version 2.2: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.2/version /plugin /plugins /build -Max jp4 wrote: How do you refer to the new plugin in your pom.xml file? I thought that a project of packaging typewar/type will automatically use the default war plugin... How did you override this behavior? jp4 Max Cooper wrote: My project was using a modified version of the war plugin for a while. I decided that the best solution was to make the plugin another module in our project. This solution seemed easier than managing a release process for the modified plugin separately, or requiring team members to do something unusual like installing it themselves. We have since removed the plugin from our file tree because the released version now does what we need. It all went pretty smoothly. You might find that making the modified plugin just another module in your project to be the best solution. -Max jp4 wrote: I recently modified the maven-war-plugin source to accomodate some changes that I needed to support axis2. I submitted this code for inclusion into the next version of the plugin, but until that time I need to distribute the plugin to everyone on my development team. I can install it into the local repository and it works fine, but if I try to upload it to our development repository (internally) I can't seem to get the plugin to update. I have included the development repository in the settings.xml and have tried using 2.0.1-SNAPSHOT as well as 2.0.2 versions. I seem to get the same problem listed below. Can I disable the Super POM plugin repo? Having each developer install the plugin locally isn't really an option so I have to be able to distribute this via our development repository. I have also tried using the explicit plugin version in our root POM file and I get the same error. Any help would be greatly appreciated. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository. [INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for updates from devrepo [DEBUG] Skipping disabled repository codehaus-snapshots [INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for updates from central [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '867df7ba2a0c81782ac0fb14db5ccda5f85f5d42'; remote = '3009ca8b79c340cc83543ea789f57b1ee0128cb6' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '867df7ba2a0c81782ac0fb14db5ccda5f85f5d42'; remote = '3009ca8b79c340cc83543ea789f57b1ee0128cb6' - IGNORING [DEBUG] maven-war-plugin: using locally installed snapshot [DEBUG] Artifact not found - using stub model: Unable to determine the latest version org.apache.maven.plugins:maven-war-plugin:pom:LATEST [DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-war-plugin:pom:LATEST [DEBUG] maven-war-plugin: using locally installed snapshot [DEBUG] Artifact not found - using stub model: Unable to determine the release version org.apache.maven.plugins:maven-war-plugin:pom:RELEASE [DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-war-plugin:pom:RELEASE [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-war-plugin' does not exist or no valid version could be found [INFO] [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-war-plugin' does not exist or no valid version could be found at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1281) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1517
Re: Modified WAR Plugin
My project was using a modified version of the war plugin for a while. I decided that the best solution was to make the plugin another module in our project. This solution seemed easier than managing a release process for the modified plugin separately, or requiring team members to do something unusual like installing it themselves. We have since removed the plugin from our file tree because the released version now does what we need. It all went pretty smoothly. You might find that making the modified plugin just another module in your project to be the best solution. -Max jp4 wrote: I recently modified the maven-war-plugin source to accomodate some changes that I needed to support axis2. I submitted this code for inclusion into the next version of the plugin, but until that time I need to distribute the plugin to everyone on my development team. I can install it into the local repository and it works fine, but if I try to upload it to our development repository (internally) I can't seem to get the plugin to update. I have included the development repository in the settings.xml and have tried using 2.0.1-SNAPSHOT as well as 2.0.2 versions. I seem to get the same problem listed below. Can I disable the Super POM plugin repo? Having each developer install the plugin locally isn't really an option so I have to be able to distribute this via our development repository. I have also tried using the explicit plugin version in our root POM file and I get the same error. Any help would be greatly appreciated. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository. [INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for updates from devrepo [DEBUG] Skipping disabled repository codehaus-snapshots [INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for updates from central [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '867df7ba2a0c81782ac0fb14db5ccda5f85f5d42'; remote = '3009ca8b79c340cc83543ea789f57b1ee0128cb6' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '867df7ba2a0c81782ac0fb14db5ccda5f85f5d42'; remote = '3009ca8b79c340cc83543ea789f57b1ee0128cb6' - IGNORING [DEBUG] maven-war-plugin: using locally installed snapshot [DEBUG] Artifact not found - using stub model: Unable to determine the latest version org.apache.maven.plugins:maven-war-plugin:pom:LATEST [DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-war-plugin:pom:LATEST [DEBUG] maven-war-plugin: using locally installed snapshot [DEBUG] Artifact not found - using stub model: Unable to determine the release version org.apache.maven.plugins:maven-war-plugin:pom:RELEASE [DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-war-plugin:pom:RELEASE [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-war-plugin' does not exist or no valid version could be found [INFO] [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-war-plugin' does not exist or no valid version could be found at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1281) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1517) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1011) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:975) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:453) Thanks, JP4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error on compiling a webapp. Strange class is required.
I don't know the answer to your question. But I use the JarsBrowser tool a lot to scan for classes in directory trees full of jars: http://cmarton.free.fr/jarsbrowser/ It requires no installation. You can run it from the web page. I setup a quick launch style button to run it using this command: javaws http://cmarton.free.fr/jarsbrowser/jarsbrowser.jnlp You might find this to be useful. -Max Sha Jiang wrote: bI've looking for where would be the class JspIdConsumer.class but without sucess. Why in any IDE it compile? Anyone knows where is the error?/b Which IDE are you using? I don't find the class with Eclispe and a j2ee.jar in its build path, but I can find other Servelt or JSP classes. You should check you classpath and source codes. a cup of Java, cheers! Sha Jiang 2006/9/6, Dudu [EMAIL PROTECTED]: Sorry, I'm starting with maven and I'm migrating my projects. I added all dependencies but the follow error is ocurring: D:\workspace\proj\src\main\java\br\com\sag\components\grid\AjaxSortableTableTa g.java:[7,7] cannot access javax.servlet.jsp.tagext.JspIdConsumer file javax\servlet\jsp\tagext\JspIdConsumer.class not found public class AjaxSortableTableTag extends UIComponentTag { I've looking for where would be the class JspIdConsumer.class but without sucess. Why in any IDE it compile? Anyone knows where is the error? And I don't know what dependency is, this is my pom.xml file: dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdjavax.faces/groupId artifactIdjsf-api/artifactId version1.2/version scopecompile/scope /dependency dependency groupIdjavax.mail/groupId artifactIdmail/artifactId version1.4/version scopecompile/scope /dependency dependency groupIdjavax.faces/groupId artifactIdjsf-impl/artifactId version1.2/version scopecompile/scope /dependency dependency groupIdmyfaces/groupId artifactIdtomahawk/artifactId version1.1.1/version scopecompile/scope /dependency dependency groupIdoracle.adf/groupId artifactIdadf-faces-impl/artifactId version10.1.3/version scopecompile/scope /dependency dependency groupIdoracle.adf/groupId artifactIdadf-faces-api/artifactId version10.1.3/version scopecompile/scope /dependency dependency groupIdhibernate/groupId artifactIdhibernate/artifactId version3.0/version scopecompile/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.4/version scopecompile/scope /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.9/version scopecompile/scope /dependency dependency groupIdcommons-configuration/groupId artifactIdcommons-configuration/artifactId version1.2/version scopecompile/scope /dependency dependency groupIdmyfaces/groupId artifactIdtomahawk/artifactId version1.1.1/version scopecompile/scope /dependency dependency groupIdjstl/groupId artifactIdjstl/artifactId version1.1.0/version scopecompile/scope /dependency dependency groupIdjspapi/groupId artifactIdjsp-api/artifactId version2.0/version scopecompile/scope /dependency - 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: [m2] eclipse:eclipse and eclipse 3.2 projects within a project suppo
Valerio Schiavoni wrote: Hello Max, Max Cooper wrote: If you have a structure like this: root |--module1 |--module2 |--submodule2-1 my structure is a bit simpler, without nested submodules. Okay, like this: root |--module1 |--module2 Max Cooper wrote: ... you would have to make sure that you hide/delete/rename the .project file in both the root and module2 directories for the submodule2-1 project to show up on the import. so fortunately this is not my case. Generally, this still is the case. You MUST hide/delete the .project file in root so that Eclipse will allow you to add module1 and module2. It is the same issue, but you only have to worry about one level. I have verified that the procedure outlined in this email thread works in Eclipse 3.2, as have others. If it isn't working for you, something is wrong. Max Cooper wrote: Eclipse does not support hierarchical project structures. i thought eclipse 3.2 just introduced this new feature ... Eclipse 3.2 does not support hierarchical project hierarchies. It was rumored that 3.2 would have such support before the release, but it does not. The procedure in this email thread is just a trick to get Eclipse to accept having overlapping projects. This trick allows a hierarchical structure of Maven modules to be mapped into a flat structure of Eclipse projects. Max Cooper wrote: IMO, moving your parent pom to a subdir is a better compromise than having all of your files show up two or more times in Eclipse. of course, but this would break a well established maven convention, which i'd like to avoid.. Moving the parent to a subdir is documented on the Maven site, and many people are using this technique successfully. The Eclipse trick in this thread is not as clean, IMO. -Max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: probs with profiles - really stuck...
I have personally found the profile mechanism to be tricky to setup, but you can generally achieve your goals by applying various activation techniques, etc. Profiles can be activated by properties. You could use a property to activate your dev-crimson profile, specified like 'mvn -DtargetEnv=dev-crimson'. I am not certain, but perhaps the order the profiles in the list define how property value conflicts will be resolved. But even if this is true, it seems to lack the power to give precedence to a profile that is activated by some means other than the command line. A useful trick for avoiding conflicts when using property-activated profiles is to have a profile with a default value for a property be activated when the profile-selecting property is NOT set. You can do this by specifying (e.g.) !targetEnv as the activation property for that profile. And then have other profiles that set the property to something else when the profile-selection property is set (activated when targetEnv has a value of 'dev-crimson', etc.). -Max EJ Ciramella wrote: Even more fun - if I specify a profile that only exists in my settings.xml file, some of the resources don't even get processed. What gives? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 1:47 PM To: Maven Users List Subject: RE: probs with profiles - really stuck... If two profiles are loaded and both have a property set in it, which one takes precedence? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 11:42 AM To: Maven Users List Subject: RE: probs with profiles - really stuck... Is there really no way to do this folks? This would really nuke our maven progress at this point. -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Thursday, August 24, 2006 6:48 PM To: Maven Users List Subject: probs with profiles I have a question about profiles and their usage. Our build machines have one path to things like jboss and other third party directories, in the various qa stacks, these paths may be different. Additionally, a property may change from project to project. How come the sub projects don't get the second profile?! E:\work\up-svcs\lty\proj\LTY-P39mvn help:active-profiles -P LTY-P39,dev-crimson -e + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Unnamed - lty:app:pom:1.0-SNAPSHOT [INFO] Lty Utils [INFO] Lty Crypto(Client) [INFO] LtyModel [INFO] LtyDataGen [INFO] Crypto Server [INFO] Upromise.com Site [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building Unnamed - lty:app:pom:1.0-SNAPSHOT [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'lty:app:pom:1.0-SNAPSHOT': The following profiles are active: - dev-crimson (source: profiles.xml) - LTY-P39 (source: settings.xml) Active Profiles for Project 'lty:lty-utils:jar:1.0-SNAPSHOT': The following profiles are active: - LTY-P39 (source: settings.xml) Active Profiles for Project 'lty:crypto:jar:1.0-SNAPSHOT': The following profiles are active: - LTY-P39 (source: settings.xml) Active Profiles for Project 'lty:lty-model:jar:1.0-SNAPSHOT': The following profiles are active: - LTY-P39 (source: settings.xml) Active Profiles for Project 'lty:lty-datagen:jar:1.0-SNAPSHOT': The following profiles are active: - LTY-P39 (source: settings.xml) Active Profiles for Project 'lty:cryptoServer:jar:1.0-SNAPSHOT': The following profiles are active: - LTY-P39 (source: settings.xml) Active Profiles for Project 'uprweb:uprweb:war:1.0-SNAPSHOT': The following profiles are active: - LTY-P39 (source: settings.xml) - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] eclipse:eclipse and eclipse 3.2 projects within a project suppo
If you have a structure like this: root |--module1 |--module2 |--submodule2-1 ... you would have to make sure that you hide/delete/rename the .project file in both the root and module2 directories for the submodule2-1 project to show up on the import. When Eclipse finds a .project file at a node in the file tree, all projects from the subtree rooted at that node are hidden, because Eclipse does not support hierarchical project structures. IMO, moving your parent pom to a subdir is a better compromise than having all of your files show up two or more times in Eclipse. I would use the technique outlined in this thread ONLY in cases where you could not move the parent pom to a subdirectory. -Max Valerio Schiavoni wrote: baerrach wrote: Because there is no .project file eclipse will show all the subprojects as being available. i don't get this step working...it doesn't show submodule projects as being availble, even if each of them have their respective .project and .classpath any one with my same issue ? thanks, valerio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] maven.test.skip=true on by default?
Put this in your settings.xml: !-- skip tests by default, but allow override on command line -- profile idskiptests/id activation property name!maven.test.skip/name /property /activation properties maven.test.skiptrue/maven.test.skip /properties /profile This will set maven.test.skip to true, as long as you don't set it on the command line. The nice part about this technique is that it DOES allow you to override it on the command line if you want to. -Max Matt Raible wrote: In Maven 1, it was possible to turn off tests by creating a build.properties and adding maven.test.skip=true. I want to do something similar (don't worry, only temporarily) for Maven 2. I tried creating a ~/.m2/settings.xml with the following, but it doesn't seem to work. settings profiles profile idskip.tests/id properties namemaven.test.skip/name valuetrue/value /properties /profile /profiles activeProfiles activeProfileskip.tests/activeProfile /activeProfiles /settings On a related note, is it possible to create a setting that sets up offline mode permanently w/o typing -o? Thanks, Matt - 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: [m2] eclipse:eclipse and eclipse 3.2 projects within a project support.
Sorry that this discussion is somewhat off-topic, but I hope that it is okay since there are so many people trying to get hierarchically-organized Maven projects to work well in Eclipse... I setup a workspace using the procedure outlined in this thread. The end result that I get has the root and modules in a flat layout (not hierarchical) like this: root module1 module2 module3 At first I thought that it didn't work for me, but I suspect that this was the same result that others got. I was expecting a hierarchical layout in Eclipse, but I see now that this is really just a trick that allows you to create overlapping Eclipse projects. Normally, Eclipse would not allow you to add both root and module1 projects to the same workspace, since they overlap. This does have a few advantages over the method I was using before: 1. The import process is a convenient way to create an Eclipse project for each Maven module in one step. Previously, I was adding each one individually. (This also works if you have checked out your project from the root outside of the workspace.) 2. You can have your parent pom.xml in the root directory of your project, AND still be able to edit it in Eclipse. Previously, I was forced to put the parent pom in subdir under root. 3. You can commit changes in multiple modules/projects in one transaction, by committing the changes from root project. (However, I see now that the Subversive subversion plugin supports cross project atomic commits, which sounds like it will work even if you don't have your project root setup as an Eclipse project.) But it is still lacking in several respects: 1. If one team member adds a module, every person on the team has to do some fiddling to setup their workspace. 2. The display in Eclipse is still flat, rather than hierarchical, making it impractical to have more than one multi-module project in the same workspace (since there is no indication which root project owns moduleX). 3. You are limited to one level of inheritance in your project hierarchy. Or maybe not, if you do the same .project-hide and import trick more than once. Whatever the case, it still flattens the view. 4. All of your files show up twice (or worse, if your project hierarchy has more than one level) -- once as root/moduleX/file and again as moduleX/file. This can be confusing. The double-display of file modification label decorations is annoying. I suspect that it also has a significant negative impact on Eclipse performance. -Max Barrie Treloar wrote: On 8/16/06, Barrie Treloar [EMAIL PROTECTED] wrote: I thought that the snapshot version of the eclipse:eclipse plugin had the functionality to do this for me, but it is not working how I expect. I assume I am doing something wrong. Should mvn eclipse:eclipse at the project root do what I expect? With the help of Nicolas' mail, these are the steps. Checkout your project root. Run mvn -DuseProjectReferences=false eclipse:eclipse at the project root. (I recommend not using project references so that you get repository copies and only when you need to work on related projects that you are changing sources files for at the same time to switch to project references) Rename the ROOT/.project file to something else File - Import - General - Existing Projects and browse to your workspace and the project root. Because there is no .project file eclipse will show all the subprojects as being available. Select them and click ok. Now rename the ROOT/.project file back. Press F5 to refresh your Navigator view. You should have all your projects links up hierarchically! Wee - 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: [m2] eclipse:eclipse and eclipse 3.2 projects within a project support.
I, too, have been anxiously awaiting hierarchical project support in Eclipse. And I thought that it was going to be available in Eclipse 3.2. But this feature was omitted from the Eclipse 3.2 release. The feature is not available yet. -Max Barrie Treloar wrote: With Eclipse 3.2 I was lead to believe you could create projects within projects, so that I could checkout a maven project that contains modules and wire that up in Eclipse correctly. Instead of manually checking out the modules as I did under Eclipse 3.1. I am able to manually add the project in Eclipse via File - Import - General - Existing Projects into Workspace and use the module directoy as the value for Select root directory. The project then appears in the Projects list for importing. If I select the project root then there are no projects to choose from. I thought that the snapshot version of the eclipse:eclipse plugin had the functionality to do this for me, but it is not working how I expect. I assume I am doing something wrong. Should mvn eclipse:eclipse at the project root do what I expect? Any help appreciated. Bae - 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: [m2] eclipse:eclipse and eclipse 3.2 projects within a project support.
Douglas Ferguson wrote: Does anybody have any experience switching between project dependencies and jar dependencies? I assume that if you are working on multiple modules at the same time the project dependencies would be necessary, but then when you are working on 1 specific module that may use an older version (non trunk) or another module, then jar dependencies would be needed. Do you have to keep using mvn eclipse:eclipse all the time? I think you do. But you have to do that anyway, so that you get any new dependencies that someone else adds to the project. -Max -Original Message- From: Barrie Treloar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 5:50 PM To: Maven Users List Subject: Re: [m2] eclipse:eclipse and eclipse 3.2 projects within a project support. On 8/17/06, Max Cooper [EMAIL PROTECTED] wrote: I, too, have been anxiously awaiting hierarchical project support in Eclipse. And I thought that it was going to be available in Eclipse 3.2. But this feature was omitted from the Eclipse 3.2 release. The feature is not available yet. You can do it, I was able to manually create another project pointing to one that was already in the workspace and a subdirectory of that project. i.e project_root/ - module1 - module2 I was able to have in Eclipse a project for project_root as well as create one manually for module1 and module2 so that they appear in the project list. But I can't figure out what Eclipse does under the covers for that, there are no docs that I could find in the help or googling, and I can't see in the source code of the eclipse:eclipse plugin whether it is attempting to do this. - 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]
Re: Projectstructure
Kaiser, Hans wrote: workspace |-- my-app (is also the CVS-module) |-- presentation |-- common |-- web |-- pom.xml (the master pom) Eclipse does not support nested projects, so that structure won't work (or at least won't work well in an Eclipse-friendly way). It is best to have a separate Eclipse project for each module. And by best, I mean it is the only sane choice, even though this Eclipse limitation drives me mad. :-) To be able to edit the top-level pom.xml, you must move it into another peer module. Let's call it master. You will need to adjust the paths to the modules in the master pom. presentation will change to ../presentation, etc. my-app |-- presentation |-- common |-- web |-- master (the master pom.xml is in this directory) Then setup an Eclipse workspace, and checkout the presentation, common, web, and master modules as Eclipse projects. Done. Personally, I prefer to checkout the project from the root (my-app) outside of Eclipse, and create an Eclipse workspace that DOES NOT overlap my project working directories. Then I create a new Eclipse project for each module by pointing Eclipse to the existing directories in the my-app working directory tree. I use a bunch of different tools when working on projects, so I don't want the working files to be owned by Eclipse (and stashed away in a workspace somewhere). This arrangement also allows you to commit changes to more than one module in the same transaction, though you have to use something other than Eclipse to do the commit. And you could even keep the pom.xml file at the top level and avoid creating the master directory -- however, in doing so you lose the ability to edit the pom.xml in Eclipse, so I still use the master directory technique anyway. -Max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: eclipse
If you run 'mvn eclipse:eclipse' from the top level of your project (as opposed to running it individually for each module), the maven eclipse plugin will create project dependencies rather than dependencies on the jar files in the repository. I would start by checking to see if you currently have project dependencies or if you have dependencies on jars. -Max Douglas Ferguson wrote: When using eclipse for multi-module projects: If I am working on 2 modules at the same time, is there anyway to have eclipse resolve dependencies without having to install them to the maven repository? When using the m2 plugin, is there an easy way to add a local dependency/parent/or submodule? When using the m2 plugin, do I have to configure all the goals I need to run per module? Since the basedir has to be set it seems like you have to configure all your modules and all the goals you want to run. __ Douglas W. Ferguson EPSIIA - Another Fiserv Connection Development Office Phone: 512-329-0081 ext. 3309 Dial Toll Free: 800-415-5946 Mobile Phone: 512-293-7279 Fax: 512-329-0086 [EMAIL PROTECTED] www.epsiia.com http://www.epsiia.com/ __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dependency on two versions
No. You must exclude the versions you don't want. This can be tricky to do, since dependencies quickly multiply. You could have just one direct dependency and up with MANY inherited dependencies. I have used a technique where I comment-out all the dependencies and add them back in to the project one-by-one while I keep a close eye on what dependencies I am inheriting. As a method to (relatively) quickly see all the dependencies, you can run 'mvn eclipse:eclipse' after you add each dependency and Refresh the project in Eclipse to see an updated list of all the dependencies. The order is somewhat random in Eclipse, however, which can makes the list difficult to scan. A directory listing of the WEB-INF/lib directory might be a better method if you have a webapp. So anyway, as you uncomment the dependencies one-by-one, you will know where an inherited dependency came from if you want to exclude it. You can also look at the pom.xml files for your direct dependencies to see a list of their dependencies. I was just thinking about this issue in general today, as I updated a project to use spring 2 one-big-jar and exclude spring 1 lots-of-partial-jars from some other dependencies. A GUI tool that helped with dependency management by interactively showing inherited dependencies and where they came from would be really useful. You could quickly setup the dependencies you want, and then dump out the corresponding pom.xml code. -Max Satish wrote: is there any way to specificy which version to take precedence in the classpath, looks like i have some other dependency jars which want the older version. I want the latest version to take precedence. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploying jars without version information
Having the version number in filenames can be problematic in some environments. For instance, when doing local development it is nice to strip the version number from the war/ear name so that you don't end up with two deployments if the version number changes. Some production environments have similar issues. For example, some webapps are deployed expanded. And the new version is simply dumped in over the old version. Requesting to have files deleted during a deployment in these schemes is overhead, and error-prone. I think that is a lousy way to setup a production deployment, but I have had to live with this kind of thing on more than one occasion in my professional career. I am sure I'm not the only one. I think the OP just wants to be able to build his war in such a way that the jars that maven puts into the WEB-INF/lib directory DO NOT have the version number in the filenames. Does anyone know how to do that? Off the top of my head, this might work: * Set the scope of the dependencies to provided so that Maven doesn't copy them to WEB-INF/lib * Use the maven-dependency-plugin to copy the jars, stripping the version number in the process However, that adds a lot of work to configure all the scopes and setup the copy for each dependency. Maybe there is a better way. -Max Mike Perham wrote: Can you guarantee that every jar in the maven repo has a manifest with its version in it? I certainly don't believe so. Not every jar in the repo was even built with maven. We recently realized we were packaging two versions of wstx-asl, because the groupIds changed and so maven considered them different artifacts. Now if you renamed the jar without the version, you won't know (a) you have a problem, (b) which version was chosen without some deep digging. Being able to see your resolved deps and their versions at a glance is a good thing. -Original Message- From: Ian Springer [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 4:40 PM To: Maven Users List Subject: RE: deploying jars without version information Isn't that what MANIFEST.MF files are for? | -Original Message- | From: Mike Perham [mailto:[EMAIL PROTECTED] | Sent: Tuesday, July 25, 2006 2:23 PM | To: Maven Users List | Subject: RE: deploying jars without version information | | Why? Removing version info is very dangerous. You then have no idea | which version was actually selected by Maven by looking in | the artifact | after the fact. | | -Original Message- | From: LaCasse, John [mailto:[EMAIL PROTECTED] | Sent: Tuesday, July 25, 2006 12:57 PM | To: Maven Users List | Subject: RE: deploying jars without version information | | I'm talking about the second case; in the | target\webapp\WEB-INF\lib. All | compile and runtime scoped dependant jars that get put into this | location; I would like the war plugin not to include the | version info on | all the jars it includes in this location. | | -Original Message- | From: Alexandre Poitras [mailto:[EMAIL PROTECTED] | Sent: Tuesday, July 25, 2006 10:53 AM | To: Maven Users List | Subject: Re: deploying jars without version information | | What do you means by deploting? Deploying on a maven repository or on | a application server ? In the first case, the answer is no because | Maven needs those metadatas to be able to manage dependencies. In the | other case, yes it's possible just change the name in your war/jar | plugin configuration section. | | On 7/25/06, LaCasse, John [EMAIL PROTECTED] wrote: | Hi, | | | | Does anybody know if you can have Maven deploy the jars | that end up in | webapp/WEB-INF/lib without the version information in the filename? | | | | Thanks, | | Jpl | | | | | - | 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] | | - 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]
Re: Excluding jars from my ear
David, Your ear module should not inherit dependencies that it doesn't need. One solution is to have your ear module NOT inherit from the parent pom. Another solution is to use the dependencyManagement section in the parent pom, and then specify which dependencies each module *really* uses in their own poms. dependencyManagement allows you to control dependency versions (and scope, etc.) across your whole project, without forcing modules to inherit dependencies they don't need. It is sloppy to have modules inheriting dependencies that they don't need, and this strategy eliminates the slop. A third solution is to have two levels of parent poms. One stripped-down super-parent, with no dependencies specified. The ear module will inherit directly from this super-parent. Then make your existing parent, the one with all the dependencies, also inherit from the super-parent. The other modules that really need the dependencies will inherit from the parent, rather than the super-parent. -Max David Smiley wrote: Hi. I have a multi-module project. My parent pom specifies the dependencies that are used by practically everything. I have an ear module that's sole purpose is to package up two war files (in other modules), but nothing else. It does this but includes jar's specified by my parent pom. But I don't want any of those at all... since they are included already in both war files. I want to keep the war files that way because that makes them independently complete. I looked at the ear plugin page and I see a mention of excludes but it doesn't seem to work. I have it like so: excludes*.jar/excludes What should I do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: settings.xml activation activeByDefault setting
Mykel, I am glad you posted your experience! I tried an empty activeByDefault/ the same way you did and assumed that it didn't work. I ended up listing the profile I wanted active in activeProfiles. And then setup an example settings.xml for the rest of my team to active the profile this way. So now my whole team is missing out on the simpler activeByDefault tag. If I had only known... :-) -Max Mykel Alvis wrote: Prepare to laugh at me, because today is my day for discovering that the sky is blue. I recently discovered something that most people almost certainly know but hasn't been clear to me for the last 12 months until about 10 minutes ago. I thought I kept hearing that I can specify repositories in my settings.xmlfile and make those the repos I use with all my builds, but this never seems to work for me and wanted to work out why. In my installation, I have a) a maven-proxy to central that handles all of my maven2 dependencies hosted at http://foo.com:/repository b) a non-proxied m1 repo that I use to acquire some artifacts from java.net( https://maven-repository.dev.java.net/nonav/repository/ ) maven-proxy doesn't like to deal with the java.net repo for some reason, calling it an unknown upstream repository type, so it's necessary to add another repository to my repositories in order to get those dependencies. I thought the following settings.xml would work: settings mirrors mirror idproxy/id nameMaven Mirror Managed by maven-proxy/name urlhttp://foo.com:/repository/url mirrorOfcentral/mirrorOf /mirror /mirrors servers server idlocal/id usernamemaven/username privateKey/home/malvis/.ssh/id_rsa/privateKey passphrasethisisthepassphraseformykey/passphrase /server server idlocal-ftp/id usernamemaven/username passwordmaven/password filePermissions666/filePermissions directoryPermissions777/directoryPermissions /server server idsite-local/id usernamemaven/username passwordmaven/password filePermissions666/filePermissions directoryPermissions777/directoryPermissions /server /servers profiles profile activation activeByDefault / /activation repositories repository idjava.net/id url https://maven-repository.dev.java.net/nonav/repository/url layoutlegacy/layout /repository /repositories /profile /profiles /settings The java.net repository was not picked up by builds. The builds that fail specify a parent pom which specifies no repositories itself. I thought, perhaps incorrectly, that by specifying a repository in a profile that was activeByDefault would make my build pick up that profile and all it's repositories which I thought would include the mirrored central as well as java.net. The odd part was that the build DOES pick up the fact that central is mirrored at the foo.com maven-proxy but not that it should include the java.net repo in it's list of repositories to try. Well, if I gave the profile a name and specified it on the command line the whole thing worked. But why not when I didn't specify the profile? It was, after all, activeByDefault/ Now, here comes the I'm slow punchline. activeByDefault/ is not a self-contained tag, but rather a boolean setting. Well, duh! I KNEW this somewhere in the down in sub-coccal region, but it slipped by me the whole time. Instead of activeByDefault/, which I incorrectly thought was the means to get a profile automatically activated, one must activeByDefaulttrue/activeByDefault Why did I think this? Two reasons, I guess, and not very good ones. One, I've seen very few working examples of someone elses's real settings.xml. After all, there are passwords and stuff in there and we're not supposed to post that sort of thing on the net. Two, because in the settings.xml reference, it's listed as a self-contained tag and I just copied it out of the reference. That's right! I'm a cut-and-paste junkie. Turns out the reference is NOT anything of an example. At some point I scrolled down and noticed that it was listed as a flag and even at my very slowest I can usually recognize that as an explicit boolean. And I've worked with practically every other tag that's listed as a closed tag but actually contains a value. But activeByDefault/ clearly slipped by my aging neurons. Once I'd figured this out, I went back to Better Builds, searched for activeByDefault, saw an example of it's proper use (p.106 in case you felt like pointing and laughing early), and was so embarassed that I felt the need to post it here, receive the derision
Re: New user
Many jars do not require manual installation. Don't install a jar manually if it is already available on the public repo: http://www.ibiblio.org/maven2/ I recommend reading the free maven2 book (http://www.mergere.com/m2book_download.jsp) to get started. A little time spent doing pure learning up front is well worth it. -Max Thierry Barnier wrote: Hi Mayank, as you put your jar files as dependencies, you should install them in your local repository, using the maven install-file command... More on this on: http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html Cheers Thierry 2006/7/11, Mayank Gupta [EMAIL PROTECTED]: Hi All, I am a new user and I am facing difficulty in understanding a basic maven concept. My source code need some jar files in the classpath (here which may be referred as a dependency). I add those in the dependency list of my pom.xml. But where I need to store those jar files so that at the time of compilation those jar files are picked? With Regards, Mayank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with checksum generation
My understanding is that the -Durl param is to tell maven where your repository is. It isn't totally clear, but in your command it looks like you are telling maven to install a jar to the spot that it already exists. That seems like a bad idea, and might be the cause of your troubles. Try it without the -Durl param. Or change the -Durl param to point to your local repo. Or make it point somewhere else, and then copy the files over, if you are stubborn. :-) Or move the jar outside of your repository before you try to install it. I generate my own checksums using md5sum and sha1sum sometimes. You can get these on Windows by installing Cygwin, and then installing the package(s) that contain the commands. I don't know what the package name(s) are. cat aopalliance-1.0.jar | md5sum aopalliance-1.0.jar.md5 cat aopalliance-1.0.jar | sha1sum aopalliance-1.0.jar.sha1 The pom is just a text file. Look at some other ones and adapt them to what you need. For aopalliance-1.0, you can just get it from ibiblio: http://ibiblio.org/maven2/aopalliance/aopalliance/1.0/ -Max v_waran wrote: Hi, I am trying to create POM and checksum for existing jar file. When I tried to run the below command POM and checksum files are created but jar file is overwritten to 4k.( I tried with different jar files but consistenly its overwritten to size of 4k.). Command used is mvn deploy:deploy-file -DrepositoryId=localRepository -Dpackaging=jar -Durl=file:\\D:\test\extlib2 -Dversion=1.0 -DgroupId=aopalliance -DartifactId=aopalliance -Dfile=..\..\extlib2\aopalliance\aopalliance\1.0\aopalliance-1.0.jar 1. Is their any option to not to overwrite the jar file (if it already exist) ? If not why does it create only to 4k ? Any idea ? 2. Any alternative way to create POM checksum file(s) for the existing jar file ? Any input is highly valuable. Regards, waran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE:Build process
Based on the error, I would guess that installing the subversion command line client would solve that problem: http://subversion.tigris.org/project_packages.html Note that you can have subversion, TortoiseSVN, SmartSVN, Subclipse (Eclipse plugin), etc. all installed at the same time, and use them on your project file trees without any disharmony. Each interface has it's strengths. -Max On Wed, 2006-07-05 at 10:58 +, Vinay Kumar wrote: Hi, I am still not able to checkout .when I am trying to checkout using command mvn scm:checkout then it throws error: 'svn' is not recognized as an internal or external command. I am using TortoiseSVN and putting bin directory of this doesn't resolves problem. my pom contains: ... . scm connection scm:svn:svn://[EMAIL PROTECTED]/sungard /connection developerConnection scm:svn:svn://[EMAIL PROTECTED]/sungard /developerConnection /scm ... ... Thanks Vinay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m204]jdk 1.5 String too long?
Mick, On first glance, that seems like an error from the OS, saying the command line is too long. However, I am surprised that Maven would be invoking javac with a command line. I expected that Maven would invoke the compiler in the same JVM (no command line). If there is some part of your build that is keeping Maven from invoking javac within the same JVM, you might consider finding a way to eliminate the forced forking. I think there is some kind of option (env variable) you can set to make Windows support longer command lines. You might search for that and try it. As a last resort, you might try making the path to your local repository shorter (by reconfiguring it in settings.xml). C:\.m2\repository or something like that would knock down the character count considerably. Or I could be off the mark entirely, and the error has nothing to do with a long command line string. :-) -Max Mick Knutson wrote: THis seems odd: [INFO] [compiler:compile] Compiling 11 source files to C:\pw-90\core\target\classes [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure Failure executing javac, but could not parse the error: The following character string is too long: -d C:\pw-90\core\target\classes -classpath C:\pw-90\core\target\classes;C:\Documents and Settings\mknutson\.m2\repository\o rg\springframework\spring-remoting\1.2.7\spring-remoting-1.2.7.jar;C:\Documents and Settings\mknutson\.m2\repository\aopallia nce\aopallitory\log4j\log4j\1.2.8\log4j-1.2.8.jar;C:\Documents and Settings\mknutson\.m2\repository\org\springframework\sprin g-context\1.2.7\spring-context-1.2.7.jar;C:\Documents and Settings\mknutson\.m2\repository\commons-httpclient\commons-httpcli ent\3.0\commons-httpclient-3.0.jar;C:\Documents and Settings\mknutson\.m2\repository\commons-lang\commons-lang\2.1\commons-la ng-2.1.jar;C:\Documents and Settings\mknutson\.m2\repository\logkit\logkit\1.0.1\logkit-1.0.1.jar;C:\Documents and Settings\m knutson\.m2\repository\commons-dbcp\commons-dbcp\1.2\commons-dbcp-1.2.jar;C:\Documents and Settings\mknutson\.m2\repository\o rg\springframework\spring-webmvc\1.2.7\spring-webmvc-1.2.7.jar;C:\Documents and Settings\mknutson\.m2\repository\org\springfr amework\spring-jdbc\1.2.7\spring-jdbc-1.2.7.jar;C:\Documents and Settings\mknutson\.m2\repository\commons-collections\commons -collections\3.1\commons-collections-3.1.jar;C:\Documents and Settings\mknutson\.m2\repository\avalon-framework\avalon-framew ork\4.1.3\avalon-framework-4.1.3.jar;C:\Documents and Settings\mknutson\.m2\repository\org\springframework\spring-mock\1.2.8\ spring-mock-1.2.8.jar;C:\Documents and Settings\mknutson\.m2\repository\oro\oro\2.0.8\oro-2.0.8.jar;C:\Documents and Settings \mknutson\.m2\repository\commons-beanutils\commons-beanutils\1.6.1\commons-beanutils-1.6.1.jar;C:\Documents and Settings\mknu tson\.m2\repository\org\springframework\spring-web\1.2.7\spring-web-1.2.7.jar;C:\Documents and Settings\mknutson\.m2\reposito ry\org\springframework\spring-beans\1.2.7\spring-beans-1.2.7.jar;C:\Documents and Settings\mknutson\.m2\repository\org\spring framework\spring-dao\1.2.7\spring-dao-1.2.7.jar;C:\Documents and Settings\mknutson\.m2\repository\xerces\xercesImpl\2.0.2\xer cesImpl-2.0.2.jar;C:\Documents and Settings\mknutson\.m2\repository\org\springframework\spring-aop\1.2.7\spring-aop-1.2.7.jar ;C:\Documents and Settings\mknutson\.m2\repository\org\acegisecurity\acegi-security\1.0.1\acegi-security-1.0.1.jar;C:\Documen ts and Settings\mknutson\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar;C:\Documents and Settings\mknut son\.m2\repository\commons-logging\commons-logging\1.1\commons-logging-1.1.jar;C:\Documents and Settings\mknutson\.m2\reposit ory\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar;C:\Documents and Settings\mknutson\.m2\repository\dom4j\dom4j\1.6.1\dom 4j-1.6.1.jar;C:\Documents and Settings\mknutson\.m2\repository\org\springframework\spring\1.2.8\spring-1.2.8.jar;C:\Documents and Settings\mknutson\.m2\repository\org\springframework\spring-core\1.2.7\spring-core-1.2.7.jar;C:\Documents and Settings\m knutson\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Documents and Settings\mknutson\.m2\repository\commons -pool\commons-pool\1.2\commons-pool-1.2.jar; C:\pw-90\core\src\main\java\com\prounlimited\util\security\vote\ProBasicAclEntr yVoter.java C:\pw-90\core\src\main\java\com\prounlimited\util\xml\XMLParseException.java C:\pw-90\core\src\main\java\com\prou nlimited\util\UtilException.java C:\pw-90\core\src\main\java\com\prounlimited\util\lang\ChrBuffer.java C:\pw-90\core\src\main \java\com\prounlimited\util\xml\XMLParser.java C:\pw-90\core\src\main\java\com\prounlimited\util\lang\KeyVal.java C:\pw-90\co re\src\main\java\com\prounlimited\util\AppLogger.java
Re: hibernate3 extension - No Suitable Driver
Look at the page you posted a link to. It clearly shows how to specify your JDBC driver library as an extension. Do that, and your error will go away. -Max bkbonner wrote: I meant to include this link to the Maven-hibernate3 mojo: http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/howto.html Thanks. -- View this message in context: http://www.nabble.com/hibernate3-extension---No-Suitable-Driver-t1838389.html#a5018707 Sent from the Maven - Users forum at Nabble.com. - 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: Top-level POM behaviour
Okay, after looking at your POMs, this is what I think is happening... 1. When you build project A, maven probably uses the relativePath in the parent section to locate the parent POM (rather than looking in the local repository). 2. When you build project B, maven uses the relativePath to find B's parent. But during dependency processing, maven looks at project A's POM and ignores the relativePath (since maven does not know where A was built from, and thus cannot resolve the relative path). Maven must be able to locate Top's POM in the repo, but it isn't there, so the build fails. I think that you ultimately must install the parent POM before building modules that reference it. If you wish, you can separate the top and parent: top/ + parent + A + B + C top will list parent, A, B, and C as modules. parent will be the parent for A, B, C, and maybe even top. Side note: Perhaps the parent/relativePath element is most useful (and least dangerous) in this context, so that top can reference parent. If you install top it will necessarily also install parent. This eliminates the chance for a confusing missing dependency problem like the one that lead to this email thread. -Max Lars Gråmark wrote: I'm sorry if you didn't understand my previous mail :) Anayway, I attached the POMs in my other mail and as you can see project A do have a parent dependency to the top POM. /Lars On Thu, 2006-06-22 at 09:41 +0200, Lars Gråmark wrote: Hej, kontrollera gärna att jag inte skickar nåt jag inte borde skicka. Det är lätt att missa nåt. mvh Lars On Wed, 2006-06-21 at 14:47 -0700, Max Cooper wrote: I would expect that running install on module A would fail if it really had a dependency on the top-level POM, and the top-level POM was not available in the local repo. You can think of your project as having four modules, A B C and Top. The dependencies you described are: A, B, C depend on Top B, C depend on A Based on this dependency structure, you should have to install project Top before any of the others will build individually. However, based on your reports of the build behavior, it doesn't sound like A depends on Top. Does the pom.xml file for A really have a parent section that refers to Top? -Max Lars Gramark wrote: Hello, I get a Failed to resolve artefact message when I'm installing one of my sub-projects. Here is the background: We have three projects A, B and C and there is a dependency from B = A and from C = A. Project A do not have any dependencies to any other project but all three projects are organized by a top-POM with the id product. When I install project A onto a clean local repository (mvn install), everything seems fine but when I install project B I get the error message below indicating that it cannot find the top POM snapshot in the repository. [INFO] Failed to resolve artifact. GroupId: mygroupid ArtifactId: product Version: 1.4-SNAPSHOT The error does not occur if I perform the installation from the top-POM but this is not always the preferable way. The current workaround for me is to do a mvn install -N from the top level to skip recursing in the sub-project but this seems a bit akward way of solving the problem. Since all sub-project have parent references it seems to me that there is enough information for Maven to compile and install project B or am I missing something? Why does project B require a top-POM in the local repository but not project A? I would really appreciate if someone could explain what going on. Thanks in advance Lars Gramark -- View this message in context: http://www.nabble.com/Top-level-POM-behaviour-t1825699.html#a4980080 Sent from the Maven - Users forum at Nabble.com. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Top-level POM behaviour
I would expect that running install on module A would fail if it really had a dependency on the top-level POM, and the top-level POM was not available in the local repo. You can think of your project as having four modules, A B C and Top. The dependencies you described are: A, B, C depend on Top B, C depend on A Based on this dependency structure, you should have to install project Top before any of the others will build individually. However, based on your reports of the build behavior, it doesn't sound like A depends on Top. Does the pom.xml file for A really have a parent section that refers to Top? -Max Lars Gramark wrote: Hello, I get a Failed to resolve artefact message when I'm installing one of my sub-projects. Here is the background: We have three projects A, B and C and there is a dependency from B = A and from C = A. Project A do not have any dependencies to any other project but all three projects are organized by a top-POM with the id product. When I install project A onto a clean local repository (mvn install), everything seems fine but when I install project B I get the error message below indicating that it cannot find the top POM snapshot in the repository. [INFO] Failed to resolve artifact. GroupId: mygroupid ArtifactId: product Version: 1.4-SNAPSHOT The error does not occur if I perform the installation from the top-POM but this is not always the preferable way. The current workaround for me is to do a mvn install -N from the top level to skip recursing in the sub-project but this seems a bit akward way of solving the problem. Since all sub-project have parent references it seems to me that there is enough information for Maven to compile and install project B or am I missing something? Why does project B require a top-POM in the local repository but not project A? I would really appreciate if someone could explain what going on. Thanks in advance Lars Gramark -- View this message in context: http://www.nabble.com/Top-level-POM-behaviour-t1825699.html#a4980080 Sent from the Maven - Users forum at Nabble.com. - 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: [M2] Ant filer task
rebels_mascot wrote: Hey, I'm very confused as how to change from using: ant:filter token=s_sql value=${dev.db.s_sql} / in maven 1 to it's eqivelent in maven 2? Should this be included in resources? You probably want to change the token in the resource file to match the property name. Based on what you posted above, you would change @s_sql@ to ${dev.db.s_sql} in the resource file. Maven 2 also supports '@' token delimiters, if you prefer those (but try ${} if @@ isn't working for you -- they don't behave precisely that same way). This page shows how to set up filtering: http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20filter%20resource%20files? dev.db.s_sql is delared in the build.properties in the user home folder. Do I know declare dev.db.s_sql in the settings.xml and if so, where? Yes, you most likely want it in each developer's settings.xml file. (As an alternative, you could put a default value in your pom.xml, that could be optionally overridden in settings.xml.) Here's a sample of how you might declare a profile with this variable in settings.xml, and then set that profile to be active all the time: settings profiles profile idyourapp/id properties dev.db.s_sqlsomevalue/dev.db.s_sql /properties /profile /profiles activeProfiles activeProfileyourapp/activeProfile /activeProfiles /settings Or should I be using antrun? You don't need antrun for normal filtering. -Max -- View this message in context: http://www.nabble.com/-M2--Ant-filer-task-t1817822.html#a4955769 Sent from the Maven - Users forum at Nabble.com. - 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]
how can I use the ReplaceRegExp task in an antrun script?
I need to be able to use ReplaceRegExp task in an antrun script. However, using ReplaceRegExp requires at least one additional jar in the Ant classpath (see: http://ant.apache.org/manual/CoreTypes/regexp.html). I don't know how to get the additional jar into the Ant classpath. In my case, I want to use the JDK1.4 regexp package, which requires ant-nodeps.jar. I have set the value of ant.regexp.regexpimpl to org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp to make my choice clear to Ant. To make my question absolutely clear, what do I need to change in this pom.xml file to make this build succeed? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdfoo/groupId artifactIdbar/artifactId version1.0-SNAPSHOT/version packagingjar/packaging build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution idbaz/id phaseprocess-classes/phase configuration tasks property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp/ replaceregexp file=build.properties match=OldProperty=(.*) replace=NewProperty=\1 byline=true/ /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project Thanks, -Max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can I use the ReplaceRegExp task in an antrun script?
Now I feel silly. I found the answer in the docs, here: http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html Here's my exmaple POM after applying the required changes to make it work (note the dependencies added to the plugin): project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdfoo/groupId artifactIdbar/artifactId version1.0-SNAPSHOT/version packagingjar/packaging build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution idbaz/id phaseprocess-classes/phase configuration tasks property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp/ replaceregexp file=build.properties match=OldProperty=(.*) replace=NewProperty=\1 byline=true/ /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdant/groupId artifactIdant-nodeps/artifactId version1.6.5/version /dependency /dependencies /plugin /plugins /build /project -Max Max Cooper wrote: I need to be able to use ReplaceRegExp task in an antrun script. However, using ReplaceRegExp requires at least one additional jar in the Ant classpath (see: http://ant.apache.org/manual/CoreTypes/regexp.html). I don't know how to get the additional jar into the Ant classpath. In my case, I want to use the JDK1.4 regexp package, which requires ant-nodeps.jar. I have set the value of ant.regexp.regexpimpl to org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp to make my choice clear to Ant. To make my question absolutely clear, what do I need to change in this pom.xml file to make this build succeed? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdfoo/groupId artifactIdbar/artifactId version1.0-SNAPSHOT/version packagingjar/packaging build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution idbaz/id phaseprocess-classes/phase configuration tasks property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp/ replaceregexp file=build.properties match=OldProperty=(.*) replace=NewProperty=\1 byline=true/ /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project Thanks, -Max - 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: antrun classpaths
This is a bit of a long-shot, but I have noticed that property inheritance doesn't work as described in the docs, thus requiring each property to be explicitly passed along: ant antfile=build-helper.xml target=visualize-whirled-peas !-- should be available automatically, but isn't -- property name=project.version value=${project.version}/ /ant Maybe a similar technique is required for references? (I haven't tried it, but that is my suggestion.): ant target=axisWsdl2Java reference torefid=maven.runtime.classpath refid=maven.runtime.classpath/ /ant -Max Lee Meador wrote: Does anyone have any ideas on why I can't get the maven classpath in my ant script? On 6/13/06, Lee Meador [EMAIL PROTECTED] wrote: Kenney, Well ... you said it shouldn't matter and it didn't. I had checked that the -X showed it using 1.1 but who knows? Thanks. NOTE TO ALL: More ideas are welcome -- Lee On 6/13/06, Kenney Westerhof [EMAIL PROTECTED] wrote: On Tue, 13 Jun 2006, Lee Meador wrote: Try pasting this in the pom.xml in place of the ant/ tag. Shouldn't matter, but who knows. Maybe you're still using maven-antrun-plugin 1.0, try adding version 1.1/version below the plugin tag. -- Kenney path id=axis.classpath path refid=maven.runtime.classpath/ /path taskdef resource=axis-tasks.properties classpathref= axis.classpath / On 6/12/06, Kenney Westerhof [EMAIL PROTECTED] wrote: On Mon, 12 Jun 2006, Lee Meador wrote: Hi, I can't reproduce this with 'inheritRefs=true'. What do you have in your build.xml? -- Kenney I went to here to see how to let ant get to some maven classpaths: http://maven.apache.org/plugins/maven-antrun-plugin/classpaths.html I have a build.xml file that I run with this in my pom: build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase goals goalrun/goal /goals configuration tasks ant inheritRefs=true target=axisWsdl2Java antfile=build.xml dir=. / /tasks sourceRoot${ project.build.directory }/generated-sources/java/sourceRoot /configuration /execution /executions /plugin /plugins /build But it complains that: [ERROR] BUILD ERROR [INFO] [INFO] Error executing ant tasks Embedded error: The following error occurred while executing this line: [path here]\build.xml:31: Reference maven.runtime.classpath not Any ideas? Is the doc page up to date? Thanks. -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.keyhttp://www.gods.nl/%7Eforge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.keyhttp://www.gods.nl/%7Eforge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] How to exclude a class from WEB-INF/classes using war plugin
Since it is a class file (as opposed to src/main/webapp content), I suspect that you need to exclude it from the compile, rather than trying to exclude it from the webapp. -Max Mark Reynolds wrote: Just wondering if anyone knows the answer to this. Not sure if it is a bug or if I am just not doing it right. Thanks. -- Mark Reynolds Mark Reynolds wrote: I have a single class I want to exclude from the my WAR file. It is named Install.class and is in the root package (no package). I have tried this: plugin artifactIdmaven-war-plugin/artifactId configuration excludes exclude**/Install*/exclude /excludes /configuration /plugin and this: plugin artifactIdmaven-war-plugin/artifactId configuration excludes**/Install*/excludes /configuration /plugin but neither work. - 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: Maven 2 sources/javadocs installation question
My experience is that the Eclipse plugin does setup intra-project dependencies properly. so long as you run 'mvn eclipse:eclipse' from the root of the project (as opposed to running it for each module individually). If I have a project with moduleA and moduleB, and moduleB depends on moduleA, I will get an Eclipse project dependency (as opposed to a dependency on the M2_REPO/.../moduleA-1.0.jar) when I run 'mvn eclipse:eclipse' from the root of the project. In what way is the eclipse plugin not creating these dependencies properly for you? -Max Brad Davis wrote: Because the eclipse plugin doesn't properly set up intra project relationships it would be nice to have an explicit build step that could generate and deploy javadoc and source jars, even for snapshot releases. Brad - Original Message - From: Stephen Duncan [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Sent: Friday, June 09, 2006 6:11 PM Subject: Re: Maven 2 sources/javadocs installation question You can simply run mvn -DperformRelease=true install This will build source javadoc jars install them. No configuration option. -Stephen On 6/9/06, Matt Wheeler [EMAIL PROTECTED] wrote: Never mind my last email. I moved the plugin under build outside of profiles and added a package phase, and it works now. Matt W. -- NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- -- Forwarded message -- From: Matt Wheeler [EMAIL PROTECTED] To: users@maven.apache.org Date: Fri, 09 Jun 2006 09:45:29 -0600 Subject: Maven 2 sources/javadocs installation question I have a project that I run install on to install the project and all of its sub project's main artifacts in the local repository. However, I would also like to automatically install the sources and the javadocs as well. I can generate these using sources:jar and javadoc:jar commands, however, I cannot get them to be automatically generated using the profile section in the pom that is shown in the documentation under Introduction to the POM at http://maven.apache.org/guides/introduction/introduction-to-the-pom.html. What would I need to do to make that example work? Also, even if I coudl get the profile to generate the source and javadoc jars, I am not sure how to install them. I assume that I could use install:install-file, but I woudl really like a more automated way if there is one. I have tried to install them manually, but the problem is that I can't get it to install in the same directory as the projects main artifact. For instance, say my project artifact is in .m2/repository/org/whatever/2.0-SNAPSHOT/stack-code-2.0-SNAPSHOT.jar. Well, if I then run a commond something like: mvn install:install-file -DartifactId=stack-code -DgroupId=org.lds.stack -Dpackaging=jar -Dversion=2.0-SNAPSHOT -Dfile=D:/Projects/Stack/stack-code/target/stack-code-2.0-SNAPSHOT-sources.jar Then, it overwrites the projects main artifact stack-code-2.0-SNAPSHOT.jar. However, if I change the version to 2.0-SNAPSHOT-sources, then it put the jar (this time with the correct name stack-code-2.0-SNAPSHOT-sources) out in the repository, but under a 2.0-SNAPSHOT-sources directory instead of under the 2.0-SNAPSHOT directory with the main artifact. I am am seeing sources placed correctly on ibiblio however, so I am just wondering what I am doing wrong, or if there is an easier way to accomplish this? Thanks, Matt W. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stephen Duncan Jr www.stephenduncanjr.com - 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]
Re: NoClassDefFoundErrorfor a few classes that seems to be in the classp
Make sure that the specific class(es) you get the exceptions for really are in the jars that exist in your local repo (i.e. rule out the possibility that you got a bad jar file, failed download, or the wrong version, etc.). Maven has some options to verify checksums (-C and -c), though I am not certain if they will be verified for dependencies that were already downloaded. This might ensure the integrity of the downloads. You could also move/delete your ~/.m2/repository dir to see if re-downloading them all fixes the issue. In maven1, I remember having some bad jars as a result of hitting ctrl-C while maven was downloading a jar. You can look inside the dependency jars in Eclipse to verify the presence of the class(es) you got the exceptions for. I also find JarsBrowser to be a convenient tool for this kind of thing. You don't even need to install it, just run this command to Java WebStart it: javaws http://cmarton.free.fr/jarsbrowser/jarsbrowser.jnlp ...and then point it at ~/.m2/repository. Then start to type the class file name (use slashes between the package names, as opposed to dots) that you are looking for in the Search field: org/foo/bar/fubar -Max Jimisola Laursen wrote: I have added a few libraries to our internal repository, e.g. mocquer. All added libraries our found in my local repository as well as in our internal one. root POM: dependencyManagement [...] dependencies dependency artifactIdc3p0/artifactId groupIdc3p0/groupId version0.9.0.4/version /dependency dependency artifactIddom4j/artifactId groupIddom4j/groupId version1.6.1/version /dependency dependency artifactIdxmlrpc/artifactId groupIdxmlrpc/groupId version2.0.1/version /dependency dependency artifactIdcommons-codec/artifactId groupIdcommons-codec/groupId version1.3/version /dependency dependency artifactIdcommons-httpclient/artifactId groupIdcommons-httpclient/groupId version3.0.1/version /dependency dependency artifactIdcommons-lang/artifactId groupIdcommons-lang/groupId version2.1/version /dependency dependency groupIdorg.postgresql/groupId artifactIdpg-jdbc/artifactId version74.215.jdbc3/version /dependency dependency artifactIdderby/artifactId groupIdorg.apache.derby/groupId version10.1.2.1/version /dependency dependency artifactIdderbytools/artifactId groupIdorg.apache.derby/groupId version10.1.2.1/version /dependency dependency artifactIdbcel/artifactId groupIdbcel/groupId version5.1/version /dependency dependency artifactIdjaxen/artifactId groupIdjaxen/groupId version1.1-beta-9/version /dependency dependency artifactIdjtds/artifactId groupIdnet.sourceforge.jtds/groupId version1.2/version /dependency dependency artifactIdxmlunit/artifactId groupIdxmlunit/groupId version1.0/version scopetest/scope /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.2/version scopetest/scope /dependency dependency groupIdorg.jingle.mocquer/groupId artifactIdmocquer/artifactId version0.9.3/version scopetest/scope /dependency dependency artifactIdlog4j/artifactId groupIdlog4j/groupId version1.2.13/version /dependency dependency artifactIdaspectjrt/artifactId groupIdaspectj/groupId version1.5.0/version /dependency dependency groupIdjavax.mail/groupId artifactIdmail/artifactId version1.3.3_01/version /dependency dependency artifactIdxmlunit/artifactId groupIdxmlunit/groupId version1.0/version scopetest/scope /dependency dependency groupIddbunit/groupId artifactIddbunit/artifactId version2.1/version scopetest/scope /dependency /dependencies /dependencyManagement server module pom: dependencies [...] dependency groupIdxmlrpc/groupId artifactIdxmlrpc/artifactId /dependency dependency groupIdcommons-codec/groupId artifactIdcommons-codec/artifactId /dependency dependency groupIdcommons-httpclient/groupId artifactIdcommons-httpclient/artifactId /dependency dependency groupIdcommons-lang/groupId artifactIdcommons-lang/artifactId /dependency dependency groupIdorg.apache.derby/groupId artifactIdderby/artifactId /dependency dependency groupIdorg.apache.derby/groupId artifactIdderbytools/artifactId /dependency dependency groupIdnet.sourceforge.jtds/groupId artifactIdjtds/artifactId /dependency dependency groupIdorg.postgresql/groupId artifactIdpg-jdbc/artifactId
Re: Maven Standard Directory Layout
Here are my suggestions, but YMMV: You want these to load via a classloader... src/main/resources/log4j.properties src/main/resources/hibernate.cfg.xml These are just webapp content... src/main/webapp/wherever-you-want-js-files-in-your-webapp/*.js src/main/webapp/wherever-you-want-image-files-in-your-webapp/*.jpg, etc. These will load as resources relative to your webapp (really just more webapp content, but with standard locations)... src/main/webapp/WEB-INF/struts-config.xml src/main/webapp/WEB-INF/springapp-servlet.xml For the shell scripts, it depends on what they do. And even then, there may not be a convention. Do they start an app (look where the 'mvn' script is in the maven source tree), start a server, get executed by your app in the background? src/site is for the project web site that maven can create and publish for you. It is NOT for sources that comprise your application's webapp. -Max wolverine my wrote: Hi! We have a plan to migrate from Ant to Maven in the future. Until then, we would like to start our project using Ant but following the Maven's standard directory layout (see http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html). However, we still have a couple of questions regarding the directory layout: Which directory the log4j.properties, hibernate.cfg.xml, struts-config.xml, springapp-servlet.xml and other application specific configuration files should be saved? src/main/config looks like the appropriate directory for these files but I also seen these files in src/main/resources and src/main/webapp. Which directory the Javascript files (*.js) should be saved? Which directory the Unix shell script (*.ksh, *.sh) should be saved? Which directory the images and pictures (*.jpg, *.bmp) should be saved? What does the src/site directory contains? I would like to suggest that in the Introduction to the Standard Directory Layout chapter, it would be very useful to describe and give examples of where the well-known files are saved in the Maven's directories. - 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: Maven Standard Directory Layout
wolverine my wrote: The src/main/resources directory contains only the configurations which will be loaded by the classloader? So we really need to study the 3rd party library configurations to see if they are loaded via the classloader... Do you want the files to end up in WEB-INF/classes (i.e. loaded from classpath) or just WEB-INF (or some other directory, relative to webapp root)? Maven doesn't really complicate things much here, since you have to make those choices anyway. You don't need to look at the source code of the component that does the loading in most cases. What should the src/main/config contains? Nothing that I am aware of. Typicaly we have the scripts to start application or server, and scripts for utilities (backup, housekeeping), and what do you think if we save these scripts in /src/main/bin directory? Or do we save these scripts into difference directories? src/main/bin sounds reasonable. You'll probably need to (eventually) consider how you want these files to end up in a build artifact, and then how you are going to tell maven to find them. -Max I wish to see more tips and guides in the Maven standard directory layout description :-) - 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: cli parameters vs pom
This might work: 1. Make up a name for a property, like assemblyOutputDirectory, or carrots.are.orange (it doesn't matter what the name is, technically). 2. Configure the assembly plugin (in your pom.xml) to use the value of this property as the outputDirectory. blah, blah, xml, blah... outputDirectory${assemblyOutputDirectory}/outputDirectory 3. Provide a default value for the property in the pom.xml file: properties assemblyOutputDirectory${project.build.directory}/assemblyOutputDirectory /properties 4. Optionally override the default on the command line: mvn -DassemblyOutputDirectory=target/skittles install -Max [EMAIL PROTECTED] wrote: Hi, I have been trying to configure the parameters for the assembly plugin and have not been able to set the outputDirectory parameter when running from the command line % mvn -DoutputDirectory= I believe that the determination of the value to use is handled by PluginParameterExpressionEvaluator.evaluate(). The default setting for the outputDirectory in the Mojo is ${project.build.directory}. The evaluate() method substitutes the value by using the project/model. Is there a way to override this from the command line or another way of setting a property that is given a default value based on project such as outputDirectory? Thanks in advance, Brian - 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: Maven-IDEA-Plugin documentation?
I agree that the navigation is a bit odd. But you can click on Plugin Documentation in the Project Reports group to get there. Remember that, because you will need to do the same for many other plugins. :-) -Max Stefan Arentz wrote: Thanks, that is very useful. I looked again but I cannot find a link to this page when I enter through http://maven.apache.org/plugins/maven-idea-plugin/ S. On 6/8/06, Geoffrey De Smet [EMAIL PROTECTED] wrote: I base everything on http://maven.apache.org/plugins/maven-idea-plugin/plugin-info.html follow the idea:module goals link etc Stefan Arentz wrote: Is there documentation for the IDEA plugin somewhere? The documentation at: http://maven.apache.org/plugins/maven-idea-plugin/index.html is kind of lacking. S. -- With kind regards, Geoffrey De Smet - 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]
Re: JSP compiler plugin
Did I read that correctly that . is your warSourceDirectory? I would expect many issues with that directory structure, though I am not sure if your current issue is related. -Max Alexandre Poitras wrote: Is c.tld located in src/main/resources/WEB-INF/tld? On 6/7/06, Eugeny N Dzhurinsky [EMAIL PROTECTED] wrote: plugin groupIdorg.codehaus.mojo/groupId artifactIdjspc-maven-plugin/artifactId executions execution idjspc/id phasecompile/phase goals goalcompile/goal /goals configuration inputWebXml./WEB-INF/web.xml/inputWebXml injectStringnonexistent/injectString outputWebXml/dev/null/outputWebXml warSourceDirectory./warSourceDirectory workingDirectoryjsp-compile/workingDirectory /configuration /execution /executions /plugin for soem reason I'm getting this error: [INFO] [jspc:compile {execution: jspc}] [INFO] Built File: /MML/index.jsp [WARN] Internal Error: File /WEB-INF/web.xml not found [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error Embedded error: File /WEB-INF/tld/c.tld not found But there is WEB-INF/tld directory inside module and it contains c.tld file. Also WEB-INF/web.xml exists. Any ideas what needs to be specified? -- Eugene N Dzhurinsky - 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]
Re: [m2] Is there a way to turn off downloading of poms?
Using a proxy (like maven-proxy or proximity) can be employed to reduce the frequency of download errors. You could put fake/generated POMs in your local repo, or in a shared repo, such as a maven-proxy instance. Then maven would find the POMs and stop trying to download them. I grant that setting this up can be a PITA, but you need to do what you need to do to get your project running smoothly -- There is no royal road, but there is a road. -Max Jason Chaffee wrote: Neither one of these solutions seems to work. It appears that maven always attempts to download poms that do not exist in any remote repositories and sometimes it will fail because of a download error. Sometimes, I can run it again right away and it will work...sometimes it will take the entire day before it works. -Original Message- From: Alexandre Poitras [mailto:[EMAIL PROTECTED] Sent: Monday, June 05, 2006 4:37 PM To: Maven Users List Subject: Re: [m2] Is there a way to turn off downloading of poms? Change your repository declaration order. It should do the trick but a better option would be to use Maven Proxy or Proximity. This way, Maven would only go to one place to get what is needed to build your projet. On 6/5/06, Jason Chaffee [EMAIL PROTECTED] wrote: My builds are constantly failing even when I build offline because maven is attempting to download pom files for dependencies. However, most of these dependencies do not have poms in the remote repo because they are coming from legacy repos. This is an extremely annoying feature that can cause me not to build for an entire day. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EAR deploy
Here are two maven2 plugins that you may wish to consider: 1) http://mojo.codehaus.org/jboss-maven-plugin/ 2) http://cargo.codehaus.org/Maven2+plugin On my project, I ended up needing more functionality than either of these plugins provided, so I used the jboss-maven-plugin as a base and extended it. You may need to do the same. -Max RTK wrote: I created ear using pom.xml and i am not able to copy it into my jboss folder...pls give me a snap code for this task -- View this message in context: http://www.nabble.com/EAR-deploy-t1729803.html#a4700075 Sent from the Maven - Users forum at Nabble.com. - 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: Problem with filtering of property files
I am not precisely sure what the difference is, but from looking at the filtering code in the maven-resources-plugin in the past, I know that it does treat *.properties files differently than other files. These things might make a difference, too: 1. What delimiters are you using for the tokens? ${} is probably more likely to work than @@. 2. How are the properties specified? There is an issue with replacing system properties (specified on the command line with -Dname=value). Are you are using system properties in your token replacements? 3. Watch out for typos that might mess up the token replacement engine. For example, an unmatched }, {, or @ character can mess up replacement. As a real-world example of #3, the jboss-service.xml file that ships with JBoss 4.0.3SP1 has a typo in it, and my token replacements weren't working properly until I resolved it. This was the offending line (note the paren instead of curly brace after jboss.server.home): scans ${jboss.server.home)/deploy, which is always local -Max Claus Myglegaard Vagner wrote: Hi, I have a problem filtering property files (using maven 2.0.4): Setup: ... build finalNameplanb/finalName sourceDirectorysrc/java/sourceDirectory testSourceDirectorysrc/test/testSourceDirectory filters filter${basedir}/context.properties/filter /filters resources resource directory${basedir}/src/conf/directory filteringtrue/filtering includes includecontext.xml/include includeversion.properties/include /includes /resource ... /resources ... /build ... Filtering of the above context.xml works fine, but filtering of version.properties dosn't seem to work? If I create a version.xml file instead an replaces it with version.properties again it works... (any difference for *.xml contra *.properties filtering?) Ideally I would like to use settings.xml as filter instead of context.properties but it only seems to work with context.properties... Can anybody please help me with 1. why isn't version.properties being filtered? 2. why can't I use settings.xml as a filter? Best Regards, Claus - 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: scripts/bin directory
I am just another Maven user, so don't take this response as Maven gospel... I assume you mean scripts that end users will run to start your application, or something of that nature. I am not aware of any plugins that do anything with such scripts, so I don't think there is a prescribed location. Perhaps src/main/scripts or something like that would be a reasonable choice. How do these scripts become a part of an artifact produced by the maven build? You will likely have to configure a plugin with the path that you choose. -Max EJ Ciramella wrote: According to the following document http://maven.apache.org/guides/introduction/introduction-to-the-standard -directory-layout.html Where are scripts supposed to be located (and where is this mentioned on the site)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-was-plugin
I had an issue with the jboss-maven-plugin in cases where there are spaces in the path to my project's exploded webapp. One of the jboss-maven-plugin goals constructs a URL with the path as an HTTP parameter value. This was the problem. The solution was to URLEncoder.encode() the path when constructing the URL. My project already has the jboss-maven-plugin module in our build (since we modded it to do other things as well), so this was easy for us. If you are using a public build of maven-was-plugin, you will need to submit a patch and wait for another release, or pull the plugin into your project as a module. If the maven-was-plugin is using HTTP to talk to WAS, the issue and solution might be similar. -Max Lee Meador wrote: Also in windows each folder and file has short name that has no spaces in it and is 8 or less characters. You can see the short name by going to a DOS box and using dir /X which adds a column about midscreen showing the short form. Then specify the short names to define that path. It would be something like: c:\PROGRA~1\IBM\RATIONAL\SDP and so forth. -- Lee On 6/2/06, Wayne Fay [EMAIL PROTECTED] wrote: Spaces in directories on Windows are a known issue in Java when dealing with RMI. And while I don't use it myself, its a good guess that this plugin uses RMI to talk to the WAS for deploying your EAR. You will need to reinstall to a directory with no spaces. Alternatively, you could perhaps use the subst command to create a fake k:\ drive (or similar) for your c:\program files\ibm directory. Then your path would be k:\rational\... which has no spaces. Wayne On 6/2/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I d like to make ear deployment automatically on websphere 5.1. After some search, David Karlsen's plugin [maven-was-plugin] seems to fit exactly my need. But there are some issues that I can not resolve. To sum up, there are some points I made previously: - WAS_HOME is set to installation directory of used server ([C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v51] in my case) - JAVA_HOME is set to WAS'jre because the deployment script need it. (JAVA_HOME=%WAS_HOME%\java) - %WAS_HOME%/bin and %WAS_HOME%\deploytool\itp are adding in the PATH PATH=%WAS_HOME%/bin;%WAS_HOME%\deploytool\itp;%PATH% - WAS_EXT_DIRS=%WAS_HOME%\java\lib;%WAS_HOME%\lib\classes;%WAS_HOME%\lib\lib;% WAS_HOME%\lib\lib\ext;%WAS_HOME%\lib\web\help - in the project pom file, I also declared the plugin repository of maven-was-plugin. NB: to be sure, I replaced all used env variables by its real value. Finally mvn returns following error: [ERROR] The java class is not found: Files\IBM\Rational\SDP\6/0\runtimes\base_v51\java\lib;C:\Program It seems that space character in the path is not allowed... But I do not want to reinstall all. Does anyone have created unit test of this plugin ? or find a solution ? Thanks for your help, Andre This message is intended for the addressee or its representative only. Any form of unauthorized use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. If you are not the intended recipient of this e-mail message and its contents, please notify the sender immediately and delete this message and all its attachments subsequently. - 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]
Re: maven-was-plugin
I just read your original message, and I remembered some other issues with spaces in paths that I had with jboss-maven-plugin... I had to go through and add quotes to some of the scripts in the plugin so that the scripts would execute correctly when there are spaces in paths. If maven-was-plugin also uses some DOS/Windows batch files to work it's magic, you might have to go through those scripts and add quotes to make them work when there are spaces in paths. -Max Max Cooper wrote: I had an issue with the jboss-maven-plugin in cases where there are spaces in the path to my project's exploded webapp. One of the jboss-maven-plugin goals constructs a URL with the path as an HTTP parameter value. This was the problem. The solution was to URLEncoder.encode() the path when constructing the URL. My project already has the jboss-maven-plugin module in our build (since we modded it to do other things as well), so this was easy for us. If you are using a public build of maven-was-plugin, you will need to submit a patch and wait for another release, or pull the plugin into your project as a module. If the maven-was-plugin is using HTTP to talk to WAS, the issue and solution might be similar. -Max Lee Meador wrote: Also in windows each folder and file has short name that has no spaces in it and is 8 or less characters. You can see the short name by going to a DOS box and using dir /X which adds a column about midscreen showing the short form. Then specify the short names to define that path. It would be something like: c:\PROGRA~1\IBM\RATIONAL\SDP and so forth. -- Lee On 6/2/06, Wayne Fay [EMAIL PROTECTED] wrote: Spaces in directories on Windows are a known issue in Java when dealing with RMI. And while I don't use it myself, its a good guess that this plugin uses RMI to talk to the WAS for deploying your EAR. You will need to reinstall to a directory with no spaces. Alternatively, you could perhaps use the subst command to create a fake k:\ drive (or similar) for your c:\program files\ibm directory. Then your path would be k:\rational\... which has no spaces. Wayne On 6/2/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I d like to make ear deployment automatically on websphere 5.1. After some search, David Karlsen's plugin [maven-was-plugin] seems to fit exactly my need. But there are some issues that I can not resolve. To sum up, there are some points I made previously: - WAS_HOME is set to installation directory of used server ([C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v51] in my case) - JAVA_HOME is set to WAS'jre because the deployment script need it. (JAVA_HOME=%WAS_HOME%\java) - %WAS_HOME%/bin and %WAS_HOME%\deploytool\itp are adding in the PATH PATH=%WAS_HOME%/bin;%WAS_HOME%\deploytool\itp;%PATH% - WAS_EXT_DIRS=%WAS_HOME%\java\lib;%WAS_HOME%\lib\classes;%WAS_HOME%\lib\lib;% WAS_HOME%\lib\lib\ext;%WAS_HOME%\lib\web\help - in the project pom file, I also declared the plugin repository of maven-was-plugin. NB: to be sure, I replaced all used env variables by its real value. Finally mvn returns following error: [ERROR] The java class is not found: Files\IBM\Rational\SDP\6/0\runtimes\base_v51\java\lib;C:\Program It seems that space character in the path is not allowed... But I do not want to reinstall all. Does anyone have created unit test of this plugin ? or find a solution ? Thanks for your help, Andre This message is intended for the addressee or its representative only. Any form of unauthorized use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. If you are not the intended recipient of this e-mail message and its contents, please notify the sender immediately and delete this message and all its attachments subsequently. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: One more simple question
http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html Set outputDirectory to ${project.build.outputDirectory}/lib in the jar plugin configuration. -Max EJ Ciramella wrote: By default, jars are placed in the root of target, how do you move them to target/lib? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: One more simple question
Sorry -- what I said wasn't right. This works: plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration jarNamelib/${project.artifactId}-${project.version}/jarName /configuration /plugin /plugins -Max EJ Ciramella wrote: [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.maven.plugins:maven-jar-plugin. Reason: ERROR: Cannot overr ide read-only parameter: outputDirectory in goal: jar:jar plugin artifactIdmaven-jar-plugin/artifactId configuration outputDirectory${project.build.outputDirectory}/lib/outputDirectory /configuration /plugin -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 6:40 PM To: Maven Users List Subject: Re: One more simple question http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html Set outputDirectory to ${project.build.outputDirectory}/lib in the jar plugin configuration. -Max EJ Ciramella wrote: By default, jars are placed in the root of target, how do you move them to target/lib? - 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]
Re: One more simple question
Oh yeah, that's better than my jarName solution. Okay, I think I will stop trying to answer emails today before I give any more lousy advice. :-) -Max EJ Ciramella wrote: Also, wouldn't it be basedir according to that documentation? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 6:46 PM To: Maven Users List Subject: RE: One more simple question [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.maven.plugins:maven-jar-plugin. Reason: ERROR: Cannot overr ide read-only parameter: outputDirectory in goal: jar:jar plugin artifactIdmaven-jar-plugin/artifactId configuration outputDirectory${project.build.outputDirectory}/lib/outputDirectory /configuration /plugin -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 6:40 PM To: Maven Users List Subject: Re: One more simple question http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html Set outputDirectory to ${project.build.outputDirectory}/lib in the jar plugin configuration. -Max EJ Ciramella wrote: By default, jars are placed in the root of target, how do you move them to target/lib? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: One more simple question
I am not aware of any convention in that area. And I am breaking my pledge to stop trying to answer emails. Hopefully I don't give you bad advice this time. :-) Some options/issues: 1. ../lib -- fails if /bin is not the current working directory, like if you run './target/bin/somestartscript.sh' while in the project/module directory. 2. token replacement during build to produce absolute path to lib dir -- fails if you move this stuff, like if you delivered the contents of target as an artifact. 3. fancy scripting that figures out where the bin script lives (or really, where the app home is), and then find the libs relative to that -- robust but complex, perhaps you can borrow this functionality from the start script of another app, many app start scripts behave this way, including the 'mvn' script -Max EJ Ciramella wrote: In a related note, how are the scripts that are used to start/stop applications built by maven supposed to build up the proper class path? So during the build for this one application we have, the jar file is placed in target/lib now. ALSO - as the resources are processed, the scripts wind up in target/scripts. The developers want to be able to cd into scripts and run somestartscript.sh which looks into the lib directory (../lib) to build up the classpath (just load all jars). Am I approaching this wrong? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 6:53 PM To: Maven Users List Subject: RE: One more simple question That would be a misuse of final name: finalNameThe filename (excluding the extension, and with no path information) that the produced artifact will be called. The default value is ${artifactId}-${version}. -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 6:51 PM To: Maven Users List Subject: Re: One more simple question Oh yeah, that's better than my jarName solution. Okay, I think I will stop trying to answer emails today before I give any more lousy advice. :-) -Max EJ Ciramella wrote: Also, wouldn't it be basedir according to that documentation? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 6:46 PM To: Maven Users List Subject: RE: One more simple question [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.maven.plugins:maven-jar-plugin. Reason: ERROR: Cannot overr ide read-only parameter: outputDirectory in goal: jar:jar plugin artifactIdmaven-jar-plugin/artifactId configuration outputDirectory${project.build.outputDirectory}/lib/outputDirectory /configuration /plugin -Original Message- From: Max Cooper [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 6:40 PM To: Maven Users List Subject: Re: One more simple question http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html Set outputDirectory to ${project.build.outputDirectory}/lib in the jar plugin configuration. -Max EJ Ciramella wrote: By default, jars are placed in the root of target, how do you move them to target/lib? - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: + ERROR during installing a plugin in maven 2 +
Are you disconnected from the internet, or behind a proxy? -Max Serge Emmanuel Pagop wrote: I have this error when I run mvn install to install a plugin. Is there someone, that can tell what this means. (ivan) [556] mvn install [INFO] Scanning for projects... [INFO] [INFO] Building Maven Validate Plugin [INFO]task-segment: [install] [INFO] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-install-plugin' does not exist or no valid version could be found [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Jun 02 01:08:35 CEST 2006 [INFO] Final Memory: 2M/5M [INFO] Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mvn clean and mvn install vs. mvn clean install
It sounds like you figured it out. In general, maven wants your modules to depend on each other only through artifacts. Generating sources in one module that get injected into another module violates this guideline. I remember seeing that Andromda used to override the clean target in their Maven1 build. And I know they have moved on to Maven2. How does the maven example project handle 'clean' and it's generated sources? That might help identify a solution for your project. -Max Ingo Düppe wrote: Max Cooper schrieb: Post the build output that shows the failure. -Max Ingo Düppe wrote: hi, what is the difference between to separate calls of mvn clean and then mvn install to one call of mvn clean install. I thought these calls would be equals, but the second one fails within my project. Regards Ingo Hi, Enclosed my debug output. But I guess I know why the results are different between mvn clean / mvn install and mvn clean install. The call order of the modules is different. In my project I have the following four modules: framework framework-utils foundation foundation-model foundation-api foundation-core The call order of my modules: 1. mvn clean / mvn install: [clean] framework-utils [clean] foundation-model [clean] foundation-api [clean] foundation-core [install] framework-utils [install] foundation-model [install] foundation-api [install] foundation-core 2. mvn clean install: [clean] framework-utils [install] framework-utils [clean] foundation-model [install] foundation-model [clean] foundation-api [install] foundation-api [clean] foundation-core [install] foundation-core I generate source code with andromda within the foundation-model module for the api and core module. That why the second variant fails, because the generated source codes will be deleted during the clean phase of the api and core module and this happens after the code generation in foundation-model. Please correct my if I'm wrong. Regards Ingo [INFO] [site:attach-descriptor] [INFO] [install:install] [INFO] Installing W:\openuss\foundation\foundation-model\pom.xml to d:\development\repository\maven-2.0\org\openuss\foundation\foundation-model\3.0-SNAPSHOT\foundation-model-3.0-SNAPSHOT.pom [INFO] [INFO] Building OpenUSS - Foundation - API [INFO]task-segment: [clean, install] [INFO] [INFO] [clean:clean] [INFO] Deleting directory W:\openuss\foundation\foundation-api\target [INFO] Deleting directory W:\openuss\foundation\foundation-api\target\classes [INFO] Deleting directory W:\openuss\foundation\foundation-api\target\test-classes [INFO] [andromda-multi-source:add-source {execution: add-source}] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] No sources to compile [INFO] [surefire:test] [INFO] No tests to run. [INFO] [jar:jar] [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] Building jar: W:\openuss\foundation\foundation-api\target\foundation-api-3.0-SNAPSHOT.jar [INFO] [install:install] [INFO] Installing W:\openuss\foundation\foundation-api\target\foundation-api-3.0-SNAPSHOT.jar to d:\development\repository\maven-2.0\org\openuss\foundation\foundation-api\3.0-SNAPSHOT\foundation-api-3.0-SNAPSHOT.jar [INFO] [INFO] Building OpenUSS - Foundation - CORE [INFO]task-segment: [clean, install] [INFO] [INFO] artifact org.codehaus.mojo:build-helper-maven-plugin: checking for updates from andromda [INFO] [clean:clean] [INFO] Deleting directory W:\openuss\foundation\foundation-core\target [INFO] Deleting directory W:\openuss\foundation\foundation-core\target\classes [INFO] Deleting directory W:\openuss\foundation\foundation-core\target\test-classes [INFO] [andromda-multi-source:add-source {execution: add-source}] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] artifact org.springframework:spring-mock: checking for updates from ibiblio [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '53fc4dae976137af8ba8899f7ad11473a30bb6c9'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '53fc4dae976137af8ba8899f7ad11473a30bb6c9'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact org.springframework:spring-mock: checking for updates from andromda [INFO] artifact org.springframework:spring-mock: checking for updates from myfaces-apache
Re: mvn clean and mvn install vs. mvn clean install
Here are two strategies to consider: 1. Only clean the generated source directories when you clean from the parent (delete src/generated/java from all subprojects). Don't remove generated sources when you clean a module that contains sources generated in another module (don't delete src/generated/java). I think this is how the Andromda example app used to deal with this, though I am not sure if this is the strategy they are using now. This is still working outside of maven's guideline (or at least, my perception of such a guideline), but it might make things work better. 2. Package the generated sources as artifacts. Maybe moduleA could produce two artifacts: sources-for-moduleB.zip and sources-for-moduleC.zip. Then modules B and C would depend on these source zips (and unzip them so they can be compiled at build time). I haven't seen this done, but it seems to be more in line with how maven handles dependencies. -Max Ingo Düppe wrote: Well I never saw it from this perspective. But I guess in MDA based projects you will always have to inject source code from you generation process into other modules. Because you will always generate multiple modules from one module. For instance, generating some kind of specification and parts of the implementation from a model. I don't know what the new strategy of andromda team for maven 2.0 is, maybe I'm going to ask them. Maybe I just introduce beside src and target a third folder generated-src that will contain only generated sources from andromda. So the project structure would be: src /main /java /resources /test /java /resources generated-src /main /java /resources /test /java /resources target /classes /test-classes And the clean project doesn't delete the generated-src folders. What do you think about this? Regards -Ingo Max Cooper schrieb: It sounds like you figured it out. In general, maven wants your modules to depend on each other only through artifacts. Generating sources in one module that get injected into another module violates this guideline. I remember seeing that Andromda used to override the clean target in their Maven1 build. And I know they have moved on to Maven2. How does the maven example project handle 'clean' and it's generated sources? That might help identify a solution for your project. -Max Ingo Düppe wrote: Max Cooper schrieb: Post the build output that shows the failure. -Max Ingo Düppe wrote: hi, what is the difference between to separate calls of mvn clean and then mvn install to one call of mvn clean install. I thought these calls would be equals, but the second one fails within my project. Regards Ingo Hi, Enclosed my debug output. But I guess I know why the results are different between mvn clean / mvn install and mvn clean install. The call order of the modules is different. In my project I have the following four modules: framework framework-utils foundation foundation-model foundation-api foundation-core The call order of my modules: 1. mvn clean / mvn install: [clean] framework-utils [clean] foundation-model [clean] foundation-api [clean] foundation-core [install] framework-utils [install] foundation-model [install] foundation-api [install] foundation-core 2. mvn clean install: [clean] framework-utils [install] framework-utils [clean] foundation-model [install] foundation-model [clean] foundation-api [install] foundation-api [clean] foundation-core [install] foundation-core I generate source code with andromda within the foundation-model module for the api and core module. That why the second variant fails, because the generated source codes will be deleted during the clean phase of the api and core module and this happens after the code generation in foundation-model. Please correct my if I'm wrong. Regards Ingo [INFO] [site:attach-descriptor] [INFO] [install:install] [INFO] Installing W:\openuss\foundation\foundation-model\pom.xml to d:\development\repository\maven-2.0\org\openuss\foundation\foundation-model\3.0-SNAPSHOT\foundation-model-3.0-SNAPSHOT.pom [INFO] [INFO] Building OpenUSS - Foundation - API [INFO]task-segment: [clean, install] [INFO] [INFO] [clean:clean] [INFO] Deleting directory W:\openuss\foundation\foundation-api\target [INFO] Deleting directory W:\openuss\foundation\foundation-api\target\classes [INFO] Deleting directory W:\openuss\foundation\foundation-api\target\test-classes [INFO] [andromda-multi-source:add-source {execution: add-source}] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources
Re: mvn clean and mvn install vs. mvn clean install
Post the build output that shows the failure. -Max Ingo Düppe wrote: hi, what is the difference between to separate calls of mvn clean and then mvn install to one call of mvn clean install. I thought these calls would be equals, but the second one fails within my project. Regards Ingo - 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: WEB-INF resources in test
I don't have an answer, but I have some comments that may help you find a solution... jdwyah wrote: My tests need to access the templates in WEB-INF/freemarker If I configure my directory with the standard src/main/java src/main/webapp/WEB-INF/freemarker/myTemplate.ftl src/main/resources/applicationContext.xml test/main/resouces/--nothing here-- My tests that require applicationContext.xml work fine, but the ones that require myTemplate.ftl do not. Super, I just need to add a resource location, right? I tried the additions below, but it didn't seem to do anything. Is mvn -X -Dtest=mytest the best way to get debug output/sort these things out? build resources resource directory src/main/resources /directory /resource resource directory ${warSourceDirectory} /directory /resource /resources /build So I'd like a solution like the above, but if that fails, My 2nd attempt was making a: src/main/resources/WEB-INF/freemarker/myTemplate.ftl This wasn't found either and my app (well actually the freemarkerViewLoader) looks like it's only checking: test-classes/ Lastly I tried: test/main/resources/WEB-INF/freemarker/myTemplate.ftl and the template is found. What I'd really like is some variation on the first option I tried. Is this incorrect? In general, there are two ways to load a file/resource: 1. from a file path, that might be relative to the current working directory, or relative to the root of your webapp 2. from the classpath Defining maven resources essentially gets more stuff into your classpath (in support of way 2). But if the application is trying to load them from a specific file path (way 1), it won't help. I think this is a disconnect that you are experiencing. 2ndly I'm confused as to why the tests find: src/main/resources/applicationContext.xml but not src/main/resources/WEB-INF/freemarker/myTemplate.ftl An issue in the way the Spring/Freemarker template loading is happening? applicationContext.xml is (most likely) loaded from the classpath, not from src/main/resources/. Stuff that is in src/main/resources gets copied to target/classes. target/classes is in the classpath. I don't know anything about freemarker. Is there any way to get it to load your .ftl files from the classpath (rather than from the file path /WEB-INF/freemarker)? Looking at the freemarker source code might be the best way to understand how it loads the files. -Max Any ideas? Thanks, -j -- View this message in context: http://www.nabble.com/WEB-INF+resources+in+test-t1677440.html#a4548550 Sent from the Maven - Users forum at Nabble.com. - 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: Notifier from command line
The free Better Builds With Maven book available from Mergere has an example plugin that does some kind of email notification. This might serve as a good base for your own custom email notification plugin. See section 5.4.2 of the book: http://www.mergere.com/m2book_download.jsp -Max Wayne Fay wrote: You can configure Continuum to only build on demand instead of an hourly or daily build, if you want. In short, no, you cannot do what you want with Maven out of the box. You will have to write a plugin to support this or write a shell script to call Maven to do the build and then email the results to you automatically, assuming you are using an operating system that has such tools available. In linux/unix/mac os, this would be as trivial as calling sendmail, qmail, etc from the command line. And there are plenty of command-line email tools on Win32 as well, so you should be able to make this happen on any system you need. But this will require some work on your end. (Most people would use a CI server for this kind of functionality, so I doubt you will see this built into Maven any time soon. Feel free to contribute your plugin back once you have it working though, as email-maven-plugin in Codehaus mojo perhaps.) Wayne On 5/24/06, Alexandre Poitras [EMAIL PROTECTED] wrote: Well it should not be hard to write a plugin using JavaMail since all the information can already be injected from the pom. On 5/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for your reply But i don't want to use any CI tool , coz my builds are based on only request and there are some other reason we don't want to use any CI tool thats why i'm looking for some way to send notification mail from command line Thanks, Raghu ben short [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 05/24/2006 04:34 PM Please respond to Maven Users List To: Maven Users List users@maven.apache.org cc: Subject:Re: Notifier from command line Maven Continuum can send notifications about the outcome of builds. But i guess you want to inform people that a new release is available and they should update their dependancies or use the -U flag. On 5/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, I googled lot but never got answere for this Is this possible to send build notification when we do command line build in maven like when i run mvn clean deploy from command line , if something fails / build success it should send a notificaiton to notifiers specified in pom or some where else??? Is this possible.. Please advise Thanks, Raghu - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can I make a profile active when a property is NOT set?
A few things make this skipping the tests by default acceptable for our project: 1. Our tests more than double the run time of our build. Our tests take a relatively long time, so there is a fairly significant productivity penalty for running the tests every time a developer does a build. 2. Developers are encouraged to run the tests before a commit, or more often, as they see fit. 3. We have a continuous integration server running builds with tests every 3 minutes (it checks every 3 min, waits for a quiet period of 5 min). It emails us when the project status changes. If a test fails, we will know about it very quickly. We even have a booby prize (South Park My. Hankey doll) that will be delivered to your desk if you break the build. -Max John Casey wrote: FWIW, I hope you have a *really* compelling reason to skip your unit tests by default. As long as we're writing things down for posterity, in 99.999%of cases this is a very, very bad idea. It means you have to go out of your way to test your code, which means the jars you're producing most likely won't be tested. Out of curiosity, what reason did you have for this? -john On 5/22/06, Max Cooper [EMAIL PROTECTED] wrote: John, That worked! Thanks. I am pretty sure I read something about that before, so now I feel a bit silly to have asked. :-) Anyway, I was asking so that I could have maven.test.skip set to true by default, but still be able to override it on the command line. It seems like this should work without any trickery, but there is a bug in maven's handling of system properties that prevents it from working. With help from Kenney Westerhof and you, I've got a solution now. I am describing it here for anyone else that might need to do this, in hopes that they will find it in the mailing list archives. Put this in your settings.xml file to skip tests by default, while retaining the ability to run them by putting -Dmaven.test.skip=false on the command line: !-- skip tests by default, but allow override on command line -- profile activation property name!maven.test.skip/name /property /activation properties maven.test.skiptrue/maven.test.skip /properties /profile -Max John Casey wrote: Try: activationpropertyname!X/name/property/activation ...activated when the system property is undefined. activationpropertynameX/namevalue!Y/value/property/activation ...activated when the system property's value is != Y. HTH, John On 5/22/06, Max Cooper [EMAIL PROTECTED] wrote: I guess I should have been more clear. I want a profile to be active ONLY when the property X is NOT set. Here's my XML psuedo-code for what I want: activation not property nameX/name /property /not /activation I have been playing with activeByDefault and using 'mvn help:active-profiles' to see what profiles are active, but I have not found a solution yet. -Max Allan Ramirez wrote: Yes, set the profile in the settings.xml via activeProfiles section. http://maven.apache.org/guides/introduction/introduction-to-profiles.html Max Cooper wrote: I know that I can make a profile active when a property is set... activationpropertynameX/name/property/activation Or when a property is set to a certain value... activationpropertynameX/namevalueY/value/property/activation Is there a way to make a profile active when a certain property is NOT set? Thanks, -Max - 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] - 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]
broken build booby prize (was: how can I make a profile active when a property is NOT set?)
The last person to break the build does keep Mr. Hankey until someone else breaks the build. The downside of this practice is that there is a somewhat reduced penalty for consecutive offenses. :-) -Max John Casey wrote: ah, I see. I like the booby prize...do they have to hold onto it until the next guy breaks the build? ;-) -john On 5/23/06, Max Cooper [EMAIL PROTECTED] wrote: A few things make this skipping the tests by default acceptable for our project: 1. Our tests more than double the run time of our build. Our tests take a relatively long time, so there is a fairly significant productivity penalty for running the tests every time a developer does a build. 2. Developers are encouraged to run the tests before a commit, or more often, as they see fit. 3. We have a continuous integration server running builds with tests every 3 minutes (it checks every 3 min, waits for a quiet period of 5 min). It emails us when the project status changes. If a test fails, we will know about it very quickly. We even have a booby prize (South Park My. Hankey doll) that will be delivered to your desk if you break the build. -Max John Casey wrote: FWIW, I hope you have a *really* compelling reason to skip your unit tests by default. As long as we're writing things down for posterity, in 99.999%of cases this is a very, very bad idea. It means you have to go out of your way to test your code, which means the jars you're producing most likely won't be tested. Out of curiosity, what reason did you have for this? -john On 5/22/06, Max Cooper [EMAIL PROTECTED] wrote: John, That worked! Thanks. I am pretty sure I read something about that before, so now I feel a bit silly to have asked. :-) Anyway, I was asking so that I could have maven.test.skip set to true by default, but still be able to override it on the command line. It seems like this should work without any trickery, but there is a bug in maven's handling of system properties that prevents it from working. With help from Kenney Westerhof and you, I've got a solution now. I am describing it here for anyone else that might need to do this, in hopes that they will find it in the mailing list archives. Put this in your settings.xml file to skip tests by default, while retaining the ability to run them by putting -Dmaven.test.skip=false on the command line: !-- skip tests by default, but allow override on command line -- profile activation property name!maven.test.skip/name /property /activation properties maven.test.skiptrue/maven.test.skip /properties /profile -Max John Casey wrote: Try: activationpropertyname!X/name/property/activation ...activated when the system property is undefined. activationpropertynameX/namevalue!Y/value/property/activation ...activated when the system property's value is != Y. HTH, John On 5/22/06, Max Cooper [EMAIL PROTECTED] wrote: I guess I should have been more clear. I want a profile to be active ONLY when the property X is NOT set. Here's my XML psuedo-code for what I want: activation not property nameX/name /property /not /activation I have been playing with activeByDefault and using 'mvn help:active-profiles' to see what profiles are active, but I have not found a solution yet. -Max Allan Ramirez wrote: Yes, set the profile in the settings.xml via activeProfiles section. http://maven.apache.org/guides/introduction/introduction-to-profiles.html Max Cooper wrote: I know that I can make a profile active when a property is set... activationpropertynameX/name/property/activation Or when a property is set to a certain value... activationpropertynameX/namevalueY/value/property/activation Is there a way to make a profile active when a certain property is NOT set? Thanks, -Max - 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] - 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
how can I make a profile active when a property is NOT set?
I know that I can make a profile active when a property is set... activationpropertynameX/name/property/activation Or when a property is set to a certain value... activationpropertynameX/namevalueY/value/property/activation Is there a way to make a profile active when a certain property is NOT set? Thanks, -Max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can I make a profile active when a property is NOT set?
I guess I should have been more clear. I want a profile to be active ONLY when the property X is NOT set. Here's my XML psuedo-code for what I want: activation not property nameX/name /property /not /activation I have been playing with activeByDefault and using 'mvn help:active-profiles' to see what profiles are active, but I have not found a solution yet. -Max Allan Ramirez wrote: Yes, set the profile in the settings.xml via activeProfiles section. http://maven.apache.org/guides/introduction/introduction-to-profiles.html Max Cooper wrote: I know that I can make a profile active when a property is set... activationpropertynameX/name/property/activation Or when a property is set to a certain value... activationpropertynameX/namevalueY/value/property/activation Is there a way to make a profile active when a certain property is NOT set? Thanks, -Max - 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]
Re: How to notify developers that test(s) fail?
Luntbuild (http://luntbuild.sf.net) is another option. -Max Jeff Jensen wrote: For the notification, CruiseControl or Continuum, depending on your needs. This is a separate process from the site gen. -Original Message- From: Dave Hoffer [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 7:24 PM To: users@maven.apache.org Subject: How to notify developers that test(s) fail? What is the best practice in m2 of notifying developers that a test(s) failed? I am working on generating the surefire test reports and I have found that a recent file check-in has broke 1 test. How can I continue with the build process and notify the developer that he broke the build? Ideally, this hate mail could go to just the offending developer but in any case I need an HTML report that shows what test failed and why. What is the best way to do this? -dh - 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: how can I make a profile active when a property is NOT set?
John, That worked! Thanks. I am pretty sure I read something about that before, so now I feel a bit silly to have asked. :-) Anyway, I was asking so that I could have maven.test.skip set to true by default, but still be able to override it on the command line. It seems like this should work without any trickery, but there is a bug in maven's handling of system properties that prevents it from working. With help from Kenney Westerhof and you, I've got a solution now. I am describing it here for anyone else that might need to do this, in hopes that they will find it in the mailing list archives. Put this in your settings.xml file to skip tests by default, while retaining the ability to run them by putting -Dmaven.test.skip=false on the command line: !-- skip tests by default, but allow override on command line -- profile activation property name!maven.test.skip/name /property /activation properties maven.test.skiptrue/maven.test.skip /properties /profile -Max John Casey wrote: Try: activationpropertyname!X/name/property/activation ...activated when the system property is undefined. activationpropertynameX/namevalue!Y/value/property/activation ...activated when the system property's value is != Y. HTH, John On 5/22/06, Max Cooper [EMAIL PROTECTED] wrote: I guess I should have been more clear. I want a profile to be active ONLY when the property X is NOT set. Here's my XML psuedo-code for what I want: activation not property nameX/name /property /not /activation I have been playing with activeByDefault and using 'mvn help:active-profiles' to see what profiles are active, but I have not found a solution yet. -Max Allan Ramirez wrote: Yes, set the profile in the settings.xml via activeProfiles section. http://maven.apache.org/guides/introduction/introduction-to-profiles.html Max Cooper wrote: I know that I can make a profile active when a property is set... activationpropertynameX/name/property/activation Or when a property is set to a certain value... activationpropertynameX/namevalueY/value/property/activation Is there a way to make a profile active when a certain property is NOT set? Thanks, -Max - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2.0.4] -Dmaven.test.skip=false won't override settings.xml -- bug or intentional?
I have maven.test.skip set to true in my settings.xml. The tests are still skipped when I run 'mvn -Dmaven.test.skip=false install'. Is this a bug or is it intentional? SAME QUESTION, MORE DETAIL: === I have maven.test.skip set to true in my ~/.m2/settings.xml file. I did it like this: settings profiles profile idblah/id properties maven.test.skiptrue/maven.test.skip /properties /profile /profiles activeProfiles activeProfileblah/activeProfile /activeProfiles /settings Sometimes, I would like to set it to false, overriding the setting from my profile. I would like to do this on the command line, like so: mvn -Dmaven.test.skip=false install However, my setting on the command line seems to be ignored. The tests are still skipped, even if I set maven.test.skip=false in this manner. I find this behavior to be surprising. I would expect the value I expressed on the command line to override any settings from pom.xml or settings.xml. So I wondered if perhaps the surefire plugin was ignoring the value of the property and just checking if the property was set or not. In other words, I wondered if setting maven.test.skip to 'false' (or 'carrots', or anything) would have the same effect as setting it to true. To test, I removed maven.test.skip from my settings.xml file and set the value on the command line. I found that surefire does indeed pay attention to the value. Setting maven.test.skip=true would skip the tests, but setting maven.test.skip=false would not skip the tests. So it seems that the value in my settings.xml file cannot be overridden on the command line. Is this a bug, or is this intentional? If it is intentional, why? It seems to me that property values specified explicitly on the command line should override any property values from pom.xml or settings.xml files. Thanks, -Max - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: time-constrained repository instability
I do think this is an important issue. I like the hash idea. A positive side effect of using hashes is that they can help recover from a bad file transfer. I see hashes for POMs already. This discussion makes me think they are not used. One potential downside of incrementing the version number in these cases is that it could result in a cascade of updates. Consider a multi-project that produces 5 jars. 4 of the jars depend on the 5th jar. If the 5th jar got deployed poorly, the operation to fix it should include updating the version of all 5 jars so that the other 4 point to the fixed 5th jar. -Max Wayne Fay wrote: -Or- like I said in my previous email (and unless I'm mistaken, what I believe the Maven team is planning on implementing), they should add hashing of the pom itself and check that file in addition to the binary jar when looking for and downloading updates. This is also a reasonable fix to the solution, imo. Especially considering the difficulty related to matching poms with a certain version tag to binaries with another version tag (ie 1.4.2-rc1 and -rc2 vs 1.4.2, etc). Wayne On 5/19/06, Orjan Austvold [EMAIL PROTECTED] wrote: Daniel Kulp wrote: Right. But if an error is detected in a pom, why does the pom have to be updated.For example, if there is a: foo/1.0/foo-1.0.pom why can't we do something like Gentoo Linux and leave that alone and then add a: foo/1.0-R2/foo-1.0-R2.pom It's stilll foo 1.0 as release by the foo developers, but its the R2 update as far as the maven repository is concerned. If the foo developers produce a 1.0.1, fine. We create a: foo/1.0.1/foo-1.0.1.pom Thus, existing apps and such that depend on the broken behavior are OK and others can migrate to the correct poms as needed. Anyway, I COMPLETELY agree that stuff put up on ibiblio as a release, correct or broken, should stay that way. Right on, Daniel! Introduction of non-maven artifacts could adopt the scheme from Gentoo (or Debian (Ubuntu)) to provide mavenized released in which versions numbers could document a change made by Maven number X. Every change in a fixed release of the artifact (POM or whatever) would increase the X. A release to the repository has to be write-once. If this is not true, then Maven has to come with a footnote telling everybody to delete their local repository if a build goes astray. Ørjan - 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]
Re: Maven 2.0: How to Have Multiple Projects Dependent on One Project?
Maven2 will do what you want, automatically. (Maven1 was also capable of this, if you explicitly set the eclipse.dependency property on a dependency.) This page shows how to setup a multi-module project with dependencies in Eclipse: http://maven.apache.org/guides/mini/guide-ide-eclipse.html So that you can edit your parent POM in Eclipse, I (reluctantly) recommend creating another module (= Eclipse project), as described in the Flat Project Layout section at the end of the page I linked to. I called this project 'myproduct-maven' below. (Note: I heard a rumor that Eclipse 3.2 supports hierarchical projects and doesn't require this flattening nonsense.) You will end up with four modules: myproduct-maven myproduct-core myproduct-componentA myproduct-componentB myproduct-componentA and myproduct-componentB depend on myproduct-core, and will thus reference myproduct-core in the dependencies section of their pom.xml files. If you then run mvn eclipse:eclipse from the myproduct-maven directory, the generated Eclipse project files (.project and .classpath) will have a project reference rather than a dependency on the resulting jar. That means that changes in myproduct-core will be available immediately in myproduct-componentA and myproduct-componentB -- you won't have to run another mvn build to produce a new myproduct-core.jar file. But note that you MUST run mvn eclipse:eclipse from the myproduct-maven directory to have these dependencies generated as project dependencies. If you run mvn eclipse:eclipse in myproduct-componentA, for instance, it won't know that myproduct-core is another module in your project -- it just looks like another external dependency. -Max Keith Bennett wrote: All - I have multiple source projects, each having a source code tree, and each producing its own jar file. Currently, I'm using Eclipse, and my eclipse-workspace directory looks something like this: myproduct-core myproduct-componentA myproduct-componentB The latter two depend on myproduct-core at compile time and runtime. How do I implement this in Maven 2.0? Do I need to have myproduct-core produce a jar file that goes in the Maven repository? Or can it work in Maven as seamlessly as it works in Eclipse, with some way to indicate that the component source trees depend on the core source tree? I looked at dependencies in Maven 2.0, but I only find two possibilities, each daunting at best: 1) have the component depend on an artifact (namely, the myproduct-core jar file). For this to work, I think I'd need to push the core jar file into the repository whenever it is built. How would I do this in such a way that it would happen automatically when building one of the components that rely on it? And how would Maven know when the core jar file is out of date? 2) have the core source tree in a subdirectory. This is problematic because I have multiple component source trees that would need to have this subdirectory. I could use symbolic links in Unix/Cygwin, but not all developers would have this option available, and anyway this would be a supreme kludge. Any help would be greatly appreciated. Thanks, Keith Bennett P.S. My main information resources were: http://docs.codehaus.org/display/MAVENUSER/Multi-modules+projects http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html Better Builds with Maven, free Maven 2 book available at http://www.mergere.com/m2book_download.jsp. __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: war resource filtering
I also needed some functionality that has been added to the maven-war-plugin but hasn't been released yet (i.e. it is not in maven-2.0.4). I grabbed the source tree for maven-war-plugin from subversion and added it to my project as another module (with a README file to tell my team not to modify it, and that it can be removed after the next maven release). My experience was that simply adding the plugin module to my project (including adding it as a module in the parent pom) caused the build to use it (rather than using a released version of maven-war-plugin) -- no further configuration was necessary. Perhaps there is a better way to do it. Maybe using a snapshot of maven-war-plugin or something. But I am not sure how to do that, or even if there is a snapshot of maven-war-plugin available. -Max Jorg Heymans wrote: Hi, According to [1], it should now be possible to apply standard resource filtering to war resources. I haven't been able to get this to work however, and the issue is not clear on exactly how one can take advantage of the fix. There is ofcourse the workaround using a temporary directory to write the filter results to, as suggested here [2], but i'ld rather just use the standard mechanism now that it has been fixed. Any ideas on how to get this to work ? Regards Jorg [1] http://jira.codehaus.org/browse/MWAR-12 [2] http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/28129 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding compile source root from Ant-based plugin [again and still unanswered]
I haven't tested this functionality personally, but it looks like the maven-antrun-plugin already has explicit support for what you are describing via the sourceRoot parameter: http://maven.apache.org/plugins/maven-antrun-plugin/run-mojo.html -Max DELHOSTE Fabrice wrote: Hi Ivan, Unfortunately, I asked for the same question twice in the last month and had no response. At the moment, I use build-helper-maven-plugin in any of my poms using my Ant plugin...waiting for the answer ;-) Fabrice -Original Message- From: Ivan Dubrov [mailto:[EMAIL PROTECTED] Sent: samedi 6 mai 2006 15:48 To: users@maven.apache.org Subject: Adding compile source root from Ant-based plugin Hello, I have Ant-based MOJO that generates some Java sources. What is the preferred way to add the directory with the generated sources as an additional source root? I do not want to configure manually build-helper-maven-plugin (http://mojo.codehaus.org/build-helper-maven-plugin/) from my project descriptor, since I think my generator-plugin should take the appropriate actions itself. Probably, there is a way to call MOJO from Ant script (in that case, I could invoke build-helper:add-source from my Ant target)? P.S. Please, add me to the cc, I'm not subscribed to the list. -- WBR, Ivan S. Dubrov - 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]
Re: First Maven Getting Started Guide example
That build succeeded. I ran the same command that you did to see if I would get the same error message logged (about VM_global_library.vm), and I did. I got the same error message, and my build also succeeded. I think your Maven installation is working as it should. Mine works the same way, and I haven't had any trouble with mine. -Max Franz Fehringer wrote: Hello, I have problems to get the first example from the Maven Getting Started Guide working, namely mvn -e -X archetype:create -DgroupId=de.isogmbh.iso-app -DartifactId=iso-app Basically i get [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. I use version 2.0.4 on WIN2KSP4 with JDK 1.5.0_06. When i got this problem with version 2.0.2 i resolved it with set CLASSPATH=. (it seemed to me that some jars from the former CLASSPATH were in the way). But now i get this error even with an empty CLASSPATH or one containing only a single dot. My settings.xml is settings localRepository//winpc229/supply/Maven2/Repository/localRepository proxies proxy activetrue/active protocolhttp/protocol hostproxy/host port81/port /proxy /proxies /settings The complete debug/error output is below. I hope that someone can help me (and that this is not a FAQ). Thanks and greetings Franz + Error stacktraces are turned on. Maven version: 2.0.4 [DEBUG] Building Maven user-level plugin registry from: 'C:\Dokumente und Einstellungen\feh\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'C:\Programme\maven-2.0.4\conf\plugin-registry.xml' [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [DEBUG] maven-archetype-plugin: resolved to version 1.0-alpha-3 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0-beta-1 for project: org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:1.0-alpha-3 from the repository. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [DEBUG] org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:1.0-alpha-3:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: org.apache.maven:maven-archetype::1.0-alpha-3 for project: org.apache.maven:maven-archetype-core:jar:1.0-alpha-3 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0-beta-1 for project: null:maven-archetype:pom:1.0-alpha-3 from the repository. [DEBUG] org.apache.maven:maven-archetype-core:jar:1.0-alpha-3:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0.3 for project: plexus:plexus-utils:jar:1.0.3 from the repository. [DEBUG] plexus:plexus-utils:jar:1.0.3:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: plexus:plexus-containers::1.0.2 for project: plexus:plexus-container-default:jar:1.0-alpha-6 from the repository. [DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0.3 for project: plexus:plexus-containers:pom:1.0.2 from the repository. [DEBUG] plexus:plexus-container-default:jar:1.0-alpha-6:runtime (selected for runtime) [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime) [DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0.3 for project: plexus:plexus-utils:jar:1.0.2 from the repository. [DEBUG] plexus:plexus-utils:jar:1.0.2:runtime (removed - nearer found: 1.0.3) [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0-beta-1 for project: org.apache.maven:maven-model:jar:2.0-beta-1 from the repository. [DEBUG] org.apache.maven:maven-model:jar:2.0-beta-1:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: plexus:plexus-components::1.0 for project: plexus:plexus-velocity:jar:1.0 from the repository. [DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0 for project: plexus:plexus-components:pom:1.0 from the repository. [DEBUG] plexus:plexus-velocity:jar:1.0:runtime (selected for runtime) [DEBUG] commons-logging:commons-logging:jar:1.0.2:runtime (selected for runtime) [DEBUG] commons-collections:commons-collections:jar:2.0:runtime (selected for runtime) [DEBUG] velocity:velocity:jar:1.4:runtime (selected for runtime) [DEBUG] velocity:velocity-dep:jar:1.4:runtime (selected for runtime) [DEBUG] log4j:log4j:jar:1.2.8:runtime (selected for runtime) [DEBUG] plexus:plexus-container-default:jar:1.0-alpha-2:runtime (removed - nearer found: 1.0-alpha-6) [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0-beta-1 for project: org.apache.maven:maven-artifact:jar:2.0-beta-1 from the repository. [DEBUG]
Re: Applets
You need a multi-project. I have not setup a maven2 project to build an applet that is deployed as part of a webapp, so take my advice with a grain of salt. I would think that you would first need to have a subproject to build a jar file that contains your applet. The applet code should probably be separate from your webapp code anyway. Any code that is shared by the webapp and the applet should be moved to third shared jar project that both the webapp and applet project will depend on. The next challenge is then to get the applet jar file into the your war as content (rather than getting it into WEB-INF/lib, as would happen with a dependency). I have a few different ideas about how you might do that (most of which probably won't work): * The latest not-yet-released-but-already-in-svn version of the maven-war-plugin supports resources, which may allow you to specify the path to the applet jar in the local repository as a resource to include (as web content) in the war. * Antoher option would be to write your own plugin to grab the applet.jar and stick it in ${webappDirectory} during the build. * Perhaps you can write a little Ant script to grab the applet.jar and put it in ${webappDirectory}, and then use the maven-antrun-plugin to execute your Ant script. * There are some plugins that merge war files. Perhaps your applet subproject could be configured/perverted into putting the compiled class files into a web content location (not under WEB-INF), and then the applet war could be merged with your main webapp war file. The general use case of needing to build an applet that is then included as part of a webapp does seem like a standard use case (as opposed to something wacky), so perhaps there will be some features added to the war plugin to support it. -Max [EMAIL PROTECTED] wrote: I have a large web application that currently uses maven 1.02 to build. I have a need to add an applet to the application. I am having issues with visibility of the class file from the html page because the default src/main/java/.. gets built into the webapp/WEB-INF/classes when using maven for the build. Is there any documentaion or examples of how to build applets into a web application. Can I change the target for just the applet classes? Do I need to create a multi-project? Any guidence would be appreciated. Les Olinger ? Product Lead ? SunGard ? Omni ? 104 Inverness Center Place, Birmingham, AL 35242 Tel 205-437-7820 ? Fax 205-437-7838 ? www.sungard.com/omni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple CVS question: How to add a file to the toplevel cvsroot
The CVS modules facility supports features similar to symbolic links: http://cvsbook.red-bean.com/cvsbook.html#The%20modules%20File -Max On Tue, 2006-03-07 at 14:51 -0600, Gautham Pamu wrote: I knew about symbolic links on linux/unixs but the server is managed by a different team and we don't have permissions to create those links.. I was able to create them on my local system and it works. I doubt the admin team will create these links for us. Thanks a lot for responing to my question. Since it is supported by CVS, I might have to go with first option. Thanks Gautham Pamu On 3/7/06, Mang Jun Lau [EMAIL PROTECTED] wrote: You can execute: ln -s path-to-actual-CVS-module This will create a symbolic link in a UNIX system. You're out of luck if your CVS is on Windows. In your cvsroot, create a new directory (i.e. module) and place your parent POM in there. Then symlink all of your modules in that directory. When you want to checkout the project, it will follow the symlinks and checkout everything in the proper location. _Mang Lau Gautham Pamu [EMAIL PROTECTED] 03/07/2006 01:19 PM Please respond to Maven Users List users@maven.apache.org To Maven Users List users@maven.apache.org cc Subject Re: Simple CVS question: How to add a file to the toplevel cvsroot Thanks for responding to my email. I am more inclined to the second option.. Can you tell me how to create these symbollic links, what command should I use to acheive this or Are there any cvs commands to create links... - Keep the structure and create a new module that contains a parent POM and a list of symbolic links to your actual CVS modules Thanks Gautham Pamu On 3/7/06, Emmanuel Venisse [EMAIL PROTECTED] wrote: You can't do that. I have two workaround for your problem: - Refactor your cvs modules for having only one cvs modules that contains all your actual module - Keep the structure and create a new module that contains a parent POM and a list of symbolic links to your actual CVS modules Emmanuel Gautham Pamu a écrit : Hi Everyone, I knew this is not the right mailing list for this question but I am posting here as most users on this mailing list are familiar with CVS. I want to have a parent pom.xml file for the all the modules in cvs. So is it possible to add pom.xml file to the cvsroot like for example: CVSROOT is to :ext:[EMAIL PROTECTED]:/usr/local/cvsroot so how do I add file to this folder. When I try the CVS add it is giving this error. ~/dev/test cvs -d :ext:[EMAIL PROTECTED]:/usr/local/cvsroot/ add pom.xml Password: cvs add: cannot open CVS/Entries for reading: No such file or directory cvs [add aborted]: no repository -- -Gautham Pamu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Gautham Pamu -- -Gautham Pamu -- Max Cooper [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installation problem
M2_HOME = C:\maven\maven-2.0.1\bin should be M2_HOME = C:\maven\maven-2.0.1 -Max On Fri, 2005-12-23 at 09:51 +, Abbs, David A wrote: The machine has no internet connection its on a closed network, should it still not reference the local plug-in store? I have another problem when trying to install on window I get this when I try to run mvn --version ERROR: M2_HOME is set to an invalid directory. M2_HOME = C:\maven\maven-2.0.1\bin Please set the M2_HOME variable in your environment to match the location of the Maven installation When using sygwin I get this: Exception in thread main java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher David Abbs EDS - Court Services Account UKNMSC 100 Napier Street, Sheffield, S11 8HD ( Phone:+1-0114 291 1338) (Mobile: 07765028732) + mailto:[EMAIL PROTECTED] -Original Message- From: Allan Ramirez [mailto:[EMAIL PROTECTED] Sent: 22 December 2005 23:18 To: Maven Users List Subject: Re: Installation problem Hi, You may refer to the FAQ page, http://docs.codehaus.org/display/MAVENUSER/FAQs#FAQs-HowdoIresolvethe%27 %3Cpluginname%3Edoesnotexistornovalidversion%27error%3F Hope this helps -allan Abbs, David A wrote: I am installing maven 2.0.1 on Linux red hat running on a sun machine with java 1.4.2 installed and configured. My JAVA_HOME environment is set correctly and the maven install directory added to my PATH variable When I do mvn --version it gives me Maven version: 2.0.1 Which looks fine. However when I then try to run mvn archetype:create -DgroupId=3D3Dcom.mycompany.app = -DartifactId=3D3Dmy-app To create myself a project I get this [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file [INFO] Repository 'central' will be blacklisted [INFO] --- - [ERROR] BUILD ERROR [INFO] --- - [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found [INFO] --- - [INFO] For more information, run Maven with the -e switch [INFO] --- - [INFO] Total time: 1 second [INFO] Finished at: Thu Dec 22 16:28:52 GMT 2005 [INFO] Final Memory: 1M/2M [INFO] --- - - Any help would be very much appreciated David Abbs David Abbs EDS - Court Services Account UKNMSC 100 Napier Street, Sheffield, S11 8HD ( Phone:+1-0114 291 1338) (Mobile: 07765028732) + mailto:[EMAIL PROTECTED] --- - No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.3/209 - Release Date: 12/21/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Max Cooper [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]