I have cloned the restlet codebase from github and I am working on 2.2 branch. However I am not able to build the modules as it doesn't have pom.xml in any of the module.
I have previously worked with restlet 2.1 branch wherein I was able to compile the modules without any problem.
How do I build modules ? Can I just copy the pom.xml from 2.1 branch or is there any specific process for 2.2
It's actually built with ant from the build sub-folder
https://github.com/restlet/restlet-framework-java/tree/2.2/build
Related
I created simple grails 3.0 applications using commands below:
create-app admin --profile=web
create-plugin core --profile=plugin
Now, I wanted to use core as an inline plugin in admin build, which is a web application.
We can easily do that in grails version < 3.0 in buildconfig. Where can I do that in grails 3.0. Every help is worth appreciated.
Recently I used an inline plugin in my grails 3 application. here is how I did it-
Make sure that your application and your plugin are on same parent directory.
Now go to build.gradle file of your application.
Add this line in dependencies:
compile project(':plugin_name')
Now go to settings.gradle file on your application and append these lines:
include 'plugin_name'
project(':plugin_name').projectDir = new File('absolute_path_of_pluin')
Inplace plugins have been replaced by multi project Gradle builds. See the Grails 3 functional test suite for an example https://github.com/grails/grails3-functional-tests
I am new to Maven and using it to build a project on my local. This is working nicely on my local. Now, I want to run the same project on my server and the server does not have Maven installed. So I wanted to ask if there is any way by which, when I build a Maven project on my local, I could include all the required jars in it and then simply transfer it to my server? I know Maven creates the repository in C:\Documents and Settings\username\.m2 on Windows.
But how can I include all the jars in project the way we do traditionally? I saw this question. But it talks about creating a custom repository and I don't have Maven installed at all. so I guess it is not a suitable solution to me.
Thanks.
You can use the Maven Assembly Plugin. From the documentation:
The Assembly Plugin for Maven is primarily intended to allow users to aggregate the project output along with its dependencies, modules, site documentation, and other files into a single distributable archive.
I'm trying to build a war file to be deployed to a tomcat server using Maven, but have noticed some strange behaviour when building my war file:
When running the command from project folder: mvn clean compile package -DskipTests
Maven version 3.0 produces a war file
12.079MB (49 jar files in WEB-INF/lib folder)
Maven version 3.0 beta1
produces a war file 8.7MB (31 jar
files in WEB-INF/lib folder)
Maven version 2.11 produces a war file 2.3MB (3 jar files in WEB-INF/lib folder)
What can be causing the extra jar files to be included in the project? Presumably they are not needed as building the project using version 2.11 has worked fine in the past.
I had something similar happen to me. Here's what happened.
In Maven 2.x the plugin versions are set by Maven itself. In Maven 3.x it will use the "latest" and give you a warning. In my case, using a later version of the compiler plugin caused some differences and a later version of the dependency plugin cause other differences.
Once I explicitly set all the versions of all plugins in my pom.xml (a best practice anyway), the inconsistencies went away.
Is there a way to use the ivy cache grails dependency DSL creates within an IDE like eclipse or netbeans? Or must I manually add all dependencies to the IDE lib folder?
I've looked into plugins like ivybeans and ivyde, but they seem to require ivy.xml and ivysettings.xml files, which grails does not produce.
The Grails tooling provided by the SpringSource Tool Suite plugin for Eclipse has the functionality you desire. It reads BuildConfig.groovy and modifies the project classpath accordingly.
I just attached the following to the Jira bug.
In snooping around the STS distribution, I found the following code in
C:\springsource\sts-2.3.2.RELEASE\configuration\org.eclipse.osgi\bundles\898\1.cp\src\com\springsource\sts\grails\core\model\GrailsBuildConfig.java
// make sure that we use the Ivy dependency resolution strategy for Grails 1.2
// TODO CD make version number detection more flexible
if (settings.getGrailsVersion().startsWith("1.2")) {
jarFiles.addAll(settings.getTestDependencies());
jarFiles.addAll(settings.getProvidedDependencies());
Based on this find, I tried downgrading my project from Grails 1.3.2 to Grails 1.2 and ran "refresh dependencies". Sure enough, the dependencies were correctly loaded from Ivy.
Looks like someone needs to do the TODO. I can take a stab at it once I figure out how to check out the source code...
IntelliJ syncs dependencies between Grails (form application.properties and BuildConfig.groovy) and the IDE very nicely.
I'm building my application to run in an OSGi container. I use Maven and the Maven Bundle Plugin from Apache Felix to set up the OSGi manifests for my own modules and that works great.
Now, I'm deploying my bundles into an OSGi container together with several 3rd party libraries. Some of these are already OSGi-fied when I get them from the Maven repos, others, I want to convert into OSGi-compatible jars. I want to set up a Maven project that collects all dependencies, and puts each in its own OSGi jar. The ultimate goal is to collect these jars and my own into an assembly that I can use as a standalone deployment package.
I know how to convert standard jars to OSGi jars, and I have a (somewhat hackish) approach to merge multiple OSGi bundles, even if I probably shouldn't. But if I have a dependency that's already fine as it is, and I just want to copy it from the repo into my assembly, what part of Maven do I use? The bundle plugin is wrong, it messes up the manifests if a dependency is already OSGi-compatible. Do I use the dependency-plugin, the assembly plugin or something else?
I have the feeling I'm overlooking something very simple here.
Did you have a look at the PAX tools? In particular Pax-Runner and
pax-construct... They do not only give you a nice template to start with, but also solve most the problems you mentioned for free.
We use many libraries which are not OSGified by the vendor and which are not available on the Spring bundle repository. We also have many of these and want to deploy them all together hassle free. For this we have created a 2-layer maven setup:
Individual maven projects that either download or contain (as 'system' scope depends) the 3rd party lib in question, and OSGify these using the Apache Felix bundle plugin
One container project that has a dependency on all of these small projects and makes an assembly of them using the core assembly maven plugin. This POM also uses the copy-dependencies goal of maven to make sure everything is in place.
Once it is turned into an assembly (ours is a tar file) we deploy this to our servers. We have gone one step further and used this assembly of 3rd party libraries as the Target Platform for our Eclipse build environment. But this may be irrelevant for you.
You can get OSGi friendly versions of many common artifacts from the Spring bundle repository. So you may not have to do it yourself.
See details of how to configure the bundle repository for Maven.
(will update with some ideas for those that aren't available as bundles already)