AW: Dependencies and Aggregation
hmm, i would rather say that m4.1 has already a dependency to m4 (via parent definition, if there is a parent definition, i could be wrong though). E.g. in order to build m4.1 m4 needs to be built first. So if you define a dependency to m4.1 in m4 that build cannot work (due to the cycle). -Ursprüngliche Nachricht- Von: Karl Heinz Marbaise [mailto:k...@soebes.de] Gesendet: Montag, 12. April 2010 11:09 An: users@maven.apache.org Betreff: Re: Dependencies and Aggregation Hi Harald, first of all thanks for your help... Harald Entner-3 wrote: m4 does not have any dependencies to its submodules (it just aggregates them). That seemed to be not the full truth...if i try to supplemental define a dependency in my m4 module to make the dependency to m4.1 explicit... dependencies dependency groupId${project.groupId}/groupId artifactIdm4.1/artifactId version${project.version}/version /dependency dependency I will get the following message: [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='com.xyz.test.build:m4.1'}' and 'Vertex{label='com.xyz.test.build:m4.1'}' introduces to cycle in the graph com.xyz.test.build:m4.1 -- com.xyz.test.build:m4.1 That's indicating that the dependency has been inserted already... Harald Entner-3 wrote: so in order to build 3.2, it is sufficient that m4 is built first (e.g. maven includes modules and dependencies defined in m4). In my opinion the dependencies of m4 should be built first...(m4.1...m4.5)... Harald Entner-3 wrote: Does it built correctly if you delete your repository (at least the m* entries? If it does, i don't see a problem, as it is still working that way. Doesn't change anything in the order of the build Kind regards Karl Heinz Marbaise -- View this message in context: http://old.nabble.com/Dependencies-and-Aggregation-tp28214892p28215393.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Dependencies and Aggregation
btw: two commands that could be useful for you: mvn dependency:tree (to see the dependencies explicitly) and mvn help:effective-pom (to see the effective pom) with best regards, harald -Ursprüngliche Nachricht- Von: Entner Harald [mailto:entner.har...@afb.de] Gesendet: Montag, 12. April 2010 11:47 An: Maven Users List Betreff: AW: Dependencies and Aggregation hmm, i would rather say that m4.1 has already a dependency to m4 (via parent definition, if there is a parent definition, i could be wrong though). E.g. in order to build m4.1 m4 needs to be built first. So if you define a dependency to m4.1 in m4 that build cannot work (due to the cycle). -Ursprüngliche Nachricht- Von: Karl Heinz Marbaise [mailto:k...@soebes.de] Gesendet: Montag, 12. April 2010 11:09 An: users@maven.apache.org Betreff: Re: Dependencies and Aggregation Hi Harald, first of all thanks for your help... Harald Entner-3 wrote: m4 does not have any dependencies to its submodules (it just aggregates them). That seemed to be not the full truth...if i try to supplemental define a dependency in my m4 module to make the dependency to m4.1 explicit... dependencies dependency groupId${project.groupId}/groupId artifactIdm4.1/artifactId version${project.version}/version /dependency dependency I will get the following message: [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='com.xyz.test.build:m4.1'}' and 'Vertex{label='com.xyz.test.build:m4.1'}' introduces to cycle in the graph com.xyz.test.build:m4.1 -- com.xyz.test.build:m4.1 That's indicating that the dependency has been inserted already... Harald Entner-3 wrote: so in order to build 3.2, it is sufficient that m4 is built first (e.g. maven includes modules and dependencies defined in m4). In my opinion the dependencies of m4 should be built first...(m4.1...m4.5)... Harald Entner-3 wrote: Does it built correctly if you delete your repository (at least the m* entries? If it does, i don't see a problem, as it is still working that way. Doesn't change anything in the order of the build Kind regards Karl Heinz Marbaise -- View this message in context: http://old.nabble.com/Dependencies-and-Aggregation-tp28214892p28215393.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - 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
AW: Controlling maven...
you don't have to declare the plugin twice, you can declare it only once and add two execution nodes.(with all required properties). Afaik, you can put configuration information that is common to both execution nodes outside the execution node and put the execution specific information into the configuration child of the execution node. e.g. plugin... executions execution ... configuration.../configuration /execution execution ... configuration.../configuration /execution /execution configuration .. common configuration.. /configuration /plugin hope it helps harald -Ursprüngliche Nachricht- Von: andy.b...@dstglobalsolutions.com [mailto:andy.b...@dstglobalsolutions.com] Gesendet: Dienstag, 6. April 2010 16:46 An: users@maven.apache.org Betreff: Controlling maven... Hi I am trying to use Maven to automate a complicated process: I have 3 machines: a Maven build machine, a Project WebSite server machine and a Project Install Builder Machine. We have several builds, controlled by Hudson. After a particular build, the Project Install Builder Machine will have created an Installer and a nice set of web pages to go with it. These have been zipped up to make transferring them easier. I then need Maven to: 1) Get the project Installer from the Project Install Builder Machine (a .zip file) using FTP 2) Unzip this file to a project specific folder 3) FTP the contents this folder to the WebSite machine. I am trying to use the wagon plugin to do steps 1 and 3 but I am finding that specifying the plugin twice in the same pom.xml is causing trouble. If I try this... plugin groupIdorg.codehaus.mojo/groupId artifactIdwagon-maven-plugin/artifactId executions execution idftp-deployed-properties-files/id !--phasepre-integration-test/phase-- goals goaldownload/goal /goals /execution /executions configuration toDir${project.build.directory}\WebInstaller/toDir urlftp://anonymous:hwscr...@isbuild/WebServicesBuild/target/installanywhere/investmentaccounting_Build_Output/url /configuration /plugin ... plugin groupIdorg.codehaus.mojo/groupId artifactIdwagon-maven-plugin/artifactId executions execution idftp-deployed-properties-files/id !--phasepre-integration-test/phase-- goals goalupload/goal /goals /execution /executions configuration fromDir${project.build.directory}\WebInstaller\V-1.0.0.${buildNumber}\/fromDir urlftp://anonymous:hwscr...@localhost/url /configuration /plugin and call it with this command: mvn wagon:download wagon:upload then the configuration section from the upload is also used for the download. However, if I move the configuration sections to within the execution tag, I get this message: [INFO] One or more required plugin parameters are invalid/missing for 'wagon:download' [0] Inside the definition for plugin 'wagon-maven-plugin' specify the following: configuration ... urlVALUE/url /configuration -OR- on the command line, specify: '-Dwagon.url=VALUE' I can't use the latter option because the URL is dynamically generated from the SCM version number and I need two different locations! So, it seems that the wagon plugin cannot use 2 different URL's in the same pom.xml. I know I can put the commands in separate pom's, but that seems like a poor solution to me. Andy Bell | DST Global Solutions Limited | 44 020 8390 5000x5837 http://www.dstglobalsolutions.com * From May 18th 2009: DST International Limited will be known as DST Global Solutions Limited. DST International Output Limited will be known as DST Output Limited. Please update your address book with the new email address and visit our new websites: http://www.dstglobalsolutions.com and http://www.dstoutput.co.uk = Notice: This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential
AW: AW: Controlling maven...
ok. seems strange (i would like to try it on my own, unfortunately i'm lacking time to do so.) i'm using the plugin as well (only once inside the pom) but it's working fine. Maybe it has problems when defined twice. you wrote [1]: If the url property is defined in both configurations and there is no common configuration this should work. Have you defined the plugin in a parent pom as well? (that could cause a problem if the configuration is missing the url property (and the configuration is inside the execution part, so no url information would be passed to the parent wagon definition) Have you tried both configurations on its own. (e.g. uncomment the upload and try only download and vice versa ? does this work?) [1] However, if I move the configuration sections to within the execution tag, I get this message: [INFO] One or more required plugin parameters are invalid/missing for 'wagon:download' [0] Inside the definition for plugin 'wagon-maven-plugin' specify the following: configuration ... urlVALUE/url /configuration -Ursprüngliche Nachricht- Von: andy.b...@dstglobalsolutions.com [mailto:andy.b...@dstglobalsolutions.com] Gesendet: Dienstag, 6. April 2010 17:07 An: Maven Users List Betreff: Re: AW: Controlling maven... harald Unfortunately, this leads to the problem I mentioned: [INFO] One or more required plugin parameters are invalid/missing for 'wagon:download' [0] Inside the definition for plugin 'wagon-maven-plugin' specify the following: configuration ... urlVALUE/url /configuration Maven is not picking up the execution specific configuration... Andy Bell | DST Global Solutions Limited | 44 020 8390 5000x5837 Entner Harald entner.har...@af b.de To Maven Users List 06/04/2010 15:55 users@maven.apache.org cc Please respond to Subject Maven UsersAW: Controlling maven... List us...@maven.apac he.org you don't have to declare the plugin twice, you can declare it only once and add two execution nodes.(with all required properties). Afaik, you can put configuration information that is common to both execution nodes outside the execution node and put the execution specific information into the configuration child of the execution node. e.g. plugin... executions execution ... configuration.../configuration /execution execution ... configuration.../configuration /execution /execution configuration .. common configuration.. /configuration /plugin hope it helps harald -Ursprüngliche Nachricht- Von: andy.b...@dstglobalsolutions.com [mailto:andy.b...@dstglobalsolutions.com] Gesendet: Dienstag, 6. April 2010 16:46 An: users@maven.apache.org Betreff: Controlling maven... Hi I am trying to use Maven to automate a complicated process: I have 3 machines: a Maven build machine, a Project WebSite server machine and a Project Install Builder Machine. We have several builds, controlled by Hudson. After a particular build, the Project Install Builder Machine will have created an Installer and a nice set of web pages to go with it. These have been zipped up to make transferring them easier. I then need Maven to: 1) Get the project Installer from the Project Install Builder Machine (a .zip file) using FTP 2) Unzip this file to a project specific folder 3) FTP the contents this folder to the WebSite machine. I am trying to use the wagon plugin to do steps 1 and 3 but I am finding that specifying the plugin twice in the same pom.xml is causing trouble. If I try this... plugin groupIdorg.codehaus.mojo/groupId artifactIdwagon-maven-plugin/artifactId executions
AW: How to build a complicated artifact (an install CD iso image)
Hi, I would suggest the maven assembly plugin. [1] Details on its configuration [2] [1] http://maven.apache.org/plugins/maven-assembly-plugin/ [2] http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html -Ursprüngliche Nachricht- Von: Fredrik Israelsson [mailto:fredrik.israels...@yahoo.se] Gesendet: Dienstag, 23. März 2010 10:49 An: users@maven.apache.org Betreff: How to build a complicated artifact (an install CD iso image) Dear All, I am trying to migrate a CruiseControl/Ant/Bash project to Maven. The final artifact that I want to be the output of the system is a CD iso image with jars, resources and start scripts, all packaged in a certain structure. Is there some convenient way to make Maven do this for me, without having to write a lot of Ant and/or Bash scripts on top of the, so to speak, standard Maven procedures? Regards, Fredrik Israelsson __ Använder du Yahoo!? Är du trött på spam? Yahoo! E-post har det bästa spamskyddet som finns http://se.mail.yahoo.com - 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
AW: what copy-dependecies add -jar to artifact subDirectory
remove this line useSubDirectoryPerArtifacttrue/useSubDirectoryPerArtifact ;) -Ursprüngliche Nachricht- Von: eyal edri [mailto:eyal.e...@gmail.com] Gesendet: Donnerstag, 21. Januar 2010 09:08 An: Maven Users List Betreff: what copy-dependecies add -jar to artifact subDirectory i'm using the following configuration in my pom: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idcopy-dependencies/id phaseinstall/phase goals goalcopy-dependencies/goal /goals configuration !-- TBD - CHANGE WITH ENV VAR FROM .BASHRC -- outputDirectory/usr/lib/ctch/java/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots overWriteIfNewertrue/overWriteIfNewer useSubDirectoryPerArtifacttrue/useSubDirectoryPerArtifact stripVersiontrue/stripVersion copyPomtrue/copyPom /configuration /execution /executions /plugin but maven added a '-jar' suffix to the subdirectories: [INFO] Copying junit-4.7.jar to /usr/lib/ctch/java/*junit-jar*/junit.jar [INFO] Copying junit-4.7.pom to /usr/lib/ctch/java/junit-jar/junit.pom [INFO] Copying log4j-1.2.14.jar to /usr/lib/ctch/java/*log4j-jar*/log4j.jar anyone knows how to remove it? -- Eyal Edri
AW: what copy-dependecies add -jar to artifact subDirectory
ok, i just realised, that my last answer was not useful (i was too fast and i realized that it was your intention to place that line, that i suggested to remove). So here another one with some more sense. Afaics, you can't change this behaviour, except changing the source. From the plugin site: useSubDirectoryPerArtifact boolean Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar) So there it is mentioned that the directory is prefixed with a -jar. I checked the source code and in the class DependencyUtils if ( useSubdirsPerType ) . { . sb.append( artifact.getType() ).append( s ).append( File.separatorChar ); } if ( useSubdirPerArtifact ) { String artifactString = getDependencyId( artifact, removeVersion ); sb.append( artifactString ).append( File.separatorChar ); } So i don't think it is possible. -Ursprüngliche Nachricht- Von: Entner Harald [mailto:entner.har...@afb.de] Gesendet: Donnerstag, 21. Januar 2010 10:18 An: Maven Users List Betreff: AW: what copy-dependecies add -jar to artifact subDirectory remove this line useSubDirectoryPerArtifacttrue/useSubDirectoryPerArtifact ;) -Ursprüngliche Nachricht- Von: eyal edri [mailto:eyal.e...@gmail.com] Gesendet: Donnerstag, 21. Januar 2010 09:08 An: Maven Users List Betreff: what copy-dependecies add -jar to artifact subDirectory i'm using the following configuration in my pom: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idcopy-dependencies/id phaseinstall/phase goals goalcopy-dependencies/goal /goals configuration !-- TBD - CHANGE WITH ENV VAR FROM .BASHRC -- outputDirectory/usr/lib/ctch/java/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots overWriteIfNewertrue/overWriteIfNewer useSubDirectoryPerArtifacttrue/useSubDirectoryPerArtifact stripVersiontrue/stripVersion copyPomtrue/copyPom /configuration /execution /executions /plugin but maven added a '-jar' suffix to the subdirectories: [INFO] Copying junit-4.7.jar to /usr/lib/ctch/java/*junit-jar*/junit.jar [INFO] Copying junit-4.7.pom to /usr/lib/ctch/java/junit-jar/junit.pom [INFO] Copying log4j-1.2.14.jar to /usr/lib/ctch/java/*log4j-jar*/log4j.jar anyone knows how to remove it? -- Eyal Edri
AW: what copy-dependecies add -jar to artifact subDirectory
what do you want to do? even this is not possible with the dependency-copy plugin it could be possible with another plugin (maybe the assembly plugin but this is just a guess, i have no idea if it could work with that). IMHO the odds are bad, because they already added the feature to put the jars in seperate directories, so i'm wondering why you need them in a directory that is not followed by -${packaging}. (that's why i asked what you want to do with them) But if you really need that feature, and there is no other way to solve your problem (you could always write your own mojo and pass the dependencies to it) AND (the most important part) you have some reasonable matters you could make a feature request [1] [1] http://jira.codehaus.org/browse/MDEP -Ursprüngliche Nachricht- Von: eyal edri [mailto:eyal.e...@gmail.com] Gesendet: Donnerstag, 21. Januar 2010 10:35 An: Maven Users List Betreff: Re: what copy-dependecies add -jar to artifact subDirectory How can i propose a fix/feature to have a new tag: includeFileTypeInSubDir ? and what are the odds it will be accepted :) ? On Thu, Jan 21, 2010 at 11:31 AM, Entner Harald entner.har...@afb.dewrote: ok, i just realised, that my last answer was not useful (i was too fast and i realized that it was your intention to place that line, that i suggested to remove). So here another one with some more sense. Afaics, you can't change this behaviour, except changing the source. From the plugin site: useSubDirectoryPerArtifact boolean Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar) So there it is mentioned that the directory is prefixed with a -jar. I checked the source code and in the class DependencyUtils if ( useSubdirsPerType ) . { . sb.append( artifact.getType() ).append( s ).append( File.separatorChar ); } if ( useSubdirPerArtifact ) { String artifactString = getDependencyId( artifact, removeVersion ); sb.append( artifactString ).append( File.separatorChar ); } So i don't think it is possible. -Ursprüngliche Nachricht- Von: Entner Harald [mailto:entner.har...@afb.de] Gesendet: Donnerstag, 21. Januar 2010 10:18 An: Maven Users List Betreff: AW: what copy-dependecies add -jar to artifact subDirectory remove this line useSubDirectoryPerArtifacttrue/useSubDirectoryPerArtifact ;) -Ursprüngliche Nachricht- Von: eyal edri [mailto:eyal.e...@gmail.com] Gesendet: Donnerstag, 21. Januar 2010 09:08 An: Maven Users List Betreff: what copy-dependecies add -jar to artifact subDirectory i'm using the following configuration in my pom: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idcopy-dependencies/id phaseinstall/phase goals goalcopy-dependencies/goal /goals configuration !-- TBD - CHANGE WITH ENV VAR FROM .BASHRC -- outputDirectory/usr/lib/ctch/java/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots overWriteIfNewertrue/overWriteIfNewer useSubDirectoryPerArtifacttrue/useSubDirectoryPerArtifact stripVersiontrue/stripVersion copyPomtrue/copyPom /configuration /execution /executions /plugin but maven added a '-jar' suffix to the subdirectories: [INFO] Copying junit-4.7.jar to /usr/lib/ctch/java/*junit-jar*/junit.jar [INFO] Copying junit-4.7.pom to /usr/lib/ctch/java/junit-jar/junit.pom [INFO] Copying log4j-1.2.14.jar to /usr/lib/ctch/java/*log4j-jar*/log4j.jar anyone knows how to remove it? -- Eyal Edri -- Eyal Edri
AW: Need help to find best way to recompile complete project and dep with 1.5
Hi, afaik aggregator project do not inherit its plugins. You have to put the compiler plugin into your parent pom (or another parent pom), then all childs will use that plugin. Additionally i would specify the relativePath, so changes to the parent are immediately visible (no need to install it). Hope this helps, Harald -Ursprüngliche Nachricht- Von: nodje [mailto:nodje...@gmail.com] Gesendet: Montag, 18. Januar 2010 14:25 An: users@maven.apache.org Betreff: Need help to find best way to recompile complete project and dep with 1.5 Hi, I need to figure out a way to repackage a webapp and all it's dependencies in java5. Currently in 1.6. We use a parent pom that all dep and webapp use. I've never needed an aggregator pom up to now, as we work and release each dependency as needed. It seems obviously a good option now that I have to recompile everything with JDK1.5. The jar plugin configuration is in the parent pom, and it specifies the source and target version, as well as the classifier. Ideally, I would like to keep the parent as it is, and modify the jar plugin settings in the aggregator, which will be a child of the parent as well. The problem is that the jar dependencies don't seem to inherit the jar plugin properties from the aggregator. To makes things clearer: all-parent | new-jdk1.5-aggregator | | | dep1dep2 depX It seems a perfect place to introduce a new behavior while keeping the whole organization identical. As I can't get it to work, I've started to fork Jar dep project one by one, and add a local jar plugin config. Ideas on how to do that would be very welcome! The goal is to minimize changes on the existing structure. I'm considering adding another intermediary parent pom, (something like all-parent-jdk1.5) to see if it would propagate the jar plugin config as expected. cheers /nodje -- View this message in context: http://n2.nabble.com/Need-help-to-find-best-way-to-recompile-complete-project-and-dep-with-1-5-tp4413579p4413579.html Sent from the maven users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Questinos Regarding Testing
even this is not a maven related question (as i assume that the dependent jar is on the classpath), how do you open the file? -Ursprüngliche Nachricht- Von: Carlo Camerino [mailto:carlo.camer...@gmail.com] Gesendet: Freitag, 15. Januar 2010 11:35 An: users@maven.apache.org Betreff: Questinos Regarding Testing Hi, I'm trying to run a test on a project with several submodules in it. One of our projects has an xml file which is included in a different project with the one testing it. dao | src/test/resources | -- test-dao.xml service | src/test/resources | -- test-service.xml When i run tests in the service layer, it can't seem to find the test-dao.xml which i have a dependency on. I'm using testng to run this. One of the work aroudn would be to include i in src/main/resourcew which i don't want to do... how do i handle this? thanks carlo - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: war-plugin copy dependency to WEB-INF/custom-lib
check the maven-dependency-plugin[1], especially copy [2]. [1] http://maven.apache.org/plugins/maven-dependency-plugin/ [2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html -Ursprüngliche Nachricht- Von: Hoehmann, Andreas [mailto:andreas.hoehmann@siemens.com] Gesendet: Freitag, 15. Januar 2010 11:45 An: users@maven.apache.org Cc: Hauschild, Klaus (EXT); Lincourt, Gabriel (Ext) Betreff: war-plugin copy dependency to WEB-INF/custom-lib Hello folks. Is it possible to copy a special war-artifact dependency to a other target-path than WEB-INF/lib, i.e WEB-INF/custom-lib? All other normal dependencies should be copied to WEB-INF/lib. == Example == POM: dependency artifactIdcommon-lang/artifactId /dependency dependency artifactId.../artifactId /dependency dependency artifactIdspecial/artifactId /dependency The generated WAR should contain this: WAR: |--- WEB-INF/ |--- lib/common-lang.jar |--- lib/... |--- custom-lib/special.jar Kind regards Andreas -[http://www.ahoehma.de]- - 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
AW: war-plugin copy dependency to WEB-INF/custom-lib
yes, same plugin. If you want to copy all dependencies of the project (including the transitive dependencie), use the dependency:copy-dependencies goal. This should do the job. -Ursprüngliche Nachricht- Von: Hauschild, Klaus (EXT) [mailto:klaus.hauschild@siemens.com] Gesendet: Freitag, 15. Januar 2010 14:56 An: Maven Users List Betreff: AW: war-plugin copy dependency to WEB-INF/custom-lib Hi, Thanks for quick answer. But is there still a way to copy the specified dependency and all its depending artifacts? Klaus -Ursprüngliche Nachricht- Von: Entner Harald [mailto:entner.har...@afb.de] Gesendet: Freitag, 15. Januar 2010 11:53 An: Maven Users List Betreff: AW: war-plugin copy dependency to WEB-INF/custom-lib check the maven-dependency-plugin[1], especially copy [2]. [1] http://maven.apache.org/plugins/maven-dependency-plugin/ [2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html -Ursprüngliche Nachricht- Von: Hoehmann, Andreas [mailto:andreas.hoehmann@siemens.com] Gesendet: Freitag, 15. Januar 2010 11:45 An: users@maven.apache.org Cc: Hauschild, Klaus (EXT); Lincourt, Gabriel (Ext) Betreff: war-plugin copy dependency to WEB-INF/custom-lib Hello folks. Is it possible to copy a special war-artifact dependency to a other target-path than WEB-INF/lib, i.e WEB-INF/custom-lib? All other normal dependencies should be copied to WEB-INF/lib. == Example == POM: dependency artifactIdcommon-lang/artifactId /dependency dependency artifactId.../artifactId /dependency dependency artifactIdspecial/artifactId /dependency The generated WAR should contain this: WAR: |--- WEB-INF/ |--- lib/common-lang.jar |--- lib/... |--- custom-lib/special.jar Kind regards Andreas -[http://www.ahoehma.de]- - 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 - 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
AW: war-plugin copy dependency to WEB-INF/custom-lib
Hi Klause, Have a look here: http://jira.codehaus.org/browse/MDEP-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_68254 in that case you should use the assembly plugin (at least i understand it that way.) I haven't used that plugin so far, but it seems to suit your needs. Harald -Ursprüngliche Nachricht- Von: Hauschild, Klaus (EXT) [mailto:klaus.hauschild@siemens.com] Gesendet: Freitag, 15. Januar 2010 15:03 An: Maven Users List Betreff: AW: war-plugin copy dependency to WEB-INF/custom-lib I don't want to copy all dependencies to a custom target only a specific and its depending artifacts. -Ursprüngliche Nachricht- Von: Entner Harald [mailto:entner.har...@afb.de] Gesendet: Freitag, 15. Januar 2010 15:00 An: Maven Users List Betreff: AW: war-plugin copy dependency to WEB-INF/custom-lib yes, same plugin. If you want to copy all dependencies of the project (including the transitive dependencie), use the dependency:copy-dependencies goal. This should do the job. -Ursprüngliche Nachricht- Von: Hauschild, Klaus (EXT) [mailto:klaus.hauschild@siemens.com] Gesendet: Freitag, 15. Januar 2010 14:56 An: Maven Users List Betreff: AW: war-plugin copy dependency to WEB-INF/custom-lib Hi, Thanks for quick answer. But is there still a way to copy the specified dependency and all its depending artifacts? Klaus -Ursprüngliche Nachricht- Von: Entner Harald [mailto:entner.har...@afb.de] Gesendet: Freitag, 15. Januar 2010 11:53 An: Maven Users List Betreff: AW: war-plugin copy dependency to WEB-INF/custom-lib check the maven-dependency-plugin[1], especially copy [2]. [1] http://maven.apache.org/plugins/maven-dependency-plugin/ [2] http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html -Ursprüngliche Nachricht- Von: Hoehmann, Andreas [mailto:andreas.hoehmann@siemens.com] Gesendet: Freitag, 15. Januar 2010 11:45 An: users@maven.apache.org Cc: Hauschild, Klaus (EXT); Lincourt, Gabriel (Ext) Betreff: war-plugin copy dependency to WEB-INF/custom-lib Hello folks. Is it possible to copy a special war-artifact dependency to a other target-path than WEB-INF/lib, i.e WEB-INF/custom-lib? All other normal dependencies should be copied to WEB-INF/lib. == Example == POM: dependency artifactIdcommon-lang/artifactId /dependency dependency artifactId.../artifactId /dependency dependency artifactIdspecial/artifactId /dependency The generated WAR should contain this: WAR: |--- WEB-INF/ |--- lib/common-lang.jar |--- lib/... |--- custom-lib/special.jar Kind regards Andreas -[http://www.ahoehma.de]- - 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 - 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 - 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
AW: AW: copy resources does not overwrite existing files
Hi, you have to define the phase. in which the plugin should run. See [1] for details about the build life cycle, the following code is copied from there: Interesting for you is the phase entry. plugin groupIdcom.mycompany.example/groupId artifactIdmaven-touch-plugin/artifactId version1.0/version executions execution phaseprocess-test-resources/phase goals goaltimestamp/goal /goals /execution /executions /plugin [1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html -Ursprüngliche Nachricht- Von: skanatiker [mailto:stefan.t...@ipsways.com] Gesendet: Donnerstag, 14. Januar 2010 10:04 An: users@maven.apache.org Betreff: Re: AW: copy resources does not overwrite existing files I finally found out, that the problem is not the overwriting, but the order in which the maven tasks are executed. I executed maven with the following goals: mvn clean antrun:run package I guess in that case my resources are copied before compile. In the compile phase the wrong resource, the one i want to overwrite is copied and overwrites the file i really want to work with. How can i configure maven, so it copies my resources between the compile and package phase? skanatiker wrote: Yes, it is located in the pluginManagement section: build pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version /plugin ... olamy-2 wrote: Hi, Did you put this plugin configuration in pluginManagement section ? 2010/1/12 skanatiker stefan.t...@ipsways.com: Thanks a lot for your quick reply, but unfortunately the file is still not being overwritten. Any other ideas? Entner Harald wrote: Hi, try to set the ${maven.resources.overwrite} property. Eg. properties maven.resources.overwritetrue/maven.resources.overwrite /properties Even this means that all resources are overwritten. I haven't tested the solution, so it is not sure that it is working that way (even i'm pretty sure) regards, harald -Ursprüngliche Nachricht- Von: skanatiker [mailto:stefan.t...@ipsways.com] Gesendet: Dienstag, 12. Januar 2010 14:33 An: users@maven.apache.org Betreff: copy resources does not overwrite existing files Hi, i want to copy a resource. That works fine, as long as the file does not exist in the target directory. But in this case the file has to exist in the target directory and has to be overwritten. Here are the two relevant parts of my pom.xml: Integration of Resources-Plugin: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version /plugin Build-Configuration: build resources resource directoryconf/${env}/directory targetPath ../app/pages/global//targetPath includes includepart.jspx/include /includes /resource /resources … I’ve found out that an overwrite parameter exists, but I have no idea where to put this parameter (http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#overwrite). I tried: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version configuration overwritetrue/overwrite /configuration /plugin Or: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version configuration resources overwritetrue/overwrite /resources /configuration /plugin In the first case the build process works fine, but the file is not being overwritten. In the second case the following error occurs: -- Instead of configuring this parameter directly, try configuring your POM or settings.xml file. Using the default-value and expression annotations built into the mojo itself, these values were found in your build: Value: null Using the expression:null Value: null Using the expression:null If one of the above expressions rendered a valid value, it may give some indication of which part of the POM or settings.xml you can modify in order to change this parameter's value. --- How do I configure the overwritte parameter correctly? -- View this message in context: http://old.nabble.com/copy-resources-does-not-overwrite-existing-files-tp27127591p27127591.html Sent from the Maven - Users mailing list archive at Nabble.com
AW: copy resources does not overwrite existing files
Hi, try to set the ${maven.resources.overwrite} property. Eg. properties maven.resources.overwritetrue/maven.resources.overwrite /properties Even this means that all resources are overwritten. I haven't tested the solution, so it is not sure that it is working that way (even i'm pretty sure) regards, harald -Ursprüngliche Nachricht- Von: skanatiker [mailto:stefan.t...@ipsways.com] Gesendet: Dienstag, 12. Januar 2010 14:33 An: users@maven.apache.org Betreff: copy resources does not overwrite existing files Hi, i want to copy a resource. That works fine, as long as the file does not exist in the target directory. But in this case the file has to exist in the target directory and has to be overwritten. Here are the two relevant parts of my pom.xml: Integration of Resources-Plugin: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version /plugin Build-Configuration: build resources resource directoryconf/${env}/directory targetPath ../app/pages/global//targetPath includes includepart.jspx/include /includes /resource /resources … I’ve found out that an overwrite parameter exists, but I have no idea where to put this parameter (http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#overwrite). I tried: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version configuration overwritetrue/overwrite /configuration /plugin Or: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version configuration resources overwritetrue/overwrite /resources /configuration /plugin In the first case the build process works fine, but the file is not being overwritten. In the second case the following error occurs: -- Instead of configuring this parameter directly, try configuring your POM or settings.xml file. Using the default-value and expression annotations built into the mojo itself, these values were found in your build: Value: null Using the expression:null Value: null Using the expression:null If one of the above expressions rendered a valid value, it may give some indication of which part of the POM or settings.xml you can modify in order to change this parameter's value. --- How do I configure the overwritte parameter correctly? -- View this message in context: http://old.nabble.com/copy-resources-does-not-overwrite-existing-files-tp27127591p27127591.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: What should be the correct check for any XML to be POM?
Hi Amaresh, it is possible that in one directory more than one pom file exists. Even as far as i have used maven this case never occured. You can call mvn with the -f option in order to specify another pom.xml file. But keep in mind, that prior to version 2.0.9 (since 2.0.9 it is possible [1]) it was not possible to these pom files as modules. Regarding your question about the check: In my opinion it is sufficient to check the project with the default namespace (xmlns=...). In order to have things working in the future without touching your code i would make this configurable, as the namespace can change. Maybe it would be sufficient to use the filename (pom.xml) only. This depends on your setup. E.g. pom.xml.bak would be found when all xml files are considered (and it would match all syntax checks, but .bak files are normally considered as backup files and as a consequence it is very likely that you don't want to consider it.) [1] http://jira.codehaus.org/browse/MNG-1493 Von: amaresh mourya [mailto:amaresh.mou...@gmail.com] Gesendet: Freitag, 8. Januar 2010 10:52 An: Maven Users List Betreff: What should be the correct check for any XML to be POM? Hi all, I am need of writing a check method to filter POMs from a list of xml files. What should be the exact check? Only the project tag along with Namespace is sufficient or I need to check for all three xmlns, xmlns :xsi and xsi:schemaLocation? 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/xsd/maven-4.0.0.xsd; Another related question is : Consider a case of multi-module application pom, where in each module's directory there are more than one xml files, So is it possible that for this module there can be two POMs ? or only one.? There are two xml files attached, that have the same artifactId common-artifact, what check would return me correct POM for this artifact. 1. bak_pom.xml 2. pom.xml Thanks --amaresh
AW: Running unit tests in a specific order
Hey Michael, Afaics there is no way to define the order of tests with the surefire plugin. Maybe another plugin could help you. But IMHO i would suggest to remove the dependencies of your tests. E.g. using the @Before annotation. Otherwise you can never be sure that your tests are working after changing one of your dependent tests. This is more an advice than an useful hint. But i'm pretty sure that the surefire plugin itself wont help you defining the order of your tests. Harald -Ursprüngliche Nachricht- Von: Michel Barakat [mailto:bmic...@gmail.com] Gesendet: Donnerstag, 7. Januar 2010 12:24 An: users@maven.apache.org Betreff: Running unit tests in a specific order Hey folks, I am using the surefire plugin to run through JUnit tests. I am facing some cross-test dependencies issues and thus would like to investigate how tests perform when ran in a specific order. I have tried using the' test' flag, as in: mvn -Dtest=ATest,BTest,CTest test However, this does not necessarily execute the tests in the specified order (eg. CTest is executed before ATest or BTest). Is it possible to specify a strict order, through which unit tests should be executed? Cheers Michel - 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
AW: jaxb2-maven-plugin : Two declarations cause a collision
Hi Andrew, try removing the packageName in the pom.xml file. -Ursprüngliche Nachricht- Von: Andrew Hughes [mailto:ahhug...@gmail.com] Gesendet: Dienstag, 1. Dezember 2009 12:13 An: Maven Users List Betreff: jaxb2-maven-plugin : Two declarations cause a collision Hi All, I am trying to generate classes for the Google/OGC KML 2.2 XSD's with the jaxb2-maven-plugin (http://mojo.codehaus.org/jaxb2-maven-plugin/index.html). - http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd - http://schemas.opengis.net/kml/2.2.0/atom-author-link.xsd Both XSD's have an element: - element name=name type=string/ Which fails giving: - Two declarations cause a collision in the ObjectFactory class This I am ok with, but the resolution is confusing me, this problem is even in the plugin's FAQ page ( http://mojo.codehaus.org/jaxb2-maven-plugin/faq.html): *I have different schemas and want different packages for those schemas, how do I do this?* *You want to create multiple executions in your plugin declaration. This will allow you to have multiple configuration declarations and you can specify the schema and package to be run for that execution. In your configuation, you will need to have a different staleFile for each execution, so it will be able to determine if the xjc needs to be executed.* I have tried to add two seperate executions like the FAQ says, but it still fails :'( Possibly because ogckml22.xsd includes the atom-author-link.xsd? build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjaxb2-maven-plugin/artifactId version1.2/version executions execution idogckml22/id configuration packageNamejava.lunch20091126xml.binding.kml/packageName schemaFilesogckml22.xsd/schemaFiles staleFlag${project.build.directory}/generated-sources/jaxb/.staleFlag-ogckml22/staleFlag /configuration goals goalxjc/goal /goals /execution execution idatom-author-link/id configuration packageNamejava.lunch20091126xml.binding.atom/packageName schemaFilesatom-author-link.xsd/schemaFiles staleFlag${project.build.directory}/generated-sources/jaxb/.staleFlag-atom-author-link/staleFlag /configuration goals goalxjc/goal /goals /execution /executions /plugin ANY help would be absolutely fantastic! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: jaxb2-maven-plugin : Two declarations cause a collision
Hi Andrew, it looks like that ogckml22.xsd File imports the atom-author-link.xsd File. So isn't it sufficient to run the jaxb plugin for ogckml22.xsd only? -Ursprüngliche Nachricht- Von: Andrew Hughes [mailto:ahhug...@gmail.com] Gesendet: Dienstag, 1. Dezember 2009 13:29 An: Maven Users List Betreff: Re: jaxb2-maven-plugin : Two declarations cause a collision Hi Entner - THANK YOU for the reply and suggestion. I am still encountering the same problem :'( I'm not sure what to do here because as far as I can tell this should work. I have tried this with and without the packageName (as below): build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjaxb2-maven-plugin/artifactId version1.2/version executions execution idogckml22/id configuration schemaFilesogckml22.xsd/schemaFiles staleFlag ${project.build.directory}/generated-sources/jaxb/.staleFlag-ogckml22 /staleFlag /configuration goals goalxjc/goal /goals /execution execution idatom-author-link/id configuration schemaFilesatom-author-link.xsd /schemaFiles staleFlag ${project.build.directory}/generated-sources/jaxb/.staleFlag-atom-author-link /staleFlag /configuration goals goalxjc/goal /goals /execution /executions configuration packageNamejava.lunch20091126xml.kml/packageName /configuration /plugin On Tue, Dec 1, 2009 at 10:00 PM, Entner Harald entner.har...@afb.de wrote: Hi Andrew, try removing the packageName in the pom.xml file. -Ursprüngliche Nachricht- Von: Andrew Hughes [mailto:ahhug...@gmail.com] Gesendet: Dienstag, 1. Dezember 2009 12:13 An: Maven Users List Betreff: jaxb2-maven-plugin : Two declarations cause a collision Hi All, I am trying to generate classes for the Google/OGC KML 2.2 XSD's with the jaxb2-maven-plugin (http://mojo.codehaus.org/jaxb2-maven-plugin/index.html). - http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd - http://schemas.opengis.net/kml/2.2.0/atom-author-link.xsd Both XSD's have an element: - element name=name type=string/ Which fails giving: - Two declarations cause a collision in the ObjectFactory class This I am ok with, but the resolution is confusing me, this problem is even in the plugin's FAQ page ( http://mojo.codehaus.org/jaxb2-maven-plugin/faq.html): *I have different schemas and want different packages for those schemas, how do I do this?* *You want to create multiple executions in your plugin declaration. This will allow you to have multiple configuration declarations and you can specify the schema and package to be run for that execution. In your configuation, you will need to have a different staleFile for each execution, so it will be able to determine if the xjc needs to be executed.* I have tried to add two seperate executions like the FAQ says, but it still fails :'( Possibly because ogckml22.xsd includes the atom-author-link.xsd? build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjaxb2-maven-plugin/artifactId version1.2/version executions execution idogckml22/id configuration packageNamejava.lunch20091126xml.binding.kml/packageName schemaFilesogckml22.xsd/schemaFiles staleFlag${project.build.directory}/generated-sources/jaxb/.staleFlag-ogckml22/staleFlag /configuration goals goalxjc/goal /goals /execution execution idatom-author-link/id configuration packageNamejava.lunch20091126xml.binding.atom/packageName schemaFilesatom-author-link.xsd/schemaFiles staleFlag${project.build.directory}/generated-sources/jaxb/.staleFlag-atom-author-link/staleFlag /configuration goals goalxjc/goal /goals /execution /executions /plugin ANY help would be absolutely fantastic! - 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
AW: jaxb2-maven-plugin : Two declarations cause a collision
No, i don't think so. In my opinion the problem occurs, because two object factories are generated under the same package. That is obviously not possible, as both factories create different classes but will have the same name. So this is a collision. Try to put the xsd's under different subdirectories. E.g. xsd/dir1/...xsd. xsd/dir2/...xsd . I had once the same problem. Unfortunately, i'm not totally sure how i solved it. :/ I would suggest to try around a little. Maybe remove the duplicate entries, see if it works then. If it does, move them to another file and generate the files. If this works, try to import it and see if it works then. If the directory approach does not work, i would suggest to start a small project, in which you create two (easier) xsd files. Try to generate classes for them. Then try to generate the error with these files. Always the most important thing is to get an understanding why something fails. I then like to have a more easy setup to test. Unfortunately i don't have time to reproduce your error. So you have to do the research on your own. -Ursprüngliche Nachricht- Von: Andrew Hughes [mailto:ahhug...@gmail.com] Gesendet: Dienstag, 1. Dezember 2009 14:09 An: Maven Users List Betreff: Re: jaxb2-maven-plugin : Two declarations cause a collision Could it possibly be that I need to use xjb's to resolve the collision and not plugin configuration? On Tue, Dec 1, 2009 at 11:32 PM, Andrew Hughes ahhug...@gmail.com wrote: Thanks Again! You are correct, ogckml22.xsd does import atom-author-link.xsd. Initially I was only running a single execution for ogckml22.xsd. I switched to two because the FAQ http://mojo.codehaus.org/jaxb2-maven-plugin/faq.htmlsaid that's how to resolve the collision. I've still got no idea how to fix this, but thanks for helping so far. On Tue, Dec 1, 2009 at 11:16 PM, Entner Harald entner.har...@afb.dewrote: Hi Andrew, it looks like that ogckml22.xsd File imports the atom-author-link.xsd File. So isn't it sufficient to run the jaxb plugin for ogckml22.xsd only? -Ursprüngliche Nachricht- Von: Andrew Hughes [mailto:ahhug...@gmail.com] Gesendet: Dienstag, 1. Dezember 2009 13:29 An: Maven Users List Betreff: Re: jaxb2-maven-plugin : Two declarations cause a collision Hi Entner - THANK YOU for the reply and suggestion. I am still encountering the same problem :'( I'm not sure what to do here because as far as I can tell this should work. I have tried this with and without the packageName (as below): build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjaxb2-maven-plugin/artifactId version1.2/version executions execution idogckml22/id configuration schemaFilesogckml22.xsd/schemaFiles staleFlag ${project.build.directory}/generated-sources/jaxb/.staleFlag-ogckml22 /staleFlag /configuration goals goalxjc/goal /goals /execution execution idatom-author-link/id configuration schemaFilesatom-author-link.xsd /schemaFiles staleFlag ${project.build.directory}/generated-sources/jaxb/.staleFlag-atom-author-link /staleFlag /configuration goals goalxjc/goal /goals /execution /executions configuration packageNamejava.lunch20091126xml.kml/packageName /configuration /plugin On Tue, Dec 1, 2009 at 10:00 PM, Entner Harald entner.har...@afb.de wrote: Hi Andrew, try removing the packageName in the pom.xml file. -Ursprüngliche Nachricht- Von: Andrew Hughes [mailto:ahhug...@gmail.com] Gesendet: Dienstag, 1. Dezember 2009 12:13 An: Maven Users List Betreff: jaxb2-maven-plugin : Two declarations cause a collision Hi All, I am trying to generate classes for the Google/OGC KML 2.2 XSD's with the jaxb2-maven-plugin (http://mojo.codehaus.org/jaxb2-maven-plugin/index.html). - http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd - http://schemas.opengis.net/kml/2.2.0/atom-author-link.xsd Both XSD's have an element: - element name=name type=string/ Which fails giving: - Two declarations cause a collision in the ObjectFactory class This I am ok with, but the resolution is confusing me, this problem is even in the plugin's FAQ page ( http://mojo.codehaus.org/jaxb2-maven-plugin/faq.html): *I have different schemas and want different packages for those schemas, how do I do this?* *You want to create multiple executions in your plugin declaration. This will allow you to have multiple configuration declarations and you can specify the schema and package to be run for that execution. In your configuation, you will need to have a different staleFile for each execution, so it will be able to determine if the xjc needs to be executed.* I have tried to add two seperate executions like the FAQ says, but it still fails :'( Possibly because ogckml22.xsd includes the atom-author-link.xsd? build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjaxb2-maven-plugin
AW: Any idea what this error means
Have you tried to delete your local repository and then run maven again? -Ursprüngliche Nachricht- Von: Richard Bibb [mailto:richard.b...@aimhedge.com] Gesendet: Freitag, 27. November 2009 12:01 An: users@maven.apache.org Betreff: Any idea what this error means Hi All I'm getting an odd error from mvn when trying to generate my site. The error is shown below. I don't really understand what the error is saying and so can't figure out where to look to fix this. Could someone point me in the right direction please Regards Richard == Tests run: 55, Failures: 0, Errors: 0, Skipped: 0 - this realm = app0.child-container[org.apache.maven.plugins:maven-javadoc-plugin: 2.6] urls[0] = file:/C:/Documents and Settings/AHTradingUser/.m2/repository/org/apach e/maven/plugins/maven-javadoc-plugin/2.6/maven-javadoc-plugin-2.6.jar urls[1] = file:/C:/Documents and Settings/AHTradingUser/.m2/repository/org/codeh aus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar Number of imports: 10 import: org.codehaus.classworlds.en...@a6c57a42 import: org.codehaus.classworlds.en...@12f43f3b import: org.codehaus.classworlds.en...@20025374 import: org.codehaus.classworlds.en...@f8e44ca4 import: org.codehaus.classworlds.en...@92758522 import: org.codehaus.classworlds.en...@ebf2705b import: org.codehaus.classworlds.en...@bb25e54 import: org.codehaus.classworlds.en...@bece5185 import: org.codehaus.classworlds.en...@3fee8e37 import: org.codehaus.classworlds.en...@3fee19d8 this realm = plexus.core urls[0] = file:/C:/Program Files/Apache/apache-maven-2.2.1/bin/../lib/maven-2.2. 1-uber.jar Number of imports: 10 import: org.codehaus.classworlds.en...@a6c57a42 import: org.codehaus.classworlds.en...@12f43f3b import: org.codehaus.classworlds.en...@20025374 import: org.codehaus.classworlds.en...@f8e44ca4 import: org.codehaus.classworlds.en...@92758522 import: org.codehaus.classworlds.en...@ebf2705b import: org.codehaus.classworlds.en...@bb25e54 import: org.codehaus.classworlds.en...@bece5185 import: org.codehaus.classworlds.en...@3fee8e37 import: org.codehaus.classworlds.en...@3fee19d8 - [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error getting reports from the plugin 'org.apache.maven.plugins:maven-jav adoc-plugin:2.6': Unable to load the mojo 'org.apache.maven.plugins:maven-javado c-plugin:2.6:test-javadoc' in the plugin 'org.apache.maven.plugins:maven-javadoc -plugin'. A required class is missing: org/codehaus/plexus/archiver/ArchiverExce ption org.codehaus.plexus.archiver.ArchiverException [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error getting reports fr om the plugin 'org.apache.maven.plugins:maven-javadoc-plugin:2.6': Unable to loa d the mojo 'org.apache.maven.plugins:maven-javadoc-plugin:2.6:test-javadoc' in t he plugin 'org.apache.maven.plugins:maven-javadoc-plugin'. A required class is m issing: org/codehaus/plexus/archiver/ArchiverException at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getReports(Defaul tLifecycleExecutor.java:993) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:650) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by:
AW: AW: Any idea what this error means
you could also adapt your settings.xml in order to bypass the companies repository. (remove the proxy definition) -Ursprüngliche Nachricht- Von: Richard Bibb [mailto:richard.b...@aimhedge.com] Gesendet: Freitag, 27. November 2009 13:25 An: users@maven.apache.org Betreff: Re: AW: Any idea what this error means I have deleted the local copy but not the one in the company repository. I'll give it a go Have you tried to delete your local repository and then run maven again? -Ursprüngliche Nachricht- -- View this message in context: http://old.nabble.com/Any-idea-what-this-error-means-tp26540843p26541767.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Using Ivy repository in Maven
Hi sandarenu, it depends. If the jars are available in a public repository, the only thing you have to do is to define them as dependencies in your pom. Try http://mvnrepository.com/ as a start. There are more repositories available though. . If you want to upload your files manually you can use mvn deploy:deploy:file see [1]. If there are many files or you just want to have a quick start i would consider writing a bash/bat script that iterates through all your jars and calls mvn deploy:deploy-file. I would consider using Nexus and deploy your files there (when they are not available in a public repository [2] Hope this helps, Harald [1] http://maven.apache.org/plugins/maven-deploy-plugin/usage.html [2] http://nexus.sonatype.org/ -Ursprüngliche Nachricht- Von: sandarenu [mailto:sandar...@gmail.com] Gesendet: Freitag, 30. Oktober 2009 03:51 An: users@maven.apache.org Betreff: Using Ivy repository in Maven Hi all, I'm quite new to Maven. Currently I use ant to build my java applications and use Ivy as dependency management tool. I'm keeping all by dependency jars in svn and use ant+ivy to get them when I build my application. Now I'm planning to move to maven and I wanted to have a local repository for maven. In maven is there a way which i can directly access the jars I currently have in svn, or is there a way to import them to maven repository? Since I've quite a lot of jars in svn (currently using with ant + ivy) it is not easy to do that manually. Thanks and regards, sandarenu. -- View this message in context: http://old.nabble.com/Using-Ivy-repository-in-Maven-tp26124183p26124183.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Netbeans SOA Project
Hello, has anyone tried to migrate from Netbeans (which uses ant as build script) to Maven. I face some serious problems doing so, with Bpel- and Composite Application Modules. I see two solutions (both are not perfect): - servicemix from apache, which seems not to be applicable with existing project structures. (Additionally we are using OpenESB) - write my own plugin, that invokes the ant tasks defined in the build-impl.xml, created by netbeans (currently i'm going that way, but i'm wondering if there is not a better solution) All other things are already running (contract first webservices, jaxb code generation, ..) thx Harald - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Running Jar file created by Maven
What kind of project are you talking about? Is it a pure Java project or does it run inside glassfish (for example)? What class files are missing? How does the stacktrace look like? Try to add the missing artifacts to the pom. -Ursprüngliche Nachricht- Von: jamborta [mailto:jambo...@gmail.com] Gesendet: Dienstag, 13. Oktober 2009 11:23 An: users@maven.apache.org Betreff: Running Jar file created by Maven Hi guys, I'm new to Maven. I have this problem that I created a Maven project in netbeans, added dependencies, and build it successfully, it runs in Netbeans as well. but if I try to build it from the command prompt using mvn install, it build the whole staff, but when I try to run the jar file, it just fails becuase it cannot find the library files (dependencies), looks like maven doesn't add those files, although it downloads them... please help me, i'm looking for the answer for quite a while now. thanks Tom -- View this message in context: http://www.nabble.com/Running-Jar-file-created-by-Maven-tp25869690p25869690.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: AW: Running Jar file created by Maven
How do you run the jar file? (outside netbeans). with java -jar ? If you do so, the jar files need to be included in the resulting jar file, or you have to add it to the classpath, via -cp ... -Ursprüngliche Nachricht- Von: jamborta [mailto:jambo...@gmail.com] Gesendet: Dienstag, 13. Oktober 2009 11:38 An: users@maven.apache.org Betreff: Re: AW: Running Jar file created by Maven it's a pure java project. and it runs OK inside netbeans. I get a NoClassDefFoundError if try to run it from the command line: Exception in thread main java.lang.NoClassDefFoundError: cern/colt/function/In tObjectProcedure at com.main.App.main(App.java:36) Caused by: java.lang.ClassNotFoundException: cern.colt.function.IntObjectProcedu re at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 1 more What kind of project are you talking about? Is it a pure Java project or does it run inside glassfish (for example)? What class files are missing? How does the stacktrace look like? Try to add the missing artifacts to the pom. -- View this message in context: http://www.nabble.com/Running-Jar-file-created-by-Maven-tp25869690p25869863.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: AW: Running Jar file created by Maven
Have a look here: http://maven.apache.org/shared/maven-archiver/examples/classpath.html -Ursprüngliche Nachricht- Von: Entner Harald [mailto:entner.har...@afb.de] Gesendet: Dienstag, 13. Oktober 2009 11:50 An: Maven Users List Betreff: AW: AW: Running Jar file created by Maven How do you run the jar file? (outside netbeans). with java -jar ? If you do so, the jar files need to be included in the resulting jar file, or you have to add it to the classpath, via -cp ... -Ursprüngliche Nachricht- Von: jamborta [mailto:jambo...@gmail.com] Gesendet: Dienstag, 13. Oktober 2009 11:38 An: users@maven.apache.org Betreff: Re: AW: Running Jar file created by Maven it's a pure java project. and it runs OK inside netbeans. I get a NoClassDefFoundError if try to run it from the command line: Exception in thread main java.lang.NoClassDefFoundError: cern/colt/function/In tObjectProcedure at com.main.App.main(App.java:36) Caused by: java.lang.ClassNotFoundException: cern.colt.function.IntObjectProcedu re at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 1 more What kind of project are you talking about? Is it a pure Java project or does it run inside glassfish (for example)? What class files are missing? How does the stacktrace look like? Try to add the missing artifacts to the pom. -- View this message in context: http://www.nabble.com/Running-Jar-file-created-by-Maven-tp25869690p25869863.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - 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
AW: AW: AW: Running Jar file created by Maven
No, it does not. It actually knows, which libraries are included and where they are (this includes also transitive dependencies.) but when you run java -jar only the generated jar is on the classpath, not the maven repository. So you have to tell maven, to include these artifacts inside the generated jar. Fortunately there are a lot of plugins who can help you with this (so you don't have to include them manually.) I haven't used Maven for that purpose very often, but i have seen this plugin [1], which should help you. Maybe there is even an easier way, but i think this one is pretty straightforward. The plugin Mark suggested would do the job as well i think. So it is up to you which one to use. with regards, Harald [1] http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Make -Ursprüngliche Nachricht- Von: jamborta [mailto:jambo...@gmail.com] Gesendet: Dienstag, 13. Oktober 2009 12:06 An: users@maven.apache.org Betreff: Re: AW: AW: Running Jar file created by Maven yes, i run with java -jar but when I run mvn install, I can see that it downloads all the dependencies. i thought it takes care of that automatically. Entner Harald wrote: How do you run the jar file? (outside netbeans). with java -jar ? If you do so, the jar files need to be included in the resulting jar file, or you have to add it to the classpath, via -cp ... -- View this message in context: http://www.nabble.com/Running-Jar-file-created-by-Maven-tp25869690p25870160.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Failed deployment of Maven project to Glassfish
Does the jar reside in the war file? -Ursprüngliche Nachricht- Von: diafa...@gmail.com [mailto:diafa...@gmail.com] Im Auftrag von dtiodtio Gesendet: Samstag, 3. Oktober 2009 21:49 An: users@maven.apache.org Betreff: Failed deployment of Maven project to Glassfish Hello, I recently converted from ant to maven and I'm now trying to deploy to GlassFish the Maven .war of a multimodule project. The .war file is built successfully with its dependencies (using the NetBeans IDE) and deployed using the GlassFish Admin Console (still don't have the hang of deploying through NetBeans using plugins). However, deployment fails with the given server.log message (as produced by checking the Verifier flag in the Admin Console): Failed to find following classes: [ javax.ws.rs.core.ApplicationConfig ] referenced in the following call stack : at com.sun.jersey.api.core.ResourceConfig at com.sun.jersey.api.core.DefaultResourceConfig at com.sun.jersey.api.core.ApplicationConfigAdapter at com.sun.jersey.spi.container.servlet.ServletContainer However, I have the following entry dependency groupIdjavax.ws.rs/groupId artifactIdjsr311-api/artifactId version1.1/version scopecompile/scope /dependency in the .war pom.xml Is this a bug or am I doing something wrong? Thanks in advance Dimitris
AW: Maven2 Pom Configuration
You can use the build-helper-maven-plugin to add additional source folders. e.g. plugin groupIdorg.codehaus.mojo/groupId artifactIdbuild-helper-maven-plugin/artifactId version1.3/version executions execution idadd-source/id phasegenerate-sources/phase goals goaladd-source/goal /goals configuration sources sourcetarget/generated-sources/generated/source /sources /configuration /execution /executions /plugin with regards, harald -Ursprüngliche Nachricht- Von: tbar0711 [mailto:thomas.bart...@kaufland.de] Gesendet: Dienstag, 6. Oktober 2009 17:45 An: users@maven.apache.org Betreff: Maven2 Pom Configuration Hi there, I actually have 2 Maven Projects in Eclipse. The one contains JUnit Tests (let's call it Test). The other (let's call it Core) contains session beans, entities etc. (everything that has to be tested by the JUnit Tests). In my Test project I have added a source folder named bootstrap to the build path. Also I have got a user library with some jars. In my build path I have defined a reference to the Core project (required project on the build path in Projects). All tests are successful (green). Everything's all right. Now I don't want to use my user library any more. I want to realize it via Maven Dependencies. I already put the jars as Maven Dependencies into my pom file and they are all available. If I start my JUnit tests with mvn test within my console I get some errors. The reason for this I think is that I have to inform Maven about my source folder bootstrap and the reference to the Core project. Exactly this is my problem. What I have to write into my pom file to inform Maven about my source folder and the reference to the Core project? Thanks in advance. Kindly regards Tom -- View this message in context: http://www.nabble.com/Maven2-Pom-Configuration-tp25771284p25771284.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Showing pom files in dependency tree.
Have you tried to delete the complete repository (.../.m2/repository), in which the false artifact is found? Maybe there are some legacy artifacts in it, which in return have dependencies on others and so on. -Ursprüngliche Nachricht- Von: Michael Delaney [mailto:mdela...@upromise.com] Gesendet: Montag, 5. Oktober 2009 16:56 An: users@maven.apache.org Betreff: Showing pom files in dependency tree. All, I'm trying to diagnose an odd problem. The problem is on *some*, but not all, machines, one of our projects is trying to download an old retired snapshot build. I can't reproduce this locally but I can on our CI server. I checked the pom (top-level and parents) and check for this reference and it isn't there. I'm trying to figure out how this jar is being included when it shouldn't and I thought being able to see exactly what pom files are being loaded in would help. I already tried using the dependency plug-in to list the pom files but that doesn't work. I even searched through our Archiva repository for references and couldn't find anything that could cause this. Anyone have any ideas? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Ant Mojo Resources
In order to unpack a file from a dependent artifact you can also use dependency:unpack. e.g. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack/id phaseinitialize/phase goals goalunpack/goal /goals configuration artifactItems artifactItem groupIdcom.company/groupId artifactIdartifact/artifactId version1.0-SNAPSHOT/version outputDirectory${temp.directory}/outputDirectory includesthe file you want/includes /artifactItem /artifactItems /configuration /execution /executions /plugin Unfortunately you cannot extract the files in a flat hierarchy. I used the jetspeed plugin for that. groupIdorg.apache.portals.jetspeed-2/groupId artifactIdjetspeed-unpack-maven-plugin/artifactId -Ursprüngliche Nachricht- Von: Edelson, Justin [mailto:justin.edel...@mtvstaff.com] Gesendet: Montag, 5. Oktober 2009 18:33 An: Maven Users List Betreff: RE: Ant Mojo Resources As far as I know, Windows has no facility for executing batch scripts (or anything else for that matter) which are inside a JAR file. So, what you'll need to do is copy the script to a temp directory and execute it from there. I'm not sure how you'd do this with Ant. In a Java-based Mojo, you could call getResourceAsStream() to get an InputStream and the copy the bytes to the temp file. Justin -Original Message- From: yoyomohan [mailto:chandramohan@gmail.com] Sent: Sunday, October 04, 2009 2:02 PM To: users@maven.apache.org Subject: Re: Ant Mojo Resources Hi jslinnha, I'm stuck in the same problem .pls. can you share the solution for the problem 'calling scripts from custom ant plugin jar file' only. Thanks in advance. jslinnha wrote: Hi All, I have created an Ant based plugin that need to call a windows batch file. The batch file is in the plugin projects resources folder and thus in the plugin jar. How can I access this resource path/ batch file using the exec ant task ? Thanks Jon -- View this message in context: http://www.nabble.com/Ant-Mojo-Resources-tp7011696p25740443.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - 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
AW: Reactor - skip parent project build
Actually, you can. But it is not that straightforward as you may wish. Fact 1: A profile is inherited only, when it's defined in the child pom. So you could move your plugin definition into a profile. -Give it an (profile) id -Inherit the profile in your child pom (and give it a phase) That way, it should work. I did the same with the glassfish:plugin. You can have a look here for a more detailed explanation: http://mail-archives.apache.org/mod_mbox/maven-users/200812.mbox/%3cb04c95f40812011251o5524add9h9ba3f27308edd...@mail.gmail.com%3e There will be still some duplication, so if there is a better way i would be happy to hear about it, but afaik there is not other way to deal with this problem. (When there is no default phase, you can also leave the phase besides, so the plugin should not execute too, still you will have to define the plugin in the childs, but without configuration) Hope this helps Harald. -Ursprüngliche Nachricht- Von: Brian Fox [mailto:bri...@infinity.nu] Gesendet: Donnerstag, 1. Oktober 2009 07:31 An: Maven Users List Betreff: Re: Reactor - skip parent project build You can't. The parent will always run first in a reactor before anything that inherits from it. On Wed, Sep 30, 2009 at 6:03 PM, droidin.net dr...@droidin.net wrote: I have a parent POM which defines 5 modules (5 subprojects). Since each module is executed in exactly the same way I pull profilebuild section into the parent POM to get rid of the duplicate code. Now - if I execute build individually from each module it works, however if I want to build all modules at once and move to the parent directory I got error since the very first thing Maven tries to execute is the parent project itself: mvn package -P release [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] DWD Parent project [INFO] Projects After that build fails because exec plugin tries to execute something that is not there. Looking at the output it is pretty obvious that reactor plugin is driving the build but how can I configure reactor to skip the parent? -- View this message in context: http://www.nabble.com/Reactor---skip-parent-project-build-tp25691730p25691730.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - 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
AW: AW: copy file from dependent jar
Thx all for your input! i'm currently using maven-dependency-plugin and unpack. It works perfectly, when one wants to extract a file from a dependent jar. Here's the code snipped, for those who are searching for a similar solution: Easy when you know the right plugin for the right job :). Especially because all logic is situated in parent poms (besides the special cases) - as i like it. !-- unpack xsd's of afbcommon.jar to temp, where temp is ${project.build.directory}/temp -- plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack/id phasegenerate-sources/phase goals goalunpack/goal /goals configuration artifactItems artifactItem groupIdde.afb/groupId artifactIdafbCommon/artifactId version1.0-SNAPSHOT/version outputDirectory${temp.directory}/outputDirectory includes*.xsd/includes /artifactItem /artifactItems /configuration /execution /executions /plugin That's a reasonable solution (though I'm not sure why copying to a defined location is needed, you should be able to refer to it from the dependency:unpack location). @Brett: yes indeed, that was my plan. The temp directory IS the predefined position. -Ursprüngliche Nachricht- Von: Brett Porter [mailto:br...@porterclan.net] Im Auftrag von Brett Porter Gesendet: Montag, 28. September 2009 01:29 An: Maven Users List Betreff: Re: AW: copy file from dependent jar On 25/09/2009, at 6:24 PM, Entner Harald wrote: The ant script has in my opinion a bad side effect. The structure is not allowed to change, so i would prefer to use dependencies so structure changes would have no side effects. Currently i use the maven-dependency-plugin that copies the file to a defined position and wrote a plugin that handles the extraction and the replacement. That's a reasonable solution (though I'm not sure why copying to a defined location is needed, you should be able to refer to it from the dependency:unpack location). However, the CXF codegen plugin also has an option to download the WSDL from a Maven artifact: http://cwiki.apache.org/CXF20DOC/maven-cxf-codegen-plugin-wsdl-to-java.html (at the bottom) which will work better for you. - Brett - 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
AW: copy file from dependent jar
Hi Brett, Yes, Resource1.xsd is part of Proj1. And there is a dependency between Proj3 and Proj1. Maybe i should explain it differently: I need to run wsdl2java (i use the cxf plugin for that) which needs the Resource1.xsd to be able to run correctly. Additionally some namespaces have to be adapted. So i need to extract one file from a dependent artifact, place it in a project specific directory and do some replacements. The build script (in ant) looks like this: target name=copyXSDs description=Copy XSDs to src/conf/xml-resources/ copy file=${cms.root}/Common/afbCommon/xsd/xxxGlobal.xsd todir=${xsd.dest}/ /target The ant script has in my opinion a bad side effect. The structure is not allowed to change, so i would prefer to use dependencies so structure changes would have no side effects. Currently i use the maven-dependency-plugin that copies the file to a defined position and wrote a plugin that handles the extraction and the replacement. regards, Harald -Ursprüngliche Nachricht- Von: Brett Porter [mailto:br...@porterclan.net] Im Auftrag von Brett Porter Gesendet: Freitag, 25. September 2009 03:55 An: Maven Users List Betreff: Re: copy file from dependent jar I'm a bit lost. Is Resource1 already included in Proj1 and is Proj1 a dependency of Proj3? - Brett On 24/09/2009, at 8:01 PM, Entner Harald wrote: Hello, i face the following problem. Currently i'm refactoring a project so that i can move from ant to maven. It works rather well (i have done this in my old company as well), but some special cases occur. Most of them i could fix, but one causes me a headache. This is the simple view of the project layout: Proj1 Resource1.xsd Proj2 Proj3 The thing is, that Proj3 (actually all Webservices) needs Resource1 (besides it should do some replacements on the content of Resource1.xd). So far ant copies the file using relative paths. I would really like to avoid that (it would be easy with relative paths), because it adds a lot of dependencies. (the project structure is much bigger and has a lot of subprojects, the file is needed in many places). So one solution would be to use the maven-resource-plugin and let it copy the resource (additionally it could do the replacement). Unfortunately, it only works with paths, but not with dependent projects. Or am i missing something? The solution i am thinking about is to use the dependency plugin and copy the resource first (it can handle dependent jars) and place it in a predefined-(project)-place (i think i can put it into the parent pom, and hopefully this will work under all circumstances). Then i could use the resource-plugin to do the rest and so i only have the resource plugin inside the project poms. The bad thing is that i need a second parent. Because Proj1 should not execute dependency:copy (as it is depends on itself). I could leave the phase undefined, but then i would have to add the plugin in every project pom, which i would like to avoid. I think i could live with this solution, but i m wondering if nobody had the same problem and maybe there is a better solution. Every input is appreciated. regards, Harald - 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
copy file from dependent jar
Hello, i face the following problem. Currently i'm refactoring a project so that i can move from ant to maven. It works rather well (i have done this in my old company as well), but some special cases occur. Most of them i could fix, but one causes me a headache. This is the simple view of the project layout: Proj1 Resource1.xsd Proj2 Proj3 The thing is, that Proj3 (actually all Webservices) needs Resource1 (besides it should do some replacements on the content of Resource1.xd). So far ant copies the file using relative paths. I would really like to avoid that (it would be easy with relative paths), because it adds a lot of dependencies. (the project structure is much bigger and has a lot of subprojects, the file is needed in many places). So one solution would be to use the maven-resource-plugin and let it copy the resource (additionally it could do the replacement). Unfortunately, it only works with paths, but not with dependent projects. Or am i missing something? The solution i am thinking about is to use the dependency plugin and copy the resource first (it can handle dependent jars) and place it in a predefined-(project)-place (i think i can put it into the parent pom, and hopefully this will work under all circumstances). Then i could use the resource-plugin to do the rest and so i only have the resource plugin inside the project poms. The bad thing is that i need a second parent. Because Proj1 should not execute dependency:copy (as it is depends on itself). I could leave the phase undefined, but then i would have to add the plugin in every project pom, which i would like to avoid. I think i could live with this solution, but i m wondering if nobody had the same problem and maybe there is a better solution. Every input is appreciated. regards, Harald