I would like to generate Kotlin classes from a given wsdl file. How can I do this using a maven plugin like jaxb2-maven-plugin or cxf-codegen-plugin?
Thanks in advance!
Related
I am thinking to use Gradle to manipulate with mysql database. It will read some files from filesystem, analyse them and populate database accordingly.
Such project will not produce any project code, because all output will go to database tables. On the other hand, gradle script should access some custom java or groovy classes to facilitate working with source data.
Is this a possible Gradle usage? Where to put gradle-accessible classes then? I don't want to have separate project, producing JAR for this project. I wan't single project, so that Gradle first compiles classes and the utilizes them in the script.
Is this possible?
Gradle is extensible, so you can utilize buildSrc for such scenarios. It works in the following way:
along build.gradle in the project there is buildSrc dir with custom build.gradle
in buildSrc/build.gradle you can define the script dependencies itself, implement plugins and tasks
finally you can apply a plugin from buildSrc to build.gradle.
It's quite handy, since e.g. IntelliJ can import such project and provide code completion for instance.
Another way is to put all the necessary stuff in build.gradle itself.
Such buildSrc project can be compiled to a jar, published and provided as a plugin, or it can be a separate project on github to be downloaded and used to manipulate data. Also, there no need to implement Plugin, you can use static methods e.g. Have a look at the demo.
In IntelliJ IDEA is there a way of creating a Spring Template Project as in Spring Source ToolSuite ? The intention over here is to get a POM file created automatically with the dependencies related to a Spring Project as in Spring Source ToolSuite. The existing way of IntelliJ IDEA is to create a Maven project and then to modify the POM file. Any information regarding this would be appreciated.
I don't know much about intelliJ, but all of the template projects are available on giyhub. There are URLs that aggregate the links to the template repositories. Take a look at these two files and the clone the project that you want to use as a template:
http://dist.springsource.com/release/STS/help/descriptors-3.0.xml
https://raw.github.com/SpringSource/spring-integration-templates/master/si-sts-templates/builds/descriptor.xml
When I use the maven axis plugin to generate java code from a given wsdl file, it tries to reach out to the internet to resolve soap, wsdl etc schemas. Is there a way to specify the xml catalog file to the plugin or to maven in general?
You could add the official Maven repository: Plugin Repositories
Or you could also add your own repository: Using the Internal Repository
How to convert a Ant project to Maven project? A sample project that would link (a Wicket project)
Thanks
The nice part of using maven is that most standard stuff works automatically once you do things the maven way. For a simple webapp:
Create a pom with groupId, artifactId and version (packaging: war)
Add the required dependencies to the pom
move the
java sources to src/main/java,
resources to src/main/resources,
webapp content to src/main/webapp,
test content to src/test/java and src/test/resources
set the compiler compliance version using the maven compiler plugin
That should get you up 'n' running.
http://www.sonatype.com/people/2009/04/how-to-convert-from-ant-to-maven-in-5-minutes/
I don't know what your ant script looks like, but assuming its a basic script for building, you will need to create a pom.xml file for your project, add your dependencies, and then build it via maven.
For anyone who lands here in future, there is an easier way to find dependencies for maven using the file hashes. So, you won't have to guess artifact versions.
As per the below article, the idea is to generate a SHA1 checksum of the dependency that you want to find the information, then do a reverse search in Nexus repository manager using that hash. For the checksum generation, you can use Microsoft's FCIV (free) utility.
https://devreads.xyz/ant-to-maven-conversion-the-painless-method/
How can I execute Pax-Runner tasks using a Maven Plugin, which I can specify in the pom.xml file?
i.e. I can do the following in command line using Pax-Runner (to convert a war file into an OSGi bundle)
pax-run war:file:C:/somefile.war warref:C:/somefile.properties
What should I do to make it happen in a pom.xml file?
Thanks in advance!
There is a maven plugin for pax. I've not used it, but according to the documentation it does what you need. On the usage page there's a section titled Using the Pax Plugin inside a POM that describes how to set up your project.