Updating a properties file using Maven and project classpath information
Hello, I'm trying to update a properties file using classpath information from a POM file. For example my POM defines a dependency: dependency groupIdcommons-lang/groupId artifactIdcommons-lang/artifactId version2.4/version /dependency I would like to update the private.properties file (Netbeans) so that it has: maven.dependency.classpath=/home/bdelbass/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar Does somebody has an idea on how to do that? -- Benoît Del Basso benoit.delba...@helmet.fr Tél: 01 75 43 43 42 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Updating a properties file using Maven and project classpath information
I would like to update the private.properties file (Netbeans) so that it has: maven.dependency.classpath=/home/bdelbass/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar I don't know this file, but you seem to suggest it is a Netbeans-specific file? If so, there may be an option to do this in the nbm-maven-plugin. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Updating a properties file using Maven and project classpath information
That sounds like a bad idea. The next person to work on the project is going to be unhappy. Why do you want to do this? It is always a good idea to describe the problem that you are trying to solve before asking a detailed question. What are you building that is different from everything else. Ron On 09/03/2011 8:42 AM, Benoît DEL BASSO wrote: Hello, I'm trying to update a properties file using classpath information from a POM file. For example my POM defines a dependency: dependency groupIdcommons-lang/groupId artifactIdcommons-lang/artifactId version2.4/version /dependency I would like to update the private.properties file (Netbeans) so that it has: maven.dependency.classpath=/home/bdelbass/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar Does somebody has an idea on how to do that? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Updating a properties file using Maven and project classpath information
Le 09/03/2011 15:45, Ron Wheeler wrote : It is always a good idea to describe the problem that you are trying to solve before asking a detailed question. I'm trying to make JavaFX, Maven and Netbeans interact nicely in a multi-modules project (i.e. project is built using Maven but code completion must work fine in Netbeans). The project structure is: myproject + pom.xml (root POM) + core (pure Java module) + pom.xml + fxclient(Java/JavaFX module; depends on: core) + pom.xml As discussed there [1], the main issue is that Netbeans can either recognize the project as a Maven one or a JavaFX one but not both. In one case, you lose the JavaFXScript syntax helper from Netbeans JavaFX module, and on the other case you lose Maven dependency resolution. One way to solve this issue is to update the project.properties with the list of JARs built from the POM using 'maven-ant-tasks' [2]. However, this work-around does not work when the JavaFX project is a module within a multi-modules project (since the artifact:dependencies Ant task is targetting the pom of the JavaFX module, not the root pom). So I was trying to find another way of having the project.properties updated automatically from Maven. Has someone encountered the same problem ? [1] http://groups.google.com/group/javaposse/browse_thread/thread/f862b782de787bfd [2] http://www.intermedia.uio.no/pages/viewpage.action?pageId=43516820 Le 09/03/2011 15:45, Ron Wheeler wrote : That sounds like a bad idea. The next person to work on the project is going to be unhappy. Why do you want to do this? It is always a good idea to describe the problem that you are trying to solve before asking a detailed question. What are you building that is different from everything else. Ron On 09/03/2011 8:42 AM, Benoît DEL BASSO wrote: Hello, I'm trying to update a properties file using classpath information from a POM file. For example my POM defines a dependency: dependency groupIdcommons-lang/groupId artifactIdcommons-lang/artifactId version2.4/version /dependency I would like to update the private.properties file (Netbeans) so that it has: maven.dependency.classpath=/home/bdelbass/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar Does somebody has an idea on how to do that? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Benoît Del Basso benoit.delba...@helmet.fr Tél: 01 75 43 43 42 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Updating a properties file using Maven and project classpath information
As discussed there [1], the main issue is that Netbeans can either recognize the project as a Maven one or a JavaFX one but not both. In one case, you lose the JavaFXScript syntax helper from Netbeans JavaFX module, and on the other case you lose Maven dependency resolution. Sounds like a defect in Netbeans. I would talk to them about getting it fixed. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Updating a properties file using Maven and project classpath information
On 09/03/2011 11:52 AM, Wayne Fay wrote: As discussed there [1], the main issue is that Netbeans can either recognize the project as a Maven one or a JavaFX one but not both. In one case, you lose the JavaFXScript syntax helper from Netbeans JavaFX module, and on the other case you lose Maven dependency resolution. Maybe try on their forum (NetBeans or JavaFX) if they have one. This does sound like something that others would have run into. Ron Sounds like a defect in Netbeans. I would talk to them about getting it fixed. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Properties file in Maven
Hi I am a new user of Maven. I have been looking for using external property files in Maven. However I couldn't find any. Does maven provide this option (like ANT) for using an external property file? Best Regards Nirmala
Re: Properties file in Maven
No, not in core Maven. However, I found this plugin: http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/ However, if you want to use properties in resource files the resource plugin can handle external files when doing the filtering: http://maven.apache.org/plugins/maven-resources-plugin/index.html /Anders On Tue, Oct 27, 2009 at 10:01, Sethuraman, Nirmala (NSN - IN/Bangalore) nirmala.sethura...@nsn.com wrote: Hi I am a new user of Maven. I have been looking for using external property files in Maven. However I couldn't find any. Does maven provide this option (like ANT) for using an external property file? Best Regards Nirmala