maven-2

AspectJ weaving maven modules

寵の児 提交于 2019-12-03 06:04:49
问题 I have a project that has multiple maven modules, one of which, contains my aspects. How can I take the aspects and weave multiple maven modules? The documentation for the AspectJ Maven plugin is a little sparse and haven't been able to find many examples. I have tried putting the aspectj plugin in the parent pom but it doesn't seem to apply the advice for the modules underneath it. I also tried specifying the aspectsDirectory property but it didn't seem to have any affect. Perhaps I did it

unit testing EJBs with Maven 2 and Glassfish 3

≡放荡痞女 提交于 2019-12-03 05:59:27
问题 I've been trying to set my application up so that I can unit test it's EJBs all day but I can't seem to get past what seems like a really simple problem. I have a standard Maven web application set up in NetBeans 6.9. I've automatically generated a unit test for one of the EJBs but whenever I go to run it I get the error message: Testcase: initializationError(com.example.ExampleTest): Caused an ERROR Absent Code attribute in method that is not native or abstract in class file javax/ejb

Why does the WTP plugin deploy one Maven dependency as a folder, instead of a jar?

我只是一个虾纸丫 提交于 2019-12-03 05:59:08
I have a very strange problem with Maven and the Eclipse WTP. I have a multi-module project, let's call it project . It consists of two modules project-base and project-web . I have the workspace resolution enabled (and it works fine with several other very similar Maven projects). project-base is a dependency of project-web and it's normally deployed as a jar file. But for several days, it keeps being deployed as a class folder in my local Tomcat, as you can see here: Therefore, my Tomcat does not recognize any of my class files in there, because it expects them to be jars, not folder. The

Generating sources by running a project's java class in Maven

大憨熊 提交于 2019-12-03 05:58:27
I'm converting a largish Ant build to Maven. As part of the Ant build, we have several steps which created Java classes by invoking one of the project's classes, simplified as: javac SomeGenerator.java java SomeGenerator generated # generate classes in generated/ javac generated/*.java I've split each generator in its own Maven module, but I have the problem of not being able to run the generator since it's not yet compiled in the generate-sources phase. I've tried something similar to <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1<

How do I package and run a simple command-line application with dependencies using maven?

百般思念 提交于 2019-12-03 05:55:08
问题 I am brand new to both java and to maven, so this is likely very simple. If I follow the maven2 hello world instructions here: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html everything works OK. If I then alter pom.xml to bring in a dependency from a remote repository, the files for this dependency get stored in ~/.m2/repository/new-dependency/ . Using the syntax in the hello world instructions to run the application requires that I add the absolute path to the

How to create empty folders with maven archetype?

。_饼干妹妹 提交于 2019-12-03 05:53:15
问题 There is an existing issue for this approach, located on Codehaus JIRA #ARCHETYPE-57, but all instructions listed in this ticket failed for me. Also the blog post of marekdec How to get maven archetype to generate empty directories fails for me. The trick within the archetype.xml with the trailing / doesnt works for me: <resources> <resource>src/main/webapp/</resource> Unable to find resource 'archetype-resources/src/main/webapp/' Also the fileSet directory in archetype-metadata.xml does not

Maven Assembly Plugin - install the created assembly

烂漫一生 提交于 2019-12-03 05:48:33
I have a project that simply consists of files. I want to package those files into a zip and store them in a maven repository. I have the assembly plugin configured to build the zip file and that part works just fine, but I cannot seem to figure out how to install the zip file? Also, if I want to use this assembly in another artifact, how would I do that? I am intending on calling dependency:unpack, but I don't have an artifact in the repository to unpack. How can I get a zip file to be in my repository so that I may re-use it in another artifact? parent pom <build> <plugins> <plugin> <!--

Maven install and deploy

僤鯓⒐⒋嵵緔 提交于 2019-12-03 05:36:27
问题 I have some doubt regarding our setup in our ci server. The maven command used to build applications is configured in bamboo as "mvn install deploy" . As of my understanding this would invoke all phases up to "install" and then invoke all phases again up to "deploy" , which would mean and as I can see in our logs, that the applications are build twice (twice compile, twice test) etc.. Which also means that the applications takes almost twice as long to build as needed. All that's needed is

What's the minimum classpath for an Axis2 client?

不羁的心 提交于 2019-12-03 05:33:53
问题 I want to build an Axis2 client (I'm only accessing a remote web service, I'm not implementing one!) with Maven2 and I don't want to add 21MB of JARs to my project. What do I have to put in my pom.xml to compile the code when I've converted the WSDL with ADB? 回答1: ( Note: This response was provided by Aaron Digulla himself. What follows is the exact text of his own answer.) In maven2, the minimum dependency set to make an ADB client work ("ADB" as in the way you created the Java classes from

weird problem with JAVA_HOME and maven dependencies

余生颓废 提交于 2019-12-03 05:27:39
I have JAVA_HOME variable set to C:\Program Files\Java\jre6\ when I run maven package on the project it tells me that it can't resolve dependency [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (default) on project roo: Execution default of goal o rg.codehaus.mojo:aspectj-maven-plugin:1.0:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.0 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1] so it assumes that JAVA_HOME is