maven-2

Generated target files after build doesn't contain all the compiled classes that must have been there

蓝咒 提交于 2019-12-07 15:14:07
问题 While building the project, the console shows that the source packages were compiled(the one inside px10 package) However if I see the target files generated, none of the classes are there from source package. tried clean & build several times but doesnt help cleared the netbeans cache from .../var/cache/ Here is the log generated while building the web app ------------------------------------------------------------------------ Building ABCApp Java EE 6 Webapp 1.0 ---------------------------

Maven dependency graph missing in NetBeans 6.9

孤者浪人 提交于 2019-12-07 15:02:34
问题 NetBeans had a really cool feature that would allow you to view all of a Maven project's dependencies as a graph. Well, I recently upgraded from 6.8 to 6.9, and while all the other Maven stuff works fine, the menu item for the dependency graph has vanished. I couldn't find any information on the NetBeans site. Does anybody know if this feature was removed? Or am I just missing some configuration option? 回答1: According to Creating an Enterprise Application Using Maven (applies to NetBeans 6.9)

Getting -bash: mvn: command not found

放肆的年华 提交于 2019-12-07 12:35:02
问题 I tried setting the Maven PATH in .profile file as well using export commands in terminal(Mac OSX). But, on running mvn commands, getting -bash: mvn: command not found Please help. 回答1: What did you set up exactly? Did you setup PATH like this (or something equivalent): export PATH=$PATH:...:$M2_HOME/bin If yes, did you logout and login again? According to the bash manpage: When bash is invoked as an interactive login shell , or as a non-interactive shell with the --login option, it first

Can I use the AdMob SDK jar as a dependency in my maven android project?

删除回忆录丶 提交于 2019-12-07 11:24:09
问题 I'm just switching my build process to use maven, I can't find the dependency for AdMob on the maven repository site, how can I configure it manually? Such as : <dependencies> <dependency> <groupId>com.google.android</groupId> <artifactId>android</artifactId> <version>2.2.1</version> <scope>provided</scope> </dependency> </dependencies> 回答1: An easy way to do this is to have the lib in your source tree and use this: ... <dependency> <groupId>some_admob_groupid</groupId> <artifactId>admob<

Maven plugin for generating ISO file

百般思念 提交于 2019-12-07 11:14:54
问题 Is there a maven plugin capable of generating ISO images? I need to take the output of some modules (mostly zip files containing jars) and combine them into a single ISO image. Thanks 回答1: There is now an ISO9660 maven plugin that does the job: https://github.com/stephenc/java-iso-tools/commits/master/iso9660-maven-plugin Documentation is sparse but got it working with the following: <plugin> <groupId>com.github.stephenc.java-iso-tools</groupId> <artifactId>iso9660-maven-plugin</artifactId>

Maven: Using inherited property in dependency classifier causes build failure

☆樱花仙子☆ 提交于 2019-12-07 11:05:13
问题 Given three POM files: C depends on B. B inherits from A. I can build A and B C fails to build because of its dependency on B. The full source-code and build output is included below for your review. Here is A's POM: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.foo</groupId> <artifactId>A<

Is it necessary to have .java files in /src/main/java when compiling with maven?

萝らか妹 提交于 2019-12-07 10:55:48
问题 I tried to convert a project to a maven one... it has its .java files in other location than /src/main/java , when i run maven install, all the files (.hbm , .xml) except those .class occurs in my jar. This is build part from pom.xml : <build> <resources> <resource> <directory>${basedir}/src</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5<

run maven tests from classpath

微笑、不失礼 提交于 2019-12-07 10:15:29
问题 In order to clean up something of a giant mess, I set out to put the code of my tests all in one ordinary java project (all in src/main/java), and then declare that as a <scope>test</scope> dependency in another project, and expect the tests to run. No such luck. surefire wants to just run the tests that it can see in the sources. I can see a sadly obvious solution here involving the build-helper-plugin and adding the tests into the test compilation environment as a source directory, but I

how to ask maven war plugin to copy particular jar file into warfile/web-inf/lib

吃可爱长大的小学妹 提交于 2019-12-07 09:59:15
问题 I have a simple.jar file that stay in c:/JAR. When i used maven war plugin to create a war file, it will copy all the dependencies into lib folder. How can i ask maven to copy simple.jar into lib folder as well. 回答1: I believe this will work for you. I'm not 100% sure the C:\\JAR is correct though. You might have to fiddle with this syntax. <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0.2</version> <configuration>

Copy the latest version of an artifact from a Maven repository

那年仲夏 提交于 2019-12-07 09:30:13
问题 I am trying to copy a war file from my company's Nexus repository to a specific location. I am using maven-dependency-plugin in the following way: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>copy-to-output</id> <phase>prepare-package</phase> <goals> <goal>copy</goal> </goals> </execution> </executions> <configuration> <artifactItems> <artifactItem> <groupId>com.mycompany</groupId>