AW: How to add a dependency dynamically during the build in a plugin?
Well, if anyone has a better idea how to add JARs to the dependencies which are created by another process (and are out of Maven's control), I'm all ears :-) Basically my problem is the webstart plugin which adds JARs only from the dependencies to the WAR it creates. As I mentioned, these WARs come from another build, so I can't reach them. Best regards, Eric -Ursprüngliche Nachricht- Von: Wayne Fay [mailto:wayne...@gmail.com] Gesendet: Donnerstag, 15. Januar 2009 19:08 An: Maven Users List Betreff: Re: How to add a dependency dynamically during the build in a plugin? I just started to write my first plugin which should add some JARs dynamically to the project's dependencies. Adding dependencies dynamically during the build is generally regarded as a bad idea for various reasons. So, I don't expect that you will get much of a response to this... Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to update property value of POM.xml in a maven plugin?
Something like this: code // MyMojo.java /** * The Maven project * @parameter expression=${project} * @required */ private MavenProject project; [...] public void execute() throws MojoExecutionException { [...] project.getProperties().put(propertyAvailableHereafter, actualValue); [...] } } /code Hope this helps, c. -- Carlo Sciolla - http://www.skuro.tk Software Engineer at Sourcesense - Making sense of open Source (http://www.sourcesense.com) Linux User #372086 \|/ -(o -- I'm a punk, dude! //\ V_/_ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
A questionabout Error building POM (may not be this project's POM).
Hi all, As I build the project in Eclipse with mvn package, it is successful. But as I build it again in command prompt I got error as follow. Someone has tips? * D:\Temp\MyProjects\jboss-seam-multi\jboss-seam-warmvn package [INFO] Scanning for projects... [INFO] [INFO] Building 1.0.0-1-SNAPSHOT jboss-seam-war [INFO]task-segment: [package] [INFO] [INFO] [resources:resources] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.richfaces.ui:richfaces-ui Reason: Parent: org.richfaces:ui:jar:3.2.2.SR1 of project: org.richfaces.ui:rich faces-ui has wrong packaging: jar. Must be 'pom'. for project org.richfaces.ui:r ichfaces-ui [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 3 seconds [INFO] Finished at: Fri Jan 16 10:18:17 CET 2009 [INFO] Final Memory: 6M/12M [INFO] -- View this message in context: http://www.nabble.com/A-questionabout-%22Error-building-POM-%28may-not-be-this-project%27s-POM%29.%22-tp21495408p21495408.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
where to put DDL files in a project structure.
Hi, I´m thinking about where to put my DDL scripts in our project structure: Actually we have two projects with DDL scripts as part of a multi-module build. project-core \src\main\java \conf\ddl project-ext \src\main\java \conf\ddl When the multi-module build gets released, only the *.jars (containing *.class files) go to the mavenrepo - the \conf\ddl folders are'nt versioned. When the whole project gets delivered (in a special structure for the customer), we have a separate delivery build which references the release of the multi-module build, the releases of some other sub-modules, a documentation folder and so on. This delivery-build also references relative the \ddl folders of project-core and project-ext: plugin artifactIdmaven-antrun-plugin/artifactId executions execution idcopy/id phasepackage/phase configuration tasks copy todir=${delivery_dir}/${productVersion}/Install/DB flatten=true failonerror=true fileset dir= ../../../system/backend/project-ext/conf/ddl include name=**/*/ /fileset fileset dir= ../../../system/backend/project-core/conf/ddl include name=**/*/ exclude name=**/updatedb*/ /fileset fileset dir=../../../install/additional-db-scripts include name=**/update_db*/ /fileset /copy Now, I want to release the \conf\ddl folders too, as part of the multi-module build and pack them into project-core.zip or project-ext.zip. == Would you suggest to have 2 artifacts within one module (one *.jar artifact containing the source files and one artifact containing the DDL files) or separte the DDL files into a new sub-module (for example project-core-ddl and project-ext-ddl) ? Thanx for your advice, Torsten
Re: How to exclude a package from compile
009/1/15 Wayne Fay wayne...@gmail.com I've got a java package (along with the jar dependencies it uses) that I do not want to be added to the war file we send to our client. Also, I do not want the pom.xml to be part of the war file. I would move the code in that java package and its dependencies out of the war to its own module, so you can manage its use more effectively. Wayne You mean I should move the code from the project to it's own project? For several reason (e.g. political) I can't do that. I need a way to filter the classes from the war file. Thanks, Peter
[M2] Error getting POM for snapshots plugins
A problem is that some people in oue company have this exception : [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: com.company.maven.plugins:maven-company-build-plugin Reason: Error getting POM for 'com.company.maven.plugins:maven-company-build-plugin' from the repository: Fa iled to resolve artifact, possibly due to a repository list that is not appropriately equipped for t his artifact's metadata. com.company.maven.plugins:maven-company-build-plugin:pom:1.0.1-SNAPSHOT from the specified remote repositories: Central-mirror (http://host91:8081/nexus/content/groups/public) for project com.company.maven.plugins:maven-company-build-plugin All people use same settings.xml with pluginRepository configurated in it. This issue reproduced only on several machine. Repo from thouse machines accessible. So i don`t know what is the problem. Can anyone help me? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Using maven with eclipse
Hi Farrukh, If you're interested in development that involves the maven-eclipse-plugin, I created a series of tutorials (80+) a few months ago that cover Java development using Eclipse and Maven. The main approach using this technique is to execute maven commands on projects via Eclipse external tool configurations (so that you can click on a project and run a maven goal on that project). In this approach, Eclipse/Maven integration is very minimal (you basically let maven be maven most of the time). Topics include Eclipse user libraries, web applications, and a multi-module project. The tutorials are located at: http://www.avajava.com/tutorials/categories/maven http://www.avajava.com/tutorials/categories/maven If you're interested in tightly integrated features rather than the bare bones approach, the m2eclipse plugin is great. The ability to search for classes and automatically add a dependency to your project in Eclipse is a really fantastic feature. Deron Eriksson -- View this message in context: http://www.nabble.com/Using-maven-with-eclipse-tp21478705p21498725.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: [M2] Error getting POM for snapshots plugins
I'm not sure about the reason. However, sometimes it can help to delete the according directory in your local maven-repository, that is ${M2_REPO}/com/company/maven/plugins/maven-company-build-plugin -Ursprungliche Nachricht- Von: ress.h...@mail.ru [mailto:ress.h...@mail.ru] Gesendet: Freitag, 16. Januar 2009 11:05 An: users@maven.apache.org Betreff: [M2] Error getting POM for snapshots plugins A problem is that some people in oue company have this exception : [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: com.company.maven.plugins:maven-company-build-plugin Reason: Error getting POM for 'com.company.maven.plugins:maven-company-build-plugin' from the repository: Fa iled to resolve artifact, possibly due to a repository list that is not appropriately equipped for t his artifact's metadata. com.company.maven.plugins:maven-company-build-plugin:pom:1.0.1-SNAPSHOT from the specified remote repositories: Central-mirror (http://host91:8081/nexus/content/groups/public) for project com.company.maven.plugins:maven-company-build-plugin All people use same settings.xml with pluginRepository configurated in it. This issue reproduced only on several machine. Repo from thouse machines accessible. So i don`t know what is the problem. Can anyone help me? - 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
Maven antrun plugin and Ant replace task.
Hi, I'm trying to use the ant replace task to set a version number in my source code (yes, I know it should probably be in a properties file, but for various reasons this is what I'm stuck with). I want to set the version number just before the code is compiled, then revert it back to an empty string after compilation so that the source code remains unchanged for future builds. My problem is that the first replace appears to happen correctly, but the second doesn't. I believe the tokens to be searched for are correct (I've just swapped value token attributes from the first replace), and I've tried running the replaces independently by commenting out the other and building. When I run them individually they work correctly, but together they do not. Could there be an issue with the write from the first replace not being flushed to disk until after the second? Here's the relevant parts of my pom.xml: plugin artifactIdmaven-antrun-plugin/artifactId executions execution idset-version-in-java-file/id goals goalrun/goal /goals phasegenerate-sources/phase configuration tasks echo message=Setting product version in source code / replace file=${basedir}/src/java/.../SysInfo.java value=APPLICATION_VERSION = quot;${project.version}quot;; token=APPLICATION_VERSION = quot;quot;; / /tasks /configuration /execution /executions /plugin plugin artifactIdmaven-antrun-plugin/artifactId executions execution idrevert-version-in-java-file/id goals goalrun/goal /goals phasepackage/phase configuration tasks echo message=Removing product version from source code / replace file=${basedir}/src/java/.../SysInfo.java token=APPLICATION_VERSION = quot;${project.version}quot;; value=APPLICATION_VERSION = quot;quot;; / /tasks /configuration /execution /executions /plugin Any help would be greatly appreciated. Dave
Re: Maven antrun plugin and Ant replace task.
I think you did not use the correct solution. The Maven recommended way is to use a property file which will be loaded by your Java file(as a resource bundle for example) to get the version string. The property file should be stored in src/main/resources and will be automatically processed by Maven using the filtering option of Maven. This will prevents unnecessary Ant files to do the job. Regards Jeff MAURY On Fri, Jan 16, 2009 at 2:38 PM, David Moss mos...@googlemail.com wrote: Hi, I'm trying to use the ant replace task to set a version number in my source code (yes, I know it should probably be in a properties file, but for various reasons this is what I'm stuck with). I want to set the version number just before the code is compiled, then revert it back to an empty string after compilation so that the source code remains unchanged for future builds. My problem is that the first replace appears to happen correctly, but the second doesn't. I believe the tokens to be searched for are correct (I've just swapped value token attributes from the first replace), and I've tried running the replaces independently by commenting out the other and building. When I run them individually they work correctly, but together they do not. Could there be an issue with the write from the first replace not being flushed to disk until after the second? Here's the relevant parts of my pom.xml: plugin artifactIdmaven-antrun-plugin/artifactId executions execution idset-version-in-java-file/id goals goalrun/goal /goals phasegenerate-sources/phase configuration tasks echo message=Setting product version in source code / replace file=${basedir}/src/java/.../SysInfo.java value=APPLICATION_VERSION = quot;${project.version}quot;; token=APPLICATION_VERSION = quot;quot;; / /tasks /configuration /execution /executions /plugin plugin artifactIdmaven-antrun-plugin/artifactId executions execution idrevert-version-in-java-file/id goals goalrun/goal /goals phasepackage/phase configuration tasks echo message=Removing product version from source code / replace file=${basedir}/src/java/.../SysInfo.java token=APPLICATION_VERSION = quot;${project.version}quot;; value=APPLICATION_VERSION = quot;quot;; / /tasks /configuration /execution /executions /plugin Any help would be greatly appreciated. Dave -- La mélancolie c'est communiste Tout le monde y a droit de temps en temps La mélancolie n'est pas capitaliste C'est même gratuit pour les perdants La mélancolie c'est pacifiste On ne lui rentre jamais dedans La mélancolie oh tu sais ça existe Elle se prend même avec des gants La mélancolie c'est pour les syndicalistes Il faut juste sa carte de permanent Miossec (2006) http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.lastfm.fr/listen/user/jeffmaury/personal Mes CDs à récupérer: http://spreadsheets.google.com/ccc?key=pNeg4Doa_oCsh7CepKPaPTAhl=en
trying to get JUnit 4 to work in Eclipse and Maven
I started a project in eclipse, and I have junit 4 tests running, but now on the command line, the tests are not picked up and run. I looked in the TEST-TestSuite.xml and it does not show anything to be tested. * Here is my simple test:* public class PlaceHolderTest { PlaceHolder placeHolder; @Before public void setUp() throws Exception { placeHolder = new PlaceHolder(); } @After public void tearDown() throws Exception { } @Test public void testPlaceHolderMethod() { // Assertions without Static methods: Assert.assertEquals(1, placeHolder.placeHolderMethod(1)); } *My simple plugin:* plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration argLine-Xmx256m/argLine /configuration /plugin * And my TEST-TestSuite.xml:* *?xml version=1.0 encoding=UTF-8 ? testsuite failures=0 time=0.28 errors=0 skipped=0 tests=0 name=TestSuite properties property name=java.vendor value=Sun Microsystems Inc./ property name=localRepository value=c:/temp// property name=env.DEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.java.launcher value=SUN_STANDARD/ property name=sun.management.compiler value=HotSpot Client Compiler/ property name=env.PROMPT value=$P$G/ property name=os.name value=Windows XP/ property name=env.FP_NO_HOST_CHECK value=NO/ property name=sun.boot.class.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\resources.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\rt.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\sunrsasign.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jsse.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jce.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\charsets.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\classes/ property name=env.COMPUTERNAME value=D5400LPL/ property name=env.ALLUSERSPROFILE value=C:\Documents and Settings\All Users/ property name=sun.desktop value=windows/ property name=java.vm.specification.vendor value=Sun Microsystems Inc./ property name=java.runtime.version value=1.6.0_11-b03/ property name=env.HOMEPATH value=\Documents and Settings\733639/ property name=env.CAI_MSQ_NOWV value=y/ property name=user.name value=733639/ property name=user.language value=en/ property name=sun.boot.library.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\bin/ property name=classworlds.conf value=C:\usr\bin\maven\bin\..\bin\m2.conf/ property name=java.version value=1.6.0_11/ property name=env.PROCESSOR_IDENTIFIER value=x86 Family 15 Model 4 Stepping 1, GenuineIntel/ property name=user.timezone value=America/New_York/ property name=env.TEMP value=C:\DOCUME~1\733639\LOCALS~1\Temp/ property name=sun.arch.data.model value=32/ property name=java.endorsed.dirs value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\endorsed/ property name=env.VSEDEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.cpu.isalist value=/ property name=env.HOMEDRIVE value=C:/ property name=sun.jnu.encoding value=Cp1252/ property name=env.SDROOT value=C:\Program Files\CA\DSM\SD/ property name=file.encoding.pkg value=sun.io/ property name=file.separator value=\/ property name=java.specification.name value=Java Platform API Specification/ property name=java.class.version value=50.0/ property name=user.country value=US/ property name=java.home value=C:\usr\bin\Java\jdk1.6.0_11\jre/ property name=env.CAI_MSQ value=C:\Program Files\CA\SC\CAM/ property name=env.APPDATA value=C:\Documents and Settings\733639\Application Data/ property name=java.vm.info value=mixed mode, sharing/ property name=env.ComSpec value=C:\WINDOWS\system32\cmd.exe/ property name=env.OS value=Windows_NT/ property name=env.CommonProgramFiles value=C:\Program Files\Common Files/ property name=os.version value=5.1/ property name=path.separator value=;/ property name=java.vm.version value=11.0-b16/ property name=env.USERPROFILE value=C:\Documents and Settings\733639/ property name=user.variant value=/ property name=env.JAVA_HOME value=C:\usr\bin\Java\jdk1.6.0_11\/ property name=java.awt.printerjob value=sun.awt.windows.WPrinterJob/ property name=env.TMP value=C:\DOCUME~1\733639\LOCALS~1\Temp/ property name=sun.io.unicode.encoding value=UnicodeLittle/ property name=awt.toolkit value=sun.awt.windows.WToolkit/ property name=user.home value=C:\Documents and Settings\733639/ property name=env.SESSIONNAME value=Console/ property name=java.specification.vendor value=Sun Microsystems Inc./ property name=env.RoxioCentral value=C:\Program Files\Common Files\Roxio Shared\9.0\Roxio Central33\/ property name=env.M2_HOME value=C:\usr\bin\maven\bin\../ property
Re: trying to get JUnit 4 to work in Eclipse and Maven
My first wild guess would be that you're inadvertently using an old surefire plugin? You can run mvn -up to get the latest version of the plugin, or specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.4/version /plugin On Fri, Jan 16, 2009 at 2:53 PM, Mick Knutson mknut...@baselogic.comwrote: I started a project in eclipse, and I have junit 4 tests running, but now on the command line, the tests are not picked up and run. I looked in the TEST-TestSuite.xml and it does not show anything to be tested. * Here is my simple test:* public class PlaceHolderTest { PlaceHolder placeHolder; @Before public void setUp() throws Exception { placeHolder = new PlaceHolder(); } @After public void tearDown() throws Exception { } @Test public void testPlaceHolderMethod() { // Assertions without Static methods: Assert.assertEquals(1, placeHolder.placeHolderMethod(1)); } *My simple plugin:* plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration argLine-Xmx256m/argLine /configuration /plugin * And my TEST-TestSuite.xml:* *?xml version=1.0 encoding=UTF-8 ? testsuite failures=0 time=0.28 errors=0 skipped=0 tests=0 name=TestSuite properties property name=java.vendor value=Sun Microsystems Inc./ property name=localRepository value=c:/temp// property name=env.DEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.java.launcher value=SUN_STANDARD/ property name=sun.management.compiler value=HotSpot Client Compiler/ property name=env.PROMPT value=$P$G/ property name=os.name value=Windows XP/ property name=env.FP_NO_HOST_CHECK value=NO/ property name=sun.boot.class.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\resources.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\rt.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\sunrsasign.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jsse.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jce.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\charsets.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\classes/ property name=env.COMPUTERNAME value=D5400LPL/ property name=env.ALLUSERSPROFILE value=C:\Documents and Settings\All Users/ property name=sun.desktop value=windows/ property name=java.vm.specification.vendor value=Sun Microsystems Inc./ property name=java.runtime.version value=1.6.0_11-b03/ property name=env.HOMEPATH value=\Documents and Settings\733639/ property name=env.CAI_MSQ_NOWV value=y/ property name=user.name value=733639/ property name=user.language value=en/ property name=sun.boot.library.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\bin/ property name=classworlds.conf value=C:\usr\bin\maven\bin\..\bin\m2.conf/ property name=java.version value=1.6.0_11/ property name=env.PROCESSOR_IDENTIFIER value=x86 Family 15 Model 4 Stepping 1, GenuineIntel/ property name=user.timezone value=America/New_York/ property name=env.TEMP value=C:\DOCUME~1\733639\LOCALS~1\Temp/ property name=sun.arch.data.model value=32/ property name=java.endorsed.dirs value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\endorsed/ property name=env.VSEDEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.cpu.isalist value=/ property name=env.HOMEDRIVE value=C:/ property name=sun.jnu.encoding value=Cp1252/ property name=env.SDROOT value=C:\Program Files\CA\DSM\SD/ property name=file.encoding.pkg value=sun.io/ property name=file.separator value=\/ property name=java.specification.name value=Java Platform API Specification/ property name=java.class.version value=50.0/ property name=user.country value=US/ property name=java.home value=C:\usr\bin\Java\jdk1.6.0_11\jre/ property name=env.CAI_MSQ value=C:\Program Files\CA\SC\CAM/ property name=env.APPDATA value=C:\Documents and Settings\733639\Application Data/ property name=java.vm.info value=mixed mode, sharing/ property name=env.ComSpec value=C:\WINDOWS\system32\cmd.exe/ property name=env.OS value=Windows_NT/ property name=env.CommonProgramFiles value=C:\Program Files\Common Files/ property name=os.version value=5.1/ property name=path.separator value=;/ property name=java.vm.version value=11.0-b16/ property name=env.USERPROFILE value=C:\Documents and Settings\733639/ property name=user.variant value=/ property name=env.JAVA_HOME value=C:\usr\bin\Java\jdk1.6.0_11\/ property name=java.awt.printerjob value=sun.awt.windows.WPrinterJob/ property name=env.TMP value=C:\DOCUME~1\733639\LOCALS~1\Temp/ property name=sun.io.unicode.encoding value=UnicodeLittle/ property
SOLVED: Re: trying to get JUnit 4 to work in Eclipse and Maven
It appears, that when I include both JUnit and TestNG dependancies in my pom, no tests are run: dependency groupIdjunit/groupId artifactIdjunit/artifactId version${junit.version}/version scopetest/scope /dependency !-- dependency groupIdorg.testng/groupId artifactIdtestng/artifactId version${testng.version}/version classifierjdk15/classifier scopetest/scope /dependency -- The above worked when I commented testNG out. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Twitter: http://twitter.com/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Fri, Jan 16, 2009 at 8:53 AM, Mick Knutson mknut...@baselogic.comwrote: I started a project in eclipse, and I have junit 4 tests running, but now on the command line, the tests are not picked up and run. I looked in the TEST-TestSuite.xml and it does not show anything to be tested. * Here is my simple test:* public class PlaceHolderTest { PlaceHolder placeHolder; @Before public void setUp() throws Exception { placeHolder = new PlaceHolder(); } @After public void tearDown() throws Exception { } @Test public void testPlaceHolderMethod() { // Assertions without Static methods: Assert.assertEquals(1, placeHolder.placeHolderMethod(1)); } *My simple plugin:* plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration argLine-Xmx256m/argLine /configuration /plugin * And my TEST-TestSuite.xml:* *?xml version=1.0 encoding=UTF-8 ? testsuite failures=0 time=0.28 errors=0 skipped=0 tests=0 name=TestSuite properties property name=java.vendor value=Sun Microsystems Inc./ property name=localRepository value=c:/temp// property name=env.DEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.java.launcher value=SUN_STANDARD/ property name=sun.management.compiler value=HotSpot Client Compiler/ property name=env.PROMPT value=$P$G/ property name=os.name value=Windows XP/ property name=env.FP_NO_HOST_CHECK value=NO/ property name=sun.boot.class.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\resources.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\rt.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\sunrsasign.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jsse.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jce.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\charsets.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\classes/ property name=env.COMPUTERNAME value=D5400LPL/ property name=env.ALLUSERSPROFILE value=C:\Documents and Settings\All Users/ property name=sun.desktop value=windows/ property name=java.vm.specification.vendor value=Sun Microsystems Inc./ property name=java.runtime.version value=1.6.0_11-b03/ property name=env.HOMEPATH value=\Documents and Settings\733639/ property name=env.CAI_MSQ_NOWV value=y/ property name=user.name value=733639/ property name=user.language value=en/ property name=sun.boot.library.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\bin/ property name=classworlds.conf value=C:\usr\bin\maven\bin\..\bin\m2.conf/ property name=java.version value=1.6.0_11/ property name=env.PROCESSOR_IDENTIFIER value=x86 Family 15 Model 4 Stepping 1, GenuineIntel/ property name=user.timezone value=America/New_York/ property name=env.TEMP value=C:\DOCUME~1\733639\LOCALS~1\Temp/ property name=sun.arch.data.model value=32/ property name=java.endorsed.dirs value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\endorsed/ property name=env.VSEDEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.cpu.isalist value=/ property name=env.HOMEDRIVE value=C:/ property name=sun.jnu.encoding value=Cp1252/ property name=env.SDROOT value=C:\Program Files\CA\DSM\SD/ property name=file.encoding.pkg value=sun.io/ property name=file.separator value=\/ property name=java.specification.name value=Java Platform API Specification/ property name=java.class.version value=50.0/ property name=user.country value=US/ property name=java.home value=C:\usr\bin\Java\jdk1.6.0_11\jre/ property name=env.CAI_MSQ value=C:\Program Files\CA\SC\CAM/ property name=env.APPDATA value=C:\Documents and Settings\733639\Application Data/ property name=java.vm.info value=mixed mode, sharing/ property name=env.ComSpec value=C:\WINDOWS\system32\cmd.exe/ property name=env.OS
Re: trying to get JUnit 4 to work in Eclipse and Maven
I tried with no version, then 2.4.3 I did not try 2.4. But the solution was to use either JUnit 4 or TestNG 5.8, not both. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Twitter: http://twitter.com/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Fri, Jan 16, 2009 at 9:03 AM, Rogier Peters rogier.pet...@gmail.comwrote: My first wild guess would be that you're inadvertently using an old surefire plugin? You can run mvn -up to get the latest version of the plugin, or specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.4/version /plugin On Fri, Jan 16, 2009 at 2:53 PM, Mick Knutson mknut...@baselogic.com wrote: I started a project in eclipse, and I have junit 4 tests running, but now on the command line, the tests are not picked up and run. I looked in the TEST-TestSuite.xml and it does not show anything to be tested. * Here is my simple test:* public class PlaceHolderTest { PlaceHolder placeHolder; @Before public void setUp() throws Exception { placeHolder = new PlaceHolder(); } @After public void tearDown() throws Exception { } @Test public void testPlaceHolderMethod() { // Assertions without Static methods: Assert.assertEquals(1, placeHolder.placeHolderMethod(1)); } *My simple plugin:* plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration argLine-Xmx256m/argLine /configuration /plugin * And my TEST-TestSuite.xml:* *?xml version=1.0 encoding=UTF-8 ? testsuite failures=0 time=0.28 errors=0 skipped=0 tests=0 name=TestSuite properties property name=java.vendor value=Sun Microsystems Inc./ property name=localRepository value=c:/temp// property name=env.DEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.java.launcher value=SUN_STANDARD/ property name=sun.management.compiler value=HotSpot Client Compiler/ property name=env.PROMPT value=$P$G/ property name=os.name value=Windows XP/ property name=env.FP_NO_HOST_CHECK value=NO/ property name=sun.boot.class.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\resources.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\rt.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\sunrsasign.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jsse.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\jce.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\lib\charsets.jar;C:\usr\bin\Java\jdk1.6.0_11\jre\classes/ property name=env.COMPUTERNAME value=D5400LPL/ property name=env.ALLUSERSPROFILE value=C:\Documents and Settings\All Users/ property name=sun.desktop value=windows/ property name=java.vm.specification.vendor value=Sun Microsystems Inc./ property name=java.runtime.version value=1.6.0_11-b03/ property name=env.HOMEPATH value=\Documents and Settings\733639/ property name=env.CAI_MSQ_NOWV value=y/ property name=user.name value=733639/ property name=user.language value=en/ property name=sun.boot.library.path value=C:\usr\bin\Java\jdk1.6.0_11\jre\bin/ property name=classworlds.conf value=C:\usr\bin\maven\bin\..\bin\m2.conf/ property name=java.version value=1.6.0_11/ property name=env.PROCESSOR_IDENTIFIER value=x86 Family 15 Model 4 Stepping 1, GenuineIntel/ property name=user.timezone value=America/New_York/ property name=env.TEMP value=C:\DOCUME~1\733639\LOCALS~1\Temp/ property name=sun.arch.data.model value=32/ property name=java.endorsed.dirs value=C:\usr\bin\Java\jdk1.6.0_11\jre\lib\endorsed/ property name=env.VSEDEFLOGDIR value=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection/ property name=sun.cpu.isalist value=/ property name=env.HOMEDRIVE value=C:/ property name=sun.jnu.encoding value=Cp1252/ property name=env.SDROOT value=C:\Program Files\CA\DSM\SD/ property name=file.encoding.pkg value=sun.io/ property name=file.separator value=\/ property name=java.specification.name value=Java Platform API Specification/ property name=java.class.version value=50.0/ property name=user.country value=US/ property name=java.home value=C:\usr\bin\Java\jdk1.6.0_11\jre/ property name=env.CAI_MSQ value=C:\Program Files\CA\SC\CAM/ property name=env.APPDATA value=C:\Documents and Settings\733639\Application Data/ property name=java.vm.info value=mixed mode, sharing/ property name=env.ComSpec value=C:\WINDOWS\system32\cmd.exe/
Re: How to update property value of POM.xml in a maven plugin?
2009/1/16 Carlo Sciolla carlo.scio...@gmail.com Something like this: code // MyMojo.java /** * The Maven project * @parameter expression=${project} * @required */ private MavenProject project; [...] public void execute() throws MojoExecutionException { [...] project.getProperties().put(propertyAvailableHereafter, actualValue); [...] } } /code But note that this property will only be available to phases after your mojo has executed This can cause fun if you want to use the property value in the pom in an expression that is used when the initial model is being constructed (i.e. you cannot use the property in /project/artifactId, etc) Hope this helps, c. -- Carlo Sciolla - http://www.skuro.tk Software Engineer at Sourcesense - Making sense of open Source (http://www.sourcesense.com) Linux User #372086 \|/ -(o -- I'm a punk, dude! //\ V_/_ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven antrun plugin and Ant replace task.
Thanks for the quick reply Jeff. You're right, but changing this now would mean breaking a legacy build system that I'm trying to replace, and need (for the time being at least) to maintain compatibility with. As I said in my first post: (yes, I know it should probably be in a properties file, but for various reasons this is what I'm stuck with) Thanks again for the reply - any other ideas would be greatly appreciated.
Re: Maven EAR Plugin ContextRoot
On Thu, Jan 15, 2009 at 3:43 PM, Wayne Fay wayne...@gmail.com wrote: For now I've worked around the issue by using the applicationXml configuration to point to my own application.xml with the context-root being set, instead of using the generated one. I'd still like to know if this is just broken for everyone, or if there's something I'm missing so I can decide how to file a bug. Take a look at the source code: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/WebModule.java?revision=728546view=markup If I were you, I'd debug that class/method in an IDE or add some System.out's to see what's going on during the execution of the code. (This assumes you pull down the entire plugin and rebuild it with a new version eg 2.3.99 which you'd build and install locally, and then specify it in your pom.xml file -- make sure you delete it later!) Without doing that, I'm not sure if there's a bug here or not. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org I don't see anything in the source code that looks like it gets the contextRoot from the configuration. The one method that mentions it 1) checks for null, and then sets it to the default if it's still null, even though the constructor initializes it the default, 2) that method (resolveArtifact) is never called. I don't really understand how nested configuration elements like this are supposed to be set. I'd be willing to try to debug the issue further if I knew where to start. -- Stephen Duncan Jr www.stephenduncanjr.com
Re: where to put DDL files in a project structure.
how about src/main/ddl ? 2009/1/16 torsten.reinh...@gi-de.com Hi, I´m thinking about where to put my DDL scripts in our project structure: Actually we have two projects with DDL scripts as part of a multi-module build. project-core \src\main\java \conf\ddl project-ext \src\main\java \conf\ddl When the multi-module build gets released, only the *.jars (containing *.class files) go to the mavenrepo - the \conf\ddl folders are'nt versioned. When the whole project gets delivered (in a special structure for the customer), we have a separate delivery build which references the release of the multi-module build, the releases of some other sub-modules, a documentation folder and so on. This delivery-build also references relative the \ddl folders of project-core and project-ext: plugin artifactIdmaven-antrun-plugin/artifactId executions execution idcopy/id phasepackage/phase configuration tasks copy todir=${delivery_dir}/${productVersion}/Install/DB flatten=true failonerror=true fileset dir= ../../../system/backend/project-ext/conf/ddl include name=**/*/ /fileset fileset dir= ../../../system/backend/project-core/conf/ddl include name=**/*/ exclude name=**/updatedb*/ /fileset fileset dir=../../../install/additional-db-scripts include name=**/update_db*/ /fileset /copy Now, I want to release the \conf\ddl folders too, as part of the multi-module build and pack them into project-core.zip or project-ext.zip. == Would you suggest to have 2 artifacts within one module (one *.jar artifact containing the source files and one artifact containing the DDL files) or separte the DDL files into a new sub-module (for example project-core-ddl and project-ext-ddl) ? Thanx for your advice, Torsten
Antwort: Re: where to put DDL files in a project structure.
and then? My problem is, that I need to put the ddl scripts into an artifact (*.zip or *.jar) just for expand them later on into a delivery structure. The delivery structure is generated by a delivery pom.xml with all dependencies to releases artifacts that will go into the delivery. the ddl scripts are actually a part of the directory structure of a jar build module. I could now a) put the ddl scripts into the *.jar (where they are not used) and extract them later on into the delivery directory structure b) put the ddl scripts into a new *.zip file which will be created during the existing *.jar module build (than i have two artifacts within one module) c) put the ddl scripts into a new *.zip file which will be created during the build of a new *.zip module build. or with other words: I don´t want the size of my jar files to grow because a lot of DDL scripts are packaged into them I don`t want to ignore the Maven policy one artifact within one module So - what´s best practice? How do others package and deliver their DDL files? thanx, Torsten Stephen Connolly stephen.alan.conno...@gmail.com 16.01.2009 15:47 Bitte antworten an Maven Users List users@maven.apache.org An Maven Users List users@maven.apache.org Kopie Thema Re: where to put DDL files in a project structure. how about src/main/ddl ? 2009/1/16 torsten.reinh...@gi-de.com Hi, I´m thinking about where to put my DDL scripts in our project structure: Actually we have two projects with DDL scripts as part of a multi-module build. project-core \src\main\java \conf\ddl project-ext \src\main\java \conf\ddl When the multi-module build gets released, only the *.jars (containing *.class files) go to the mavenrepo - the \conf\ddl folders are'nt versioned. When the whole project gets delivered (in a special structure for the customer), we have a separate delivery build which references the release of the multi-module build, the releases of some other sub-modules, a documentation folder and so on. This delivery-build also references relative the \ddl folders of project-core and project-ext: plugin artifactIdmaven-antrun-plugin/artifactId executions execution idcopy/id phasepackage/phase configuration tasks copy todir=${delivery_dir}/${productVersion}/Install/DB flatten=true failonerror=true fileset dir= ../../../system/backend/project-ext/conf/ddl include name=**/*/ /fileset fileset dir= ../../../system/backend/project-core/conf/ddl include name=**/*/ exclude name=**/updatedb*/ /fileset fileset dir=../../../install/additional-db-scripts include name=**/update_db*/ /fileset /copy Now, I want to release the \conf\ddl folders too, as part of the multi-module build and pack them into project-core.zip or project-ext.zip. == Would you suggest to have 2 artifacts within one module (one *.jar artifact containing the source files and one artifact containing the DDL files) or separte the DDL files into a new sub-module (for example project-core-ddl and project-ext-ddl) ? Thanx for your advice, Torsten
Re: Re: where to put DDL files in a project structure.
On Fri, Jan 16, 2009 at 9:24 AM, torsten.reinh...@gi-de.com wrote: I don´t want the size of my jar files to grow because a lot of DDL scripts are packaged into them I don`t want to ignore the Maven policy one artifact within one module However, these artifacts are attachments, which in Maven means they are derivative works based on some aspect of the main project build. ... Attached artifacts are allowed to circumvent the Maven requirement of one project, one artifact precisely because of this derivative quality. http://books.sonatype.com/maven-book/reference/assemblies-sect-as-depend.html Would attached artifacts solve your problem or do you need to accomplish something else? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Use of profiles
On Jan 15, 2009, at 7:09 AM, Eric Rotick wrote: So, the first question is, is this use of profiles correct? I can see that primary purpose of profiles is to set up, well profiles, of different scenarios for the build. In this respect the use of profiles for specific tests falls loosely into this category. However, the use of profiles to perform a kind of macro or script does not seem correct. This sounds like the same question I had in this thread: http://mail-archives.apache.org/mod_mbox/maven-users/200812.mbox/%3c9bbf0d0d-1db8-4e6d-8bb0-fb8d0939c...@vocaro.com%3e The ideal solution is to write your own custom test plugin, mytest or whatever. You can then invoke it directly, like this: mvn mytest:test1 mvn mytest:test2 ... Or you can bind it to a phase and have it run automatically. Of course, writing your own plugin involves extra work and maintenance, so as an alternative you can simply put your test invocation code into a profile and simply enable that profile as needed. This is not kosher, as you point out, but it's an acceptable workaround for test scenarios. At least, this is my conclusion based on the responses in the thread. Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven jetty problem
Hi all I am using maven 2.0.9, when i try to execute any command of maven(mvn, mvn -Prun, mvn package) i got this message {Listening for transport dt_socket at address: 4000} and nothing else. Firstly i think that jetty is running yet, but it is not. And now I can't run eny maven command. What can I do, to fix this proble. Regards Harroot. -- View this message in context: http://www.nabble.com/maven-jetty-problem-tp21502964p21502964.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
Unable to build a maven project ufter updating JMS to 1.1
All, I changed a jms dependency on my Project parent pom to have version 1.1 instead of 1.0.2 I manually uploaded its jar file to Artifactory. My question is: When I build my app using maven 2 it tries to download the jms file from http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar instead of my own repo? I ran a mvn help-effective-settings -Pacp command and all my repo URLs are correct.. I get this error: D:\acpwork\cruise\checkout\branch\modules\common-trilogymvn install -Pacp [INFO] Scanning for projects... WAGON_VERSION: 1.0-beta-2 [INFO] [INFO] Building octanner common trilogy module [INFO]task-segment: [install] [INFO] [INFO] [buildnumber:create {execution: default}] [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] Storing buildNumber: 25845 at timestamp: 1231785672571 [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) javax.jms:jms:jar:1.1 Try downloading the file manually from: http://java.sun.com/products/jms/docs.html Then, install it using the command: mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) com.octanner:common-trilogy:jar:8.12 2) com.octanner:i18n:jar:8.12 3) com.octanner:domainmodel:jar:8.12 4) com.octanner:common:jar:8.12 5) javax.jms:jms:jar:1.1 -- 1 required artifact is missing. for artifact: com.octanner:common-trilogy:jar:8.12 from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 8 seconds [INFO] Finished at: Mon Jan 12 11:41:15 MST 2009 [INFO] Final Memory: 11M/21M [INFO] D:\acpwork\cruise\checkout\branch\modules\common-trilogy Any help would be greatly appreciate it. -- View this message in context: http://www.nabble.com/Unable-to-build-a-maven-project-ufter-updating-JMS-to-1.1-tp21503052p21503052.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
Re: Unable to build a maven project ufter updating JMS to 1.1
I forgot to mention that I am unable to build the project from the build server, but if I run it from any other computer checking out the same project from svn it would work. edgarosy wrote: All, I changed a jms dependency on my Project parent pom to have version 1.1 instead of 1.0.2 I manually uploaded its jar file to Artifactory. My question is: When I build my app using maven 2 it tries to download the jms file from http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar instead of my own repo? I ran a mvn help-effective-settings -Pacp command and all my repo URLs are correct.. I get this error: D:\acpwork\cruise\checkout\branch\modules\common-trilogymvn install -Pacp [INFO] Scanning for projects... WAGON_VERSION: 1.0-beta-2 [INFO] [INFO] Building octanner common trilogy module [INFO]task-segment: [install] [INFO] [INFO] [buildnumber:create {execution: default}] [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] Storing buildNumber: 25845 at timestamp: 1231785672571 [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) javax.jms:jms:jar:1.1 Try downloading the file manually from: http://java.sun.com/products/jms/docs.html Then, install it using the command: mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) com.octanner:common-trilogy:jar:8.12 2) com.octanner:i18n:jar:8.12 3) com.octanner:domainmodel:jar:8.12 4) com.octanner:common:jar:8.12 5) javax.jms:jms:jar:1.1 -- 1 required artifact is missing. for artifact: com.octanner:common-trilogy:jar:8.12 from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 8 seconds [INFO] Finished at: Mon Jan 12 11:41:15 MST 2009 [INFO] Final Memory: 11M/21M [INFO] D:\acpwork\cruise\checkout\branch\modules\common-trilogy Any help would be greatly appreciate it. -- View this message in context: http://www.nabble.com/Unable-to-build-a-maven-project-ufter-updating-JMS-to-1.1-tp21503052p21503101.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
Re: Unable to build a maven project ufter updating JMS to 1.1
If you wipe out (or just temporarily rename) the local repository, where will it download the artifacts from? In fact, isn't it possible you might have been using your local repository instead of ever using your maven repository manager installation? I myself regularly completely wipe out my local repository to check my builds are not dependent to some local particularity (note I'm in the support team, so I want to be the first to encounter such problem. You might not want to investigate this if it's not your day job...). My 2 cents. Cheers. 2009/1/16 edgarosy edgar.l...@gmail.com I forgot to mention that I am unable to build the project from the build server, but if I run it from any other computer checking out the same project from svn it would work. edgarosy wrote: All, I changed a jms dependency on my Project parent pom to have version 1.1 instead of 1.0.2 I manually uploaded its jar file to Artifactory. My question is: When I build my app using maven 2 it tries to download the jms file from http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar instead of my own repo? I ran a mvn help-effective-settings -Pacp command and all my repo URLs are correct.. I get this error: D:\acpwork\cruise\checkout\branch\modules\common-trilogymvn install -Pacp [INFO] Scanning for projects... WAGON_VERSION: 1.0-beta-2 [INFO] [INFO] Building octanner common trilogy module [INFO]task-segment: [install] [INFO] [INFO] [buildnumber:create {execution: default}] [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] Storing buildNumber: 25845 at timestamp: 1231785672571 [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) javax.jms:jms:jar:1.1 Try downloading the file manually from: http://java.sun.com/products/jms/docs.html Then, install it using the command: mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) com.octanner:common-trilogy:jar:8.12 2) com.octanner:i18n:jar:8.12 3) com.octanner:domainmodel:jar:8.12 4) com.octanner:common:jar:8.12 5) javax.jms:jms:jar:1.1 -- 1 required artifact is missing. for artifact: com.octanner:common-trilogy:jar:8.12 from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 8 seconds [INFO] Finished at: Mon Jan 12 11:41:15 MST 2009 [INFO] Final Memory: 11M/21M [INFO] D:\acpwork\cruise\checkout\branch\modules\common-trilogy Any help would be greatly appreciate it. -- View this message in context: http://www.nabble.com/Unable-to-build-a-maven-project-ufter-updating-JMS-to-1.1-tp21503052p21503101.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 -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
Re: Unable to build a maven project ufter updating JMS to 1.1
On Fri, Jan 16, 2009 at 9:28 AM, edgarosy edgar.l...@gmail.com wrote: I forgot to mention that I am unable to build the project from the build server, but if I run it from any other computer checking out the same project from svn it would work. How do you have _your_ computer configured to use your internal repo? Check that the same configuration is present on the build server. In my case, I have internal corporate repositories and mirrors in $M2_HOME/conf/settings.xml, and all developers use the same Maven distribution. Yours might be in ~/.m2/settings.xml instead. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Re: where to put DDL files in a project structure.
2009/1/16 torsten.reinh...@gi-de.com and then? My problem is, that I need to put the ddl scripts into an artifact (*.zip or *.jar) just for expand them later on into a delivery structure. The delivery structure is generated by a delivery pom.xml with all dependencies to releases artifacts that will go into the delivery. Then just add that folder as a resource and they'll get added to the jar... the ddl scripts are actually a part of the directory structure of a jar build module. I could now a) put the ddl scripts into the *.jar (where they are not used) and extract them later on into the delivery directory structure b) put the ddl scripts into a new *.zip file which will be created during the existing *.jar module build (than i have two artifacts within one module) c) put the ddl scripts into a new *.zip file which will be created during the build of a new *.zip module build. or with other words: I don´t want the size of my jar files to grow because a lot of DDL scripts are packaged into them I don`t want to ignore the Maven policy one artifact within one module So - what´s best practice? How do others package and deliver their DDL files? thanx, Torsten Stephen Connolly stephen.alan.conno...@gmail.com 16.01.2009 15:47 Bitte antworten an Maven Users List users@maven.apache.org An Maven Users List users@maven.apache.org Kopie Thema Re: where to put DDL files in a project structure. how about src/main/ddl ? 2009/1/16 torsten.reinh...@gi-de.com Hi, I´m thinking about where to put my DDL scripts in our project structure: Actually we have two projects with DDL scripts as part of a multi-module build. project-core \src\main\java \conf\ddl project-ext \src\main\java \conf\ddl When the multi-module build gets released, only the *.jars (containing *.class files) go to the mavenrepo - the \conf\ddl folders are'nt versioned. When the whole project gets delivered (in a special structure for the customer), we have a separate delivery build which references the release of the multi-module build, the releases of some other sub-modules, a documentation folder and so on. This delivery-build also references relative the \ddl folders of project-core and project-ext: plugin artifactIdmaven-antrun-plugin/artifactId executions execution idcopy/id phasepackage/phase configuration tasks copy todir=${delivery_dir}/${productVersion}/Install/DB flatten=true failonerror=true fileset dir= ../../../system/backend/project-ext/conf/ddl include name=**/*/ /fileset fileset dir= ../../../system/backend/project-core/conf/ddl include name=**/*/ exclude name=**/updatedb*/ /fileset fileset dir=../../../install/additional-db-scripts include name=**/update_db*/ /fileset /copy Now, I want to release the \conf\ddl folders too, as part of the multi-module build and pack them into project-core.zip or project-ext.zip. == Would you suggest to have 2 artifacts within one module (one *.jar artifact containing the source files and one artifact containing the DDL files) or separte the DDL files into a new sub-module (for example project-core-ddl and project-ext-ddl) ? Thanx for your advice, Torsten
Re: Unable to build a maven project ufter updating JMS to 1.1
Thanks Baptiste MATHUS-4 wrote: If you wipe out (or just temporarily rename) the local repository, where will it download the artifacts from? In fact, isn't it possible you might have been using your local repository instead of ever using your maven repository manager installation? I myself regularly completely wipe out my local repository to check my builds are not dependent to some local particularity (note I'm in the support team, so I want to be the first to encounter such problem. You might not want to investigate this if it's not your day job...). My 2 cents. Cheers. 2009/1/16 edgarosy edgar.l...@gmail.com I forgot to mention that I am unable to build the project from the build server, but if I run it from any other computer checking out the same project from svn it would work. edgarosy wrote: All, I changed a jms dependency on my Project parent pom to have version 1.1 instead of 1.0.2 I manually uploaded its jar file to Artifactory. My question is: When I build my app using maven 2 it tries to download the jms file from http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar instead of my own repo? I ran a mvn help-effective-settings -Pacp command and all my repo URLs are correct.. I get this error: D:\acpwork\cruise\checkout\branch\modules\common-trilogymvn install -Pacp [INFO] Scanning for projects... WAGON_VERSION: 1.0-beta-2 [INFO] [INFO] Building octanner common trilogy module [INFO]task-segment: [install] [INFO] [INFO] [buildnumber:create {execution: default}] [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] Storing buildNumber: 25845 at timestamp: 1231785672571 [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. Downloading: http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) javax.jms:jms:jar:1.1 Try downloading the file manually from: http://java.sun.com/products/jms/docs.html Then, install it using the command: mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) com.octanner:common-trilogy:jar:8.12 2) com.octanner:i18n:jar:8.12 3) com.octanner:domainmodel:jar:8.12 4) com.octanner:common:jar:8.12 5) javax.jms:jms:jar:1.1 -- 1 required artifact is missing. for artifact: com.octanner:common-trilogy:jar:8.12 from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 8 seconds [INFO] Finished at: Mon Jan 12 11:41:15 MST 2009 [INFO] Final Memory: 11M/21M [INFO] D:\acpwork\cruise\checkout\branch\modules\common-trilogy Any help would be greatly appreciate it. -- View this message in context: http://www.nabble.com/Unable-to-build-a-maven-project-ufter-updating-JMS-to-1.1-tp21503052p21503101.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 -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor ! -- View this message in context: http://www.nabble.com/Unable-to-build-a-maven-project-ufter-updating-JMS-to-1.1-tp21503052p21503684.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
values to not be replaced in archetype
In my site.xml for the project I am creating an archetype against, there is the xml header: ?xml version=1.0 encoding=ISO-8859-1? Then in the archetype, the site.xml has: #set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) ?xml version=${version} encoding=ISO-8859-1? when I did not want the creation of the archetype to touch that file. I can always manually update the generated files, but was hoping there is some way to exclude certain files from this process? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Twitter: http://twitter.com/mickknutson Vacation Rental: http://tahoe.baselogic.com ---
Re: Use of profiles
I had started to read your thread before I posted but it seemed to move towards something to do with Docbook so I didn't read it fully. Now I've re-read it I can see there are similarities. I'd like to think my requirements are closer to the Maven way since testing is part of Maven and the database setup is part of the profile for testing. My requirement was simply to allow for common sections to be collected together to enhance the maintainability of the pom. Currently the verbose nature of the pom makes it far too easy to have subtle differences that ruin the test. However, what we do have is still excellent and I wouldn't want to lose that power which Maven brings. OK there may be alternatives but Maven is pretty much the de facto standard and it would be foolish to move away from that. There was a post which made reference to the ability to run an ant task within Maven but outside of the lifecycle. The may provide what we are looking for. Thanks for making me re-read the thread. Eric. On Fri, Jan 16, 2009 at 4:10 PM, Trevor Harmon tre...@vocaro.com wrote: On Jan 15, 2009, at 7:09 AM, Eric Rotick wrote: So, the first question is, is this use of profiles correct? I can see that primary purpose of profiles is to set up, well profiles, of different scenarios for the build. In this respect the use of profiles for specific tests falls loosely into this category. However, the use of profiles to perform a kind of macro or script does not seem correct. This sounds like the same question I had in this thread: http://mail-archives.apache.org/mod_mbox/maven-users/200812.mbox/%3c9bbf0d0d-1db8-4e6d-8bb0-fb8d0939c...@vocaro.com%3e The ideal solution is to write your own custom test plugin, mytest or whatever. You can then invoke it directly, like this: mvn mytest:test1 mvn mytest:test2 ... Or you can bind it to a phase and have it run automatically. Of course, writing your own plugin involves extra work and maintenance, so as an alternative you can simply put your test invocation code into a profile and simply enable that profile as needed. This is not kosher, as you point out, but it's an acceptable workaround for test scenarios. At least, this is my conclusion based on the responses in the thread. Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
apache-maven-2.0.9-bin.zip corrupt
The ZIP distribution of 2.0.9 appears to be corrupt. WinZip 11 refused to open it on two different computers. I opened and installed the 2.0.7 distribution package from the archives with no problem. Eric
Re: apache-maven-2.0.9-bin.zip corrupt
The ZIP distribution of 2.0.9 appears to be corrupt. WinZip 11 refused to open it on two different computers. Which mirror did you download it from -- do you remember? It is more likely that one (or more) mirror is bad rather than assuming the entire zip distribution is corrupt. I know that I have had zero issues downloading and unzipping it myself, and I'm sure that I'm not the only one. And I just downloaded it again from the GATech mirror and had no issues with it. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: apache-maven-2.0.9-bin.zip corrupt
Nvmd. I had downloaded the mirror list page, which is confusingly named the same as the ZIP file. Fixed. Thanks. Eric From: Wayne Fay wayne...@gmail.com To: Maven Users List users@maven.apache.org Sent: Friday, January 16, 2009 3:38:55 PM Subject: Re: apache-maven-2.0.9-bin.zip corrupt The ZIP distribution of 2.0.9 appears to be corrupt. WinZip 11 refused to open it on two different computers. Which mirror did you download it from -- do you remember? It is more likely that one (or more) mirror is bad rather than assuming the entire zip distribution is corrupt. I know that I have had zero issues downloading and unzipping it myself, and I'm sure that I'm not the only one. And I just downloaded it again from the GATech mirror and had no issues with it. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven jetty problem
Hi Harroot, Am 16.01.2009 um 17:22 schrieb Harroot: Hi all I am using maven 2.0.9, when i try to execute any command of maven(mvn, mvn -Prun, mvn package) i got this message {Listening for transport dt_socket at address: 4000} and nothing else. Firstly i think that jetty is running yet, but it is not. And now I can't run eny maven command. What can I do, to fix this proble. IMO this is a little OT, but anyway... I'm no expert in maven but this sounds pretty much like a plain java problem. My guess would be you have either modified your maven start script or have set an environment variable which is used by the scripts' call of the JVM, like $MAVEN_OPTS in my version. By any chance, did you ever debug a JVM remotely via port 4000? This message is usually produced by the JVM when it's configured to wait with the execution of the entry point (main(String[]...) for a remote debugger to connect. Cheers, -Ralf Regards Harroot. -- View this message in context: http://www.nabble.com/maven-jetty-problem-tp21502964p21502964.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
Re: maven jetty problem
Hi Ralf, Thank's for your reply:), before your mail I remember that I was debuging shindig via eclipse end set MAVEN_OPTS to listen 4000 port, so I fix that problem, enyway thank's for your answer:) Best regards Harroot. Ralf Fischer-2 wrote: Hi Harroot, Am 16.01.2009 um 17:22 schrieb Harroot: Hi all I am using maven 2.0.9, when i try to execute any command of maven(mvn, mvn -Prun, mvn package) i got this message {Listening for transport dt_socket at address: 4000} and nothing else. Firstly i think that jetty is running yet, but it is not. And now I can't run eny maven command. What can I do, to fix this proble. IMO this is a little OT, but anyway... I'm no expert in maven but this sounds pretty much like a plain java problem. My guess would be you have either modified your maven start script or have set an environment variable which is used by the scripts' call of the JVM, like $MAVEN_OPTS in my version. By any chance, did you ever debug a JVM remotely via port 4000? This message is usually produced by the JVM when it's configured to wait with the execution of the entry point (main(String[]...) for a remote debugger to connect. Cheers, -Ralf Regards Harroot. -- View this message in context: http://www.nabble.com/maven-jetty-problem-tp21502964p21502964.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 -- View this message in context: http://www.nabble.com/maven-jetty-problem-tp21502964p21513554.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