jar plugin: docs with error.
http://maven.apache.org/plugins/maven-jar-plugin/ There is an error in the main page for this plugin. The goals list show test-jar:jar instead of jar:test-jar. Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: eclipse:eclipse
at: Thu May 03 17:35:04 CEST 2007 [INFO] Final Memory: 5M/10M [INFO] On one workstation I could then import the tacos-core as existing project and on one I couldn't. Strange at least. -Borut -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Include runtime-dependencies in packaged jar
Hum, maybe you could resolve it with assembly plugin. Take a look at: http://maven.apache.org/plugins/maven-assembly-plugin/ Kind Regards On 4/18/07, Florian Ockhuysen [EMAIL PROTECTED] wrote: Hi, Using 'mvn package' I generated a jar for my application. This all works fine. However, two dependency jars are used that need to be included in the jar so they are always available at runtime (they're needed at compile-time, too btw). Of course, these dependencies were declared in the pom.xml and exist in my local maven repository. Just setting their scope element to 'runtime', doesn't work since they're also compile-time dependencies. I googled around and read documentation, but couldn't to find information on this. I solved the problem for now by putting class files from the jars in main/resources, but now I have to manually update these class files whenever a new version for one of the dependencies comes out. Something tells me there must be a more generic way to do this... Any of you have a solution?? Greets, Florian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Clover plugin: docs svn are not docs in site.
Hello, I take a look at clover plugin and I see that documentation in svn are different of documention in site. I also made some little changes in docs (to add an example about method filters using contextFilters parameter). How can I apply a patch to this plugin? Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: HowTo avoid version number from filenames
You could use final name build property: ... build finalName${artifactId}/finalName /build ... HTH -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Maven2 and JUnit4
Hello, Tom, thanks for your answer. Are you sure you are using the latest surefire ? Well, it is the problem. Maven was using surefire 2.0, so when I run mvn clean test -U everything works fine. Again, thank you very much. Kind Regards -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Maven2 and JUnit4
Ok, I now that this is a so much frequent question, but I can't find a neat thread about this issue. I already have take a look at surefire plugin doc and JIRA without success. In surefire how tohttp://maven.apache.org/plugins/maven-surefire-plugin/howto.htmlyou can see this statement: Which providers are available is controlled simply by the inclusion of the appropriate dependencies (ie, junit:junit for JUnit, org.testng:testng 4.7+for TestNG). Since this is required to compile the test classes anyway, no additional configuration is required. JUnit 4 is configured in the following way: dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.2/version scopetest/scope /dependency But I catch some test failures when my tests except some exception: @Test(expected = IllegalStateException.class) public final void testSomethingBah() throws Exception { ... } So, how I can configure Maven/Surefire to correctly run JUnit 4 tests? Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Add compilation date in the manifest
I really don't know if maven already has such property/variable, but is a quite simple write a plugin to set it in the project properties. Your plugin could have code like the snipped below: /** * @parameter default-value=${project} * @required * @readonly */ private MavenProject project; /** * @parameter default-value=-MM-dd */ private String format; public void execute() throws MojoExecutionException { String currentDate = getFormattedDate(); project.getProperties().setProperty(currentDate, currentDate); } Kind Regards, On 3/8/07, MATHUS Baptiste [EMAIL PROTECTED] wrote: Hi all, I'm looking for the variable that could be used to declare an additional property compilationDate in the manifest. I've been looking at this page as a starting point : http://maven.apache.org/guides/mini/guide-manifest.html But I can't find anywhere on the net how the variable corresponding to when the compilation process was started is called. Thanks in advance. -- Baptiste MATHUS - [EMAIL PROTECTED] Systèmes Méthodes MIPIH - Midi Pyrénées Informatique Hospitalière - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Custom plugins are not found in internal repository.
Hello, I've developed some custom mojos to Maven and try to install and deploy to a internal repository. The internal repo is configured to me using /local/repository/.m2/settings.xml like I show below: profiles profile idprovider-profile/id repositories repository idprovider-repository/id nameRepositorio de libs interno da Provider Sistemas/name urlhttp://192.168.10.254/maven/url /repository /repositories /profile /profiles And I have configured deployment management in mojos' pom.xml like the code below: distributionManagement repository idprovider-deploy-repository/id nameRepositorio para Deploy das libs Provider/name urlfile:192.168.10.254/maven/url /repository snapshotRepository idprovider-snapshot-repository/id nameRepositorio para guardar Snapshots/name urlfile:192.168.10.254/maven/url /snapshotRepository site id${project.groupId}.${project.artifactId}/id name${project.name}/name urlfile:192.168.10.254/maven/sites/${project.artifactId}/url /site /distributionManagement I have fully access rights to this network path, after execute mvn clean install deploy to some mojo, when I loook to its deployment path, the files are there. But, when some other developers, that have settings configured like me, try to use the mojo, he(she) get the following message: Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.provider.maven.plugins-DartifactId=maven-i18n-plugin -Dversion=1.0 -Dpackaging=maven-plugin -Dfile=/path/to/file Must I configure profiles - or internal repositories - in some place in order to enable mojos downloads? Thanks. -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Custom plugins are not found in internal repository.
Hello, I've developed some custom mojos to Maven and try to install and deploy to a internal repository. The internal repo is configured to me using /local/repository/.m2/settings.xml like I show below: A tiny correction, the path to settings.xml is /local/repository/settings.xml instead ../.m2/settings.xml. Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Plugins' dependencies are not found in internal repository.
Hello, I have deploy some proprietary (and Sun's jars) to my internal repository, but when I try to use these artifacts like a dependency to a plugin, Maven cannot find them: plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution idantrun-attendance-package/id phasetest/phase goals goalrun/goal /goals configuration tasks ant antfile=build.xml target name=generate.clients / /ant /tasks /configuration /execution /executions dependencies dependency groupIdcom.sun/groupId artifactIdtools/artifactId version1.5.0.09/version /dependency /dependencies /plugin /plugins When this plugins is actived, I get the following message: 1) com.sun:tools:jar:1.5.0.09 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.sun -DartifactId=tools \ -Dversion=1.5.0.09 -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1 2) com.sun:tools:jar:1.5.0.09 -- 1 required artifact is missing. for artifact: org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1 from the specified remote repositories: central (http://repo1.maven.org/maven2), snapshots (http://snapshots.maven.codehaus.org/maven2) But I have my internal repository configured in /local/repository/settings.xml. profiles profile idprovider-profile/id repositories repository idprovider-repository/id nameRepositorio de libs interno da Provider Sistemas/name urlhttp://192.168.10.254/maven/url /repository /repositories /profile /profiles Did I have missed some point? Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Plugins' dependencies are not found in internal repository.
Thierry, is, I have a profile configured, as you can see in the end of my first message. But that configuration was wrong, as least for plugins. I must to declare a pluginRepository too, like the following: pluginRepositories pluginRepository idprovider-repository/id nameRepositorio de libs interno da Provider Sistemas/name urlhttp://192.168.10.254/maven/url /pluginRepository /pluginRepositories Thanks to David Jackman by the answer. On 3/7/07, Thierry Lach [EMAIL PROTECTED] wrote: You have your repository declared inside of a profile. Are you activating that profile? On 3/7/07, Marcos Silva Pereira [EMAIL PROTECTED] wrote: Hello, I have deploy some proprietary (and Sun's jars) to my internal repository, but when I try to use these artifacts like a dependency to a plugin, Maven cannot find them: plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution idantrun-attendance-package/id phasetest/phase goals goalrun/goal /goals configuration tasks ant antfile=build.xml target name=generate.clients / /ant /tasks /configuration /execution /executions dependencies dependency groupIdcom.sun/groupId artifactIdtools/artifactId version1.5.0.09/version /dependency /dependencies /plugin /plugins When this plugins is actived, I get the following message: 1) com.sun:tools:jar:1.5.0.09 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.sun -DartifactId=tools \ -Dversion=1.5.0.09 -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1 2) com.sun:tools:jar:1.5.0.09 -- 1 required artifact is missing. for artifact: org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1 from the specified remote repositories: central (http://repo1.maven.org/maven2), snapshots (http://snapshots.maven.codehaus.org/maven2) But I have my internal repository configured in /local/repository/settings.xml. profiles profile idprovider-profile/id repositories repository idprovider-repository/id nameRepositorio de libs interno da Provider Sistemas/name urlhttp://192.168.10.254/maven/url /repository /repositories /profile /profiles Did I have missed some point? Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Custom plugins are not found in internal repository.
David, thank you very much. Your tip solve my problem. Only to information purpose, my plugin profile is configured like the following: pluginRepositories pluginRepository idprovider-repository/id nameRepositorio de libs interno da Provider Sistemas/name urlhttp://192.168.10.254/maven/url /pluginRepository /pluginRepositories Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: MVN Repository firefox search engine
http://mvnrepository.com/ Is a quite simple create a search pluginhttp://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefoxto use the search capabilities that this site provides. kind regards, On 2/27/07, Alexandre Touret [EMAIL PROTECTED] wrote: Hello, do you know if there are any firefox extension (search engine) available for the website mvn repository ? Thanks. Regards, Alexandre Touret - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: properties-files
It seems this will solve my problem if I find a way to pass the properties to a schemaexport-task run from the antrun-plugin. It is a quite simple: configuration tasks ant antfile=build.xml property file={basedir}/project/relative/path/to/properties.file / target name=generate.clients / /ant /tasks /configuration You could pass properties to ant target using ant's property taskhttp://ant.apache.org/manual/CoreTasks/property.html . Kind Regards, -- Regards Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: [M2] Classpath issue
There is some other version of xerces in your classpath? Kind Regards, On 2/23/07, Siegmann Daniel, NY [EMAIL PROTECTED] wrote: I am trying to convert a project from Maven1 to Maven2. Should be simple, but I am getting a ClassNotFoundException on the following line in my code when running JUnit tests through Maven: XMLReaderFactory.createXMLReader(org.apache.xerces.parsers.SAXParser) This class is in xerces-2.4.0.jar, I have verified. This is listed as a dependency, and the -X option confirms it should be on the classpath. I built the eclipse files and ran the test, no problem - I had to remove some nested directories listed under resources, but this shouldn't have any effect on class loading. Any ideas what could be causing this problem? I don't even know how to debug this. :( -- Daniel Siegmann FJA-US, Inc. 512 Seventh Ave., New York, NY 10018 (212) 840-2618 ext. 139 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Mojo accessing project properties
Hello, David Adding @requiresProject does nothing. What about try inject the project object instead project.properties? /** * @parameter default-value=${project} * @required * @readonly */ private MavenProject project; I know that it is not a neat solution, but probably will works fine for you. Interestingly, I'm getting the dependencies just fine without having @requiresDependencyResolution there (although in my case I don't want transitive dependencies--I expected leaving this attribute out would only give me the direct dependencies including inherited dependencies). Not sure about it, but maybe it is working because dependencies were already processed when your mojo is activated. Kind Regards, -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Making properties accessible in pom.xml
You could create a simple mojo to do it. Maybe you can put your properties in pom and make them disposable using filter to replace keys in your database.properties. For example: properties driverthe.driver.Class/driver /properties And inside your database.properties: driver=${driver} So, make this file to be filtered by Maven. HTH. -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: how to include a local jar in compile path
Seems to me, the best approach is install file in local repository. Search for install:install-file in Maven docs. Kind Regards. On 2/21/07, igah [EMAIL PROTECTED] wrote: hi there, if i have a file in the directory project_home/lib/foo.jar that i want to use in my compilation. how can i do it? i tried to specify a system dependency but then i was required to give the absolute path. but this project_home really is just the working directory root which is different on each developer's machine. could someone help me out? there got to be a simpler approach. (i dont want to set up a local repository. i just simply want to include a third party jar during compilation.) thanks a lot. -- View this message in context: http://www.nabble.com/how-to-include-a-local-jar-in-compile-path-tf3270565s177.html#a9093210 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Mojo accessing project properties
Hi, you need annotate you mojo with @requiresProject tag: /** * Verifies that the dependencies of the project are official. * * @goal verify * * @phase validate * @requiresProject * @requiresDependencyResolution */ public class VerifyDependenciesMojo extends AbstractMojo { ... } So, maven will do all stuff that is necessary to parse pom and create MavenProject object before start your mojo. Because you need to access dependencies project, you also need to use the @requiresDependencyResolution. Hope this helps. On 2/17/07, David Jackman [EMAIL PROTECTED] wrote: At this point, it's a simple mojo that I'm executing via the command line (trying to figure out how I can get at this information and what form it comes in since no docs explain this). This mojo will eventually be attached to the verify phase, and that's what's in the mojo now. Are the properties not available at that stage? The entire mojo code is below. ..David.. /** * Verifies that the dependencies of the project are official. * * @goal verify * * @phase validate */ public class VerifyDependenciesMojo extends AbstractMojo { /** * Dependencies to verify. * Items in the list will be of type org.apache.maven.model.Dependency . * * @parameter default-value=${project.dependencies} * @required * @readonly */ private List dependencies; /** * Project properties. * * @parameter default-value=${project.properties} * @required * @readonly */ private Properties properties; /** * @see AbstractMojo#execute() */ public void execute() throws MojoExecutionException, MojoFailureException { getLog().debug(Properties: + properties); } } From: Jason van Zyl [mailto:[EMAIL PROTECTED] Sent: Fri 2/16/2007 8:38 PM To: Maven Users List Subject: Re: Mojo accessing project properties What's the rest of your mojo look like? Are you using @execute phase=something? Jason. On 16 Feb 07, at 4:43 PM 16 Feb 07, David Jackman wrote: I'm trying to write a mojo that accesses the properties section of the project pom. I declared a member variable like this /** * Project properties. * * @parameter default-value=${project.properties} * @required * @readonly */ private Properties properties; When my mojo runs, it gets a Properties object okay, but it's always empty, even if I have declared properties in the project POM. Am I doing something wrong? How do I access the project properties (not plugin configuration properties)? ..David.. - 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] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: [m2] Access dependency properties inside pom.
Good day to you, franz I really don't know how is the best way to do it, but I need to try something to solve my problem. How I must do it? What is the right way? Thanks... On 2/13/07, franz see [EMAIL PROTECTED] wrote: Good day to you, Marcos, I do not know if this is the best way to to do it, but you may want to take a look at the Storing Properties section of [1]. Cheers, Franz [1] http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook Marcos Silva Pereira wrote: Hello, I figured out what is wrong with my configuration: I was trying to use properties in a different life cycle (clean). So, I have try to change somethings in my Mojo and in pom.xml. Now I have the following combo: /** * @goal properties * @phase initialize * @requiresDependencyResolution * @requiresProject * */ public class EnableProjectPropertiesMojo extends AbstractMojo { ... I other words, I have added @phase tag. And my pom.xml: plugin groupIdcom.provider.maven.plugins/groupId artifactIdmaven-properties-plugin/artifactId version1.0/version executions execution phaseinitialize/phase goals goalproperties/goal /goals /execution /executions /plugin I put some logs and so I can see that the mojo was executed correctly, but I still can't access properties setted by it. So, my question is, how can a mojo set properties to maven in a way that they are disposable in pom.xml? I am using System.setProperty. Kind Regards -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com -- View this message in context: http://www.nabble.com/Access-dependency-properties-inside-pom.-tf3189482s177.html#a8939044 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Access dependency properties inside pom.
Hello, I figured out what is wrong with my configuration: I was trying to use properties in a different life cycle (clean). So, I have try to change somethings in my Mojo and in pom.xml. Now I have the following combo: /** * @goal properties * @phase initialize * @requiresDependencyResolution * @requiresProject * */ public class EnableProjectPropertiesMojo extends AbstractMojo { ... I other words, I have added @phase tag. And my pom.xml: plugin groupIdcom.provider.maven.plugins/groupId artifactIdmaven-properties-plugin/artifactId version1.0/version executions execution phaseinitialize/phase goals goalproperties/goal /goals /execution /executions /plugin I put some logs and so I can see that the mojo was executed correctly, but I still can't access properties setted by it. So, my question is, how can a mojo set properties to maven in a way that they are disposable in pom.xml? I am using System.setProperty. Kind Regards -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Access dependency properties inside pom.
Hello, Because I think that is a quite useful enable access to dependency properties inside pom, I am trying to develop a Maven plugin to set properties in the following format: ${project.dependencies[groupId:artifactId].version|scope|type} My mojo code is: package com.provider.maven.plugins; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; /** * @goal properties * @requiresDependencyResolution * @requiresProject */ public class EnableProjectPropertiesMojo extends AbstractMojo { private static final String DEPENDENCY_PREFIX = project.dependencies; /** * Instancia do projeto. * * @parameter default-value=${project} * @required * @readonly */ private MavenProject project; public void execute() throws MojoExecutionException { for (Object object : project.getArtifacts()) { Artifact artifact = (Artifact) object; String artifactIdentification = DEPENDENCY_PREFIX + [ + artifact.getGroupId() + : + artifact.getArtifactId() + ].; getLog().debug( Setting properties for ' + artifactIdentification + '); String version = artifactIdentification + artifact.getVersion(); String scope = artifactIdentification + artifact.getScope(); String type = artifactIdentification + artifact.getType(); System.setProperty(version, artifact.getVersion()); System.setProperty(scope, artifact.getScope()); System.setProperty(type, artifact.getType()); } } } And I have configure it in the build life cycle using: plugin groupIdcom.provider.maven.plugins/groupId artifactIdmaven-properties-plugin/artifactId version1.0/version executions execution phaseinitialize/phase goals goalproperties/goal /goals /execution /executions /plugin But properties still not accessible in my pom. Some ideas what is wrong? ps.: I've used ${project} instead of ${project.artifacts} because I plan to extends this mojo later. On 2/8/07, dawn.angelito [EMAIL PROTECTED] wrote: Hi Marcos, Instead of doing that, try this: dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version${property.name}/version /dependency /dependencies property.name3.8.1/property.name Declare the version as a property then use that in your dependency. Hope this helps. Dawn Marcos Silva Pereira wrote: How can I access dependency information inside the pom.xml? I would like to do something like the following: property.name${project.dependencies [junit:junit].version}/property.name In other words, how can I get the version from a dependency? Thanks... -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com -- View this message in context: http://www.nabble.com/Access-dependency-properties-inside-pom.-tf3189482s177.html#a8860434 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Re: Access dependency properties inside pom.
Dawn, Thanks for your help. But, what about transitive dependencies? Kind Regards On 2/8/07, dawn.angelito [EMAIL PROTECTED] wrote: Hi Marcos, Instead of doing that, try this: dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version${property.name}/version /dependency /dependencies property.name3.8.1/property.name Declare the version as a property then use that in your dependency. Hope this helps. Dawn Marcos Silva Pereira wrote: How can I access dependency information inside the pom.xml? I would like to do something like the following: property.name${project.dependencies [junit:junit].version}/property.name In other words, how can I get the version from a dependency? Thanks... -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com -- View this message in context: http://www.nabble.com/Access-dependency-properties-inside-pom.-tf3189482s177.html#a8860434 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
Access dependency properties inside pom.
How can I access dependency information inside the pom.xml? I would like to do something like the following: property.name${project.dependencies[junit:junit].version}/property.name In other words, how can I get the version from a dependency? Thanks... -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] skype: marcos.silva.pereira http://blastemica.blogspot.com
[M2]: Doubts about modules and packing.
Hello, this is my first post to this list. Usually, I can find any information I need to use Maven. But, nowadays, because my company is migrating from Ant to Maven and we have a lot of specific targets, I need to appeal to this mailing list. So, we are doing the migration following the steps below: 1. Put projects in Maven layout 2. Split some projects in many modules project 3. Migrate Ant tasks. Doing theses steps we have some doubts. Our environment: We have a set of internal projects that work more like libs to other real projects. So, we desire to add these internal libs as maven managed dependencies, we´ve even created an internal remote repository to deploy them. Right now, these libs have only classes, but to us, in a logical view, they must contain all artifacts related to them - like JSPs, pictures, and so forth. First: We have more than one project that share the same web application structure. In other words, all web artefacts for those projects - including jsp - are in the same directory/eclipse project, without modules. My question is: how can I separate web application part in modules and later take only a single war with all artifacts? How can can separate these projects and keep taking my whole webapp? Second: I have some ant´s targets that create jars for java web start clients. These jars have classes that are part of the dependencies - for example, from commons-beans. Using Ant, I put these classes in jws's jar using a zipfileset: zipfileset id=jar.commons-beans src=${libs}/commons-beans.jar include name=org/apache/... / ... /zipfileset Of course, I manage the dependency manually, so, I could reference it in src attribute. Using maven, how can I do it? I am already using the antrun plugin, but I don't know how to reference a dependency jar inside pom.xml. Do you have any suggestions? Maybe I can use maven-webstart plugin, but how do I filter classes inside a dependency? ps.: sorry my poor English. -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] http://blastemica.blogspot.com
[M2]: how to pass maven properties to ant build using antrun?
Hello, I am invoking some ant targets using maven antrun plugin but I cant see how to pass maven properties to Ant build file. For example, I have the following maven property: properties jws.pathsrc/main/javawebstart/jws.path /properties But this properties is not accessible in ant build. Even if I put the ant target inside pom.xml I cant access it. If I execute the config below: plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasecompile/phase configuration tasks echoproperties / /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies /dependency groupIdant/groupId artifactIdant-optional/artifactId version1.5.3-1/version /dependency /dependencies /plugin I get only theses properties: [INFO] [antrun:run {execution: default}] [INFO] Executing tasks [echoproperties] #Ant properties [echoproperties] #Tue Feb 06 16:56:03 GMT-03:00 2007 [echoproperties] ant.project.name=DummyProject [echoproperties] basedir=C\:\\Eclipse3.2.1\\workspace\\Atendimento [INFO] Executed tasks I already have try use propertyset with ant task to pass ${ project.properties} but without success. -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] http://blastemica.blogspot.com
Re: [M2]: how to pass maven properties to ant build using antrun?
This can be found in a frillion places, including googling for your subject ;-) Really, sorry. :-) configuration tasks property name=foobar value=${foobar}/ You can use other attributes instead of value, check the docos around. Anyway, this is a quite verbose, especially for maven default properties. Some good reason to not use System.setProperty? And more, there is other way to do it? Thanks and sorry for so repeated post. :-) -- Marcos Silva Pereira recife - pe [EMAIL PROTECTED] http://blastemica.blogspot.com