maven-plugin

Tomcat 7 - Maven Plugin?

这一生的挚爱 提交于 2019-11-26 09:27:16
问题 I just wanted to double-check, has anyone found or is working on a Tomcat 7 plugin? If not, is anyone interested in helping me get it up and running? I want another quick alternative to Glassfish, JBoss AS 6.0 is a bit heavy still for quick mockups. Walter 回答1: There is t7mp - a Tomcat 7 Maven Plugin - on Google code. Cargo (and its Cargo Maven2 Plugin) also has support for Tomcat 7 (this was CARGO-790). Apache Tomcat Maven Plugin 2.0-beta-1 supports Tomcat 7. 回答2: It work for me as the

What is the best way to avoid maven-jar?

我只是一个虾纸丫 提交于 2019-11-26 07:37:58
问题 I am using a different plugin (ant4eclipse) to jar my files. What is the best way to avoid the maven-jar plugin from executing? I tried to remove the <plugin>maven-jar-plugin</plugin> I tried to <exclude> ** / * < / exclude> I tried to <skip>true</skip> None worked 回答1: In Maven 3.0.x (I tried 3.0.2) you can disable maven-jar-plugin by binding the default-jar execution to a nonexistent phase, as @bmargulies suggested. Unfortunately that doesn't work in 2.2.1, but you can prevent it from

Maven test dependency in multi module project

白昼怎懂夜的黑 提交于 2019-11-26 06:58:33
问题 I use maven to build a multi module project. My module 2 depends on Module 1 src at compile scope and module 1 tests in test scope. Module 2 - <dependency> <groupId>blah</groupId> <artifactId>MODULE1</artifactId> <version>blah</version> <classifier>tests</classifier> <scope>test</scope> </dependency> This works fine. Say my module 3 depends on Module1 src and tests at compile time. Module 3 - <dependency> <groupId>blah</groupId> <artifactId>MODULE1</artifactId> <version>blah</version>

Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.code.TypeTags when using lombok

允我心安 提交于 2019-11-26 06:48:20
问题 I have following dependency in pom.xml: <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.16.8</version> </dependency> When I run mvn clean install , I have following error: Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.code.TypeTags at java.lang.ClassLoader.findClass (ClassLoader.java:711) at java.lang.ClassLoader.loadClass (ClassLoader.java:566) at lombok.launch.ShadowClassLoader.loadClass (ShadowClassLoader.java:418) I tried to

Unsupported major.minor version 52.0 in my app

大城市里の小女人 提交于 2019-11-26 06:19:17
问题 I\'m trying to compile my Android project and I\'m getting this error [INFO] Exception in thread \"main\" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0 [INFO] at java.lang.ClassLoader.defineClass1(Native Method) [INFO] at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [INFO] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [INFO] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) [INFO

How do I create a new packaging type for Maven?

泪湿孤枕 提交于 2019-11-26 05:25:25
问题 I have a requirement to create jar files with Maven, but they need to be installed to the repository with a \"foobar\" extension , and it would be nice if they could have their own packaging type so we can identify those artifacts by the packaging. Can I set up a new packaging type to do this? 回答1: To do as you described, create a Maven project with packaging jar (as stated here, as there won't be mojo definitions). In the src/main/resources/META-INF/plexus sub-folder create a components.xml

Eclipse : Maven search dependencies doesn&#39;t work

瘦欲@ 提交于 2019-11-26 04:05:44
问题 I created a new simple Maven project in a new Workspace. When I open the pom.xml \'s Dependencies view in Eclipse editor, and I choose Add.. dependency, there\'s no search results no matter what search criteria I input in the search fields: It instantly give me, for example, Results for \'spring\' (0) . In my other workspace, with my existing projects I don\'t have this problem. Is there a way to fix that ? 回答1: Eclipse artifact searching depends on repository's index file. It seems you did

Maven 2 assembly with dependencies: jar under scope “system” not included

随声附和 提交于 2019-11-26 03:38:27
I am using maven-assembly plugin to create a jar of my application, including its dependencies as follows: <assembly> <id>macosx</id> <formats> <format>tar.gz</format> <format>dir</format> </formats> <dependencySets> <dependencySet> <includes> <include>*:jar</include> </includes> <outputDirectory>lib</outputDirectory> </dependencySet> </dependencySets> </assembly> (I omitted some other stuff that is not related to the question) So far this has worked fine because it creates a lib directory with all dependencies. However, I recently added a new dependency whose scope is system , and it does not

Is it possible to create an “uber” jar containing the project classes and the project dependencies as jars with a custom manifest file?

孤者浪人 提交于 2019-11-26 02:33:35
问题 I\'m trying to create a executable jar(using maven) that contains the project classes and it\'s dependencies with a manifest file that has the entry for the main class and the class path entry that points to the dependencies packed in the root of the jar;something like this : Manifest File: ..... Main-Class : com.acme.MainClass Class-Path : dependecy1.jar dependecy2.jar ..... Jar: jar-root |-- .... |-- com/acme/../*.class |-- dependecy1.jar `-- dependecy2.jar I\'m using the maven-jar-plugin

Maven 2 assembly with dependencies: jar under scope “system” not included

笑着哭i 提交于 2019-11-26 01:14:16
问题 I am using maven-assembly plugin to create a jar of my application, including its dependencies as follows: <assembly> <id>macosx</id> <formats> <format>tar.gz</format> <format>dir</format> </formats> <dependencySets> <dependencySet> <includes> <include>*:jar</include> </includes> <outputDirectory>lib</outputDirectory> </dependencySet> </dependencySets> </assembly> (I omitted some other stuff that is not related to the question) So far this has worked fine because it creates a lib directory