Re: JAX-RPC client generation in Maven2 project
Ryan de Laplante wrote: Wayne Fay wrote: On Fri, Mar 6, 2009 at 11:19 AM, Ryan de Laplante r...@ijws.com wrote: For anyone following this thread now or in the future, here is the solution I used: Ryan, you're a model citizen... I assume this will go on your blog too, right? ;-) Wayne Thank you! That is a good idea, I will blog about it too. Ryan http://www.ryandelaplante.com/rdelaplante/entry/jax_rpc_client_with_maven2 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: JAX-RPC client generation in Maven2 project
For anyone following this thread now or in the future, here is the solution I used: dependency groupIdorg.apache.axis/groupId artifactIdaxis/artifactId version1.4/version scopecompile/scope /dependency dependency groupIdorg.apache.axis/groupId artifactIdaxis-jaxrpc/artifactId version1.4/version scopecompile/scope /dependency dependency groupIdcommons-discovery/groupId artifactIdcommons-discovery/artifactId version0.4/version scopecompile/scope /dependency dependency groupIdwsdl4j/groupId artifactIdwsdl4j/artifactId version1.6.2/version scopecompile/scope /dependency plugin groupIdorg.codehaus.mojo/groupId artifactIdaxistools-maven-plugin/artifactId version1.3/version executions execution goals goalwsdl2java/goal /goals /execution /executions configuration packageSpacecom.mycompany.service.client/packageSpace sourceDirectorysrc/main/resources/META-INF/wsdl/sourceDirectory outputDirectorytarget/generated-sources/wsdl2java/outputDirectory /configuration /plugin private MyServiceSEI getMyServicePort() throws ServiceException { MyServiceLocator locator = new MyServiceLocator(); MyServiceSEI port; Stub stub; port = locator.getMyServiceSEIPort(); // OPTIONALLY configure URL and HTTP BASIC authentication stub = (Stub) port; stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, http://hostname/ContextRoot/ServicePort;); stub._setProperty(Stub.USERNAME_PROPERTY, user); stub._setProperty(Stub.PASSWORD_PROPERTY, secret); return port; } There is also a NetBeans ticket: http://www.netbeans.org/issues/show_bug.cgi?id=159404 Ryan Ryan de Laplante wrote: Hi, I'd like to add a JAX-RPC client to my JEE5 web project. I tried using NetBeans 6.7M2's web service client wizard to see what it adds to my POM, but it won't get past the first screen because it wants a JAX-RPC plugin. I already have the JAX-RPC plugin installed in NetBeans and tested that it works with a regular java web project. So, I assume it wants a Maven2 plugin in my POM. I searched google for a while and there doesn't seem to be examples of using JAX-RPC clients in a maven web project. I'm running on GlassFish V2 so don't want to use Axis, XFire, etc. I want to use the RI without bundling the runtime jars in my .war file. Can someone please point me to an example of generating JAX-RPC client stubs in a maven2 web project, and using them? Thanks, Ryan - 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: JAX-RPC client generation in Maven2 project
Wayne Fay wrote: On Fri, Mar 6, 2009 at 11:19 AM, Ryan de Laplante r...@ijws.com wrote: For anyone following this thread now or in the future, here is the solution I used: Ryan, you're a model citizen... I assume this will go on your blog too, right? ;-) Wayne Thank you! That is a good idea, I will blog about it too. Ryan - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
JAX-RPC client generation in Maven2 project
Hi, I'd like to add a JAX-RPC client to my JEE5 web project. I tried using NetBeans 6.7M2's web service client wizard to see what it adds to my POM, but it won't get past the first screen because it wants a JAX-RPC plugin. I already have the JAX-RPC plugin installed in NetBeans and tested that it works with a regular java web project. So, I assume it wants a Maven2 plugin in my POM. I searched google for a while and there doesn't seem to be examples of using JAX-RPC clients in a maven web project. I'm running on GlassFish V2 so don't want to use Axis, XFire, etc. I want to use the RI without bundling the runtime jars in my .war file. Can someone please point me to an example of generating JAX-RPC client stubs in a maven2 web project, and using them? Thanks, Ryan - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Unable to use Junit 4 annotations
Hi, My junit tests work if I prefix test method names with the word test. If I don't do that and rely on the @Test annotation then the test methods are not executed. I have this in my POM: dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.5/version scopetest/scope /dependency and in my build section I have: plugins plugin artifactIdmaven-compiler-plugin/artifactId version2.0.2/version configuration source1.5/source target1.5/target /configuration /plugin plugin artifactIdmaven-surefire-plugin/artifactId version2.4.3/version configuration includes !-- Only execute test suites -- include**/*TestSuite.java/include /includes /configuration /plugin /plugins So I am using the latest version of surefire. Any ideas why it's not using Junit 4? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to use Junit 4 annotations
Actually, it must be using JUnit 4 because I have a test suite completely configured with annotations. Also, when one of my unit tests throws an untrapped exception I see this in the stack tract: java.lang.NullPointerException at ... notice Spring Framework is doing something. My test class extends AbstractJpaTestCase at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76) at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:71) ... Notice surefire Junit4TestSet at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at So this must be a spring problem. Thanks, Ryan Ryan de Laplante wrote: Hi, My junit tests work if I prefix test method names with the word test. If I don't do that and rely on the @Test annotation then the test methods are not executed. I have this in my POM: dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.5/version scopetest/scope /dependency and in my build section I have: plugins plugin artifactIdmaven-compiler-plugin/artifactId version2.0.2/version configuration source1.5/source target1.5/target /configuration /plugin plugin artifactIdmaven-surefire-plugin/artifactId version2.4.3/version configuration includes !-- Only execute test suites -- include**/*TestSuite.java/include /includes /configuration /plugin /plugins So I am using the latest version of surefire. Any ideas why it's not using Junit 4? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to use Junit 4 annotations
It turns out I have to tell Spring that it is using JUnit 4 by annotating my class: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={file:src/test/resources/META-INF/applicationContext.xml}) public class SettingsDAOTest extends AbstractJpaTests { Before the AbstractJpaTests superclass set everything up and injected what I needed into my test class. Now all of that is gone, so I had to add the @ContextConfiguration annotation and @Autorwired to inject the DAO. Now it doesn't recognize the entity I am trying to merge with JPA. I also found out that @RunWith(SpringJUnit4ClassRunner.class) only works with Junit 4.4 and newer. But, surefire maven2 plugin causes trouble when using Junit 4.5 so you have to downgrade to 4.4: http://jira.springframework.org/browse/SPR-5145 Too much trouble. I'm going to use JUnit 3 style configs for this class so that AbstractJpaTest actually works. Ryan Ryan de Laplante wrote: Actually, it must be using JUnit 4 because I have a test suite completely configured with annotations. Also, when one of my unit tests throws an untrapped exception I see this in the stack tract: java.lang.NullPointerException at ... notice Spring Framework is doing something. My test class extends AbstractJpaTestCase at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76) at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:71) ... Notice surefire Junit4TestSet at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at So this must be a spring problem. Thanks, Ryan Ryan de Laplante wrote: Hi, My junit tests work if I prefix test method names with the word test. If I don't do that and rely on the @Test annotation then the test methods are not executed. I have this in my POM: dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.5/version scopetest/scope /dependency and in my build section I have: plugins plugin artifactIdmaven-compiler-plugin/artifactId version2.0.2/version configuration source1.5/source target1.5/target /configuration /plugin plugin artifactIdmaven-surefire-plugin/artifactId version2.4.3/version configuration includes !-- Only execute test suites -- include**/*TestSuite.java/include /includes /configuration /plugin /plugins So I am using the latest version of surefire. Any ideas why it's not using Junit 4? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to use Junit 4 annotations
For anyone finding this thread on search engines in the future, I have started a new thread on the Spring Forums: http://forum.springframework.org/showthread.php?t=60442 Ryan de Laplante wrote: It turns out I have to tell Spring that it is using JUnit 4 by annotating my class: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={file:src/test/resources/META-INF/applicationContext.xml}) public class SettingsDAOTest extends AbstractJpaTests { Before the AbstractJpaTests superclass set everything up and injected what I needed into my test class. Now all of that is gone, so I had to add the @ContextConfiguration annotation and @Autorwired to inject the DAO. Now it doesn't recognize the entity I am trying to merge with JPA. I also found out that @RunWith(SpringJUnit4ClassRunner.class) only works with Junit 4.4 and newer. But, surefire maven2 plugin causes trouble when using Junit 4.5 so you have to downgrade to 4.4: http://jira.springframework.org/browse/SPR-5145 Too much trouble. I'm going to use JUnit 3 style configs for this class so that AbstractJpaTest actually works. Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Resource filtering doesn't output to target/test-classes
Hi, I have a src/test/resources/META-INF/jdbc.properties file that is only ever used in my unit tests. There is no such file in src/main/resources/META-INF/. I've configured profiles in my POM for development (default) and continuous integration server. I've added the following to my build section: resources resource directorysrc/test/resources/META-INF/directory filteringtrue/filtering /resource /resources ...and filtering works. However, it ends up putting the filtered file in /target/classes/jdbc.properties, and copies an unfiltered version of the file to /target/test-classes/jdbc.properties How can I tell Maven2 that I want the filtered file to end up in /target/test-classes instead? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resource filtering doesn't output to target/test-classes
I found the solution: resource directorysrc/test/resources/META-INF/directory filteringtrue/filtering targetPath../test-classes/META-INF/targetPath /resource Thanks, Ryan Ryan de Laplante wrote: Hi, I have a src/test/resources/META-INF/jdbc.properties file that is only ever used in my unit tests. There is no such file in src/main/resources/META-INF/. I've configured profiles in my POM for development (default) and continuous integration server. I've added the following to my build section: resources resource directorysrc/test/resources/META-INF/directory filteringtrue/filtering /resource /resources ...and filtering works. However, it ends up putting the filtered file in /target/classes/jdbc.properties, and copies an unfiltered version of the file to /target/test-classes/jdbc.properties How can I tell Maven2 that I want the filtered file to end up in /target/test-classes instead? Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Resource filtering doesn't output to target/test-classes
Thank you, that is much cleaner Stephen Connolly wrote: Noo! try testResources testResource directorysrc/test/resources/META-INF/directory filteringtrue/filtering /testResource ... /testResources On Tue, Sep 16, 2008 at 4:58 PM, Ryan de Laplante [EMAIL PROTECTED] wrote: I found the solution: resource directorysrc/test/resources/META-INF/directory filteringtrue/filtering targetPath../test-classes/META-INF/targetPath /resource Thanks, Ryan Ryan de Laplante wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't find dependency that I know is there
Hi, I deployed an artifact into our new private Archiva repository. On our continuous build server I run mvn compile for a project that depends on that artifact. It is already configured to use the private repo. For some reason it keeps telling me that it was unable to load the dependency, but I am able to browse the repository with a web browser and download the required .jar without any problems. Any idea what the problem might be? Does having a dash in the artifactId cause problems? SomeLibrary-api Thanks, Ryan Missing: -- 1) com.mycompany.product:SomeLibrary-api:jar:1.2-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: .. Alternatively, if you host your own repository you can deploy the file there: ... Path to dependency: 1) com.mycompany.anotherproduct:AnotherProduct:war:4.0-SNAPSHOT 2) com.mycompany.product:SomeLibrary-api:jar:1.2-SNAPSHOT -- 1 required artifact is missing. for artifact: com.mycompany.anotherproduct:AnotherProduct:war:4.0-SNAPSHOT from the specified remote repositories: snapshots (https://dev.city.company.local/archiva/repository/snapshots), internal (https://dev.city.company.local/archiva/repository/internal), central (http://repo1.maven.org/maven2) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't find dependency that I know is there
Thank you. It turns out the problem was related to using https instead of http. Our SSL certificate is self signed, so Java didn't like it. It would have been nice if Maven told me that there was a problem with the SSL certificate which would have given me a clue. Thanks, Ryan Edelson, Justin wrote: FWIW, I frequently find that using an HTTP debugger like Charles helps in tracking down this type of issue. Justin - Original Message - From: Ryan de Laplante [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Sent: Tue Sep 16 13:35:16 2008 Subject: Can't find dependency that I know is there Hi, I deployed an artifact into our new private Archiva repository. On our continuous build server I run mvn compile for a project that depends on that artifact. It is already configured to use the private repo. For some reason it keeps telling me that it was unable to load the dependency, but I am able to browse the repository with a web browser and download the required .jar without any problems. Any idea what the problem might be? Does having a dash in the artifactId cause problems? SomeLibrary-api Thanks, Ryan Missing: -- 1) com.mycompany.product:SomeLibrary-api:jar:1.2-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: .. Alternatively, if you host your own repository you can deploy the file there: ... Path to dependency: 1) com.mycompany.anotherproduct:AnotherProduct:war:4.0-SNAPSHOT 2) com.mycompany.product:SomeLibrary-api:jar:1.2-SNAPSHOT -- 1 required artifact is missing. for artifact: com.mycompany.anotherproduct:AnotherProduct:war:4.0-SNAPSHOT from the specified remote repositories: snapshots (https://dev.city.company.local/archiva/repository/snapshots), internal (https://dev.city.company.local/archiva/repository/internal), central (http://repo1.maven.org/maven2) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't find dependency that I know is there
Is this where I file an issue? http://jira.codehaus.org/browse/MOJO Which component do I choose? Thanks, Ryan Wayne Fay wrote: It might not be Maven but rather the Wagon that needs fixing so it will properly report the issue with the SSL cert. Perhaps you could file an issue against the Wagon project at Codehaus about this? Wayne On Tue, Sep 16, 2008 at 10:49 AM, Ryan de Laplante [EMAIL PROTECTED] wrote: Thank you. It turns out the problem was related to using https instead of http. Our SSL certificate is self signed, so Java didn't like it. It would have been nice if Maven told me that there was a problem with the SSL certificate which would have given me a clue. Thanks, Ryan Edelson, Justin wrote: FWIW, I frequently find that using an HTTP debugger like Charles helps in tracking down this type of issue. Justin - Original Message - From: Ryan de Laplante [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Sent: Tue Sep 16 13:35:16 2008 Subject: Can't find dependency that I know is there Hi, I deployed an artifact into our new private Archiva repository. On our continuous build server I run mvn compile for a project that depends on that artifact. It is already configured to use the private repo. For some reason it keeps telling me that it was unable to load the dependency, but I am able to browse the repository with a web browser and download the required .jar without any problems. Any idea what the problem might be? Does having a dash in the artifactId cause problems? SomeLibrary-api Thanks, Ryan Missing: -- 1) com.mycompany.product:SomeLibrary-api:jar:1.2-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: .. Alternatively, if you host your own repository you can deploy the file there: ... Path to dependency: 1) com.mycompany.anotherproduct:AnotherProduct:war:4.0-SNAPSHOT 2) com.mycompany.product:SomeLibrary-api:jar:1.2-SNAPSHOT -- 1 required artifact is missing. for artifact: com.mycompany.anotherproduct:AnotherProduct:war:4.0-SNAPSHOT from the specified remote repositories: snapshots (https://dev.city.company.local/archiva/repository/snapshots), internal (https://dev.city.company.local/archiva/repository/internal), central (http://repo1.maven.org/maven2) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]