maven-2

Maven and db4o dependency

风格不统一 提交于 2019-12-21 11:04:27
问题 I'm intrigued to test new frameworks in the Java world, and decided to create a new project that takes advantage of Maven and db4o. I'm starting to get a hang of Maven, but I have a hard time adding db4o as a dependency to the project. First problem is that db4o doesn't exist in the official Maven repositories. Next up comes the problem that db4o seem to have recently restructured their whole site's URI:s, so I'm getting 'site not found' messages all the time when I try to navigate their site

Is it possible to set a maven property from ant?

余生颓废 提交于 2019-12-21 10:17:29
问题 I tried to use the maven-antrun-plugin to check in a first execution if a file exists and then set a property accordingly. In another execution (another phase) of the antrun-plugin I want to make use of the property. But the property set in one execution cannot be used in another execution since it's an ant and not a maven property and doesn't get propagated. Is it possible to propagate the ant property to maven or in other words set a maven property from ant? Using another Maven build like

Overriding 'clean' lifecycle in Maven

烈酒焚心 提交于 2019-12-21 09:13:59
问题 I was going through a book that explain how to override 'default' lifecycle of Maven. It says: To define a new lifecycle for a packaging type, you'll need to configure a LifecycleMapping component in Plexus. In your plugin project, create a META-INF/plexus/components.xml under src/main/resources. In components.xml add the content as shown below, and you're done. With below configuration, I'm able to customize the default lifecycle for 'jar' packaging type. Now If I exeute $ mvn package It

Overriding 'clean' lifecycle in Maven

匆匆过客 提交于 2019-12-21 09:13:38
问题 I was going through a book that explain how to override 'default' lifecycle of Maven. It says: To define a new lifecycle for a packaging type, you'll need to configure a LifecycleMapping component in Plexus. In your plugin project, create a META-INF/plexus/components.xml under src/main/resources. In components.xml add the content as shown below, and you're done. With below configuration, I'm able to customize the default lifecycle for 'jar' packaging type. Now If I exeute $ mvn package It

Run tests from inner classes via Maven

我的未来我决定 提交于 2019-12-21 08:26:09
问题 I have following tests structure: public class WorkerServiceTest { public class RaiseErrorTest extends AbstractDbUnitTest{ @Test public void testSomething(){ } ... } ... } It's done because I don't want to create a separate class file for every test case extending AbstractDbUnitTest . The problem is that mvn test doesn't run test from my inner class. Is there is a way how to configure Maven to run such tests? Of course I can create methods in the parent class calling the inner class methods

Maven won't use public key to deploy

狂风中的少年 提交于 2019-12-21 08:13:59
问题 I'm using SSH to deploy my Java artifacts to a server. I have the keys set up so that I can interactively SSH to the server without requiring a password, but when I try to run the " mvn deploy " or " mvn release:perform " commands, it hangs (at what I assume is the password prompt). My ~/.m2/settings.xml file contains the username for the server (because it is different than my local username) and references the id of the server that requires the different user. 回答1: Are you sure your

Maven won't use public key to deploy

喜欢而已 提交于 2019-12-21 08:13:04
问题 I'm using SSH to deploy my Java artifacts to a server. I have the keys set up so that I can interactively SSH to the server without requiring a password, but when I try to run the " mvn deploy " or " mvn release:perform " commands, it hangs (at what I assume is the password prompt). My ~/.m2/settings.xml file contains the username for the server (because it is different than my local username) and references the id of the server that requires the different user. 回答1: Are you sure your

How to make use of Grails Dependencies in your IDE

冷暖自知 提交于 2019-12-21 07:30:51
问题 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

Creating a tar.gz archive with Maven

半世苍凉 提交于 2019-12-21 07:30:46
问题 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:

How to make use of Grails Dependencies in your IDE

我只是一个虾纸丫 提交于 2019-12-21 07:30:09
问题 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