maven-2

How to make use of Grails Dependencies in your IDE

↘锁芯ラ 提交于 2019-12-04 00:56:00
So I finally got my dependencies working with Grails. Now, how can my IDE, eg IntelliJ or Eclipse, take advantage of it? Or do I really have to manually manage what classes my IDE knows about at "development time" ? If the BuildConfig.groovy script is setup right ( see here ), you will be able to code away with vi or your favorite editor without any troubles, then run grails compile which will resolve and download the dependencies into the Ivy cache and off you go ... If, however, you are using an IDE like Eclipse or IntelliJ, you will need the dependencies at hand while coding . Obviously -

Clearing Grails Dependency Cache

只愿长相守 提交于 2019-12-04 00:46:30
问题 I run into some problems when trying to solve a problem I had with SNAPSHOT maven dependencies (see here). When running grails dependency-report , cached dependencies get listed, more or less like this: acme-adapter-api by com.acme 108 kB (0 kB downloaded, 108 kB in cache) As this answer suggests, you can run into trouble when updating dependencies without increasing the release number, cause the cache is not emptied and SNAPSHOT dependencies don't get refetched, as one would expect. I looked

How to include automatically xmlbeans generated code into maven jar?

孤街醉人 提交于 2019-12-04 00:45:30
I have a project which uses Apache Xmlbeans for databinding. Currently it is very simple it only has some Schema-Files in src/main/xsd and xsdconfig in src/main/xsdconfig. I want to include the generated Classes into the generated jar-File. It works if I specify the xmlbeans goal: "mvn xmlbeans:xmlbeans package" --> Creates a Jar with the xmlbeans classes But I want to do this within the normal build cycle: "mvn package" --> should create a jar with the xmlbeans classes, but won't. The pom is the following: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001

Creating a tar.gz archive with Maven

蹲街弑〆低调 提交于 2019-12-04 00:31:32
I have a Maven project, where under src/main directory there is a sub dir called output. this folder needs to be packaged into tar.gz. when using the assembly plugin as follows: From the pom.xml: <build> <finalName>front</finalName> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-5</version> <configuration> <descriptors> <descriptor>src/main/assembly/assembly.xml</descriptor> </descriptors> </configuration> </plugin> </plugins> </build> the assembly.xml: <assembly> <id>bundle</id> <formats> <format>tar.gz</format> </formats> <fileSets> <fileSet> <directory

Package Dll in Jar using Maven- single goal

自作多情 提交于 2019-12-04 00:22:48
问题 I have added a DLL in my maven project as dependency like this : <dependency> <groupId>com.test.dll</groupId> <artifactId>myDll</artifactId> <version>0.1</version> <type>dll</type> </dependency> When I try to execute maven:install It is giving me this error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2- beta-5:single (jar-with-dependencies) on project testApp: Failed to create assembly: Error adding file-set for 'com.test.dll:myDll:dll:0.1' to archive:

How to configure a subproject dependency in Maven without deploying jars?

落爺英雄遲暮 提交于 2019-12-04 00:20:30
I googled this and it seems that no one has an answer, yet it seems like such an elementary thing that it should be possible. I have the following project structure: parent ---sub-project1 ---sub-project2 sub-project2 needs to have sub-project1 as a dependency. So I have this in sub-project2's pom: <dependencies> <dependency> <artifactId>sub-project1</artifactId> <groupId>mygroup</groupId> <version>1.0-SNAPSHOT</version> </dependency> .... When I do this, Maven tries to dowload the sub-project1.jar file, which does not exist because it's not ready for the repo yet. I tried to put a <scope

Buttons to run Maven targets in NetBeans

早过忘川 提交于 2019-12-04 00:19:54
I'd like to have a button to run (custom) Maven targets in NetBeans 6.9. Hot-keys would also be nice. Is this possible? If it is not possible: is there something like a console where I could Maven commands directly? In NetBeans 6.9: Right-click on the project -> Custom -> Goals. Make sure to check "Remember as: ". You can run this by Right-click on the project -> Custom -> "myRememberAsName" I don't know if there is an easy way to assign this to a button or a short cut. Instead of using custom goals you can create a custom profile. In the project properties, go in pane Configurations , add a

How do I use a template code generator (eg freemarker) in Maven?

一笑奈何 提交于 2019-12-04 00:11:20
How would you structure Freemarker (or an alternative) as a templating code generator into a Maven project? I'm pretty new to Maven and would appreciate some help. I want to generate some code from templates in my project. [a] Rather than write my own, googling found freemarker which appears to be used by Spring which is a good enough reference for me, though as I haven't started with it yet, any other suggestions that work well with Maven would be appreciated too. This website tells me how to add it as a dependency to my pom.xml. This SO question tells me where the generated sources should go

Exclude dependency in a profile

不羁的心 提交于 2019-12-04 00:07:00
I have a maven module which has some dependencies. In a certain profile, I want to exclude some of those dependencies (to be exact, all dependencies with a certain group id). They however need to be present in all other profiles. Is there a way to specify exclusions from the dependencies for a profile? To my knowledge, no , you can't deactivate dependencies (you can exclude transitive dependencies but this is not what you are asking for) and yes , what you are currently doing with the POM (manually editing it) is wrong. So, instead of removing dependencies, you should put them in a profile and

What's the difference between mvn archetype:generate and mvn archetype:create

拟墨画扇 提交于 2019-12-03 23:27:58
any difference between those two? archetype:create is the old and deprecated form that needed all properties defined upon start, while archetype:generate is the newer and more comfortable way. archetype:generate knows about those catalogs where archetypes are listed and can ask you for missing properties/variables. I guess the reason for introducing a new command was that the new generate was not backward-compatible, so it might have broken existing scripts that rely on it. Check the documentation for archetype generate , create has been kept for backwards compatibility: For backward