maven-3

Correct way to declare multiple scope for Maven dependency?

[亡魂溺海] 提交于 2020-03-17 06:28:07
问题 I have a dependency that I want to use in test scope (so that it is in the classpath when I am running unit tests), and in runtime scope (so that I can contain that in WAR/EAR/other packaging for deployment, but not affecting transitive dependency lookup for dependent artifacts). A real life example is SLF4J's implementation JARs (e.g. Logback ). I want it to exist in the classpath when I am running tests, and I want it to be included in my WAR/EAR, but I don't want project depending on my

springBoot application on Jboss EAP, servlet context not lodaed

谁说我不能喝 提交于 2020-03-13 05:11:31
问题 I have a very simple spring boot application that I want to deploy to Jboss EAP. Here is my simple application class: @SpringBootApplication public class MayurApplication extends SpringBootServletInitializer{ public static void main(String[] args) { SpringApplication.run(MayurApplication.class, args); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(applicationClass); } private static Class<MayurApplication>

How do I activate a Maven profile if a file does NOT exist?

安稳与你 提交于 2020-02-25 10:16:05
问题 I’m using Maven 3.2.3. How do I activate a profile if a file does NOT exist on the file system? I have tried the below, but discovered that the <not> syntax isn’t supported: <profile> <id>create-test-mysql-props-file</id> <activation> <file> <not><exists>${basedir}/src/main/myfile</exists></not> </file> </activation> <build> <plugins> <!-- Generate mysql datasource properties --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0-alpha

JBoss EAR deployment order

风流意气都作罢 提交于 2020-02-02 06:25:07
问题 I have 5 EARs that need to be deployed. One of them, local-configuration-ear-0.3.5-SNAPSHOT.ear , is a dependency of all the others, and they require it at deployment time, i.e. local-configuration-ear-0.3.5-SNAPSHOT.ear needs to be deployed first. All 5 of the EARs are located in the deployments folder. I read here that I can use jboss-deployment-structure.xml to manage the order of EAR deployment, but I ran into some issues. The file I made looks like this: <?xml version="1.0" encoding="UTF

Change package property in Maven Archetype

怎甘沉沦 提交于 2020-02-01 18:56:05
问题 I created a Maven Archetype. My META-INF/maven/archetype-metadata.xml looks like this: <archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"> <fileSets> <fileSet filtered="true" packaged="true" encoding="UTF-8" > <directory

How does Maven resolve plugin versions?

亡梦爱人 提交于 2020-02-01 00:47:33
问题 I'm reading the docs and still confused as to how Maven is deciding which versions of plugins to download. For example, consider this simple scenario: an empty local repository a default settings.xml run a simple maven command. for example, mvn archetype:generate for the maven-archetype-quickstart as described in the Maven in 5 Minutes doc. After running the command, the first thing Maven does is download a bunch of plugins. Some of the plugins Maven is downloading include: maven-clean-plugin

Maven: The packaging for this project did not assign a file to the build artifact

我的梦境 提交于 2020-01-27 08:54:05
问题 I'm using Maven 3.0.3 on Mac 10.6.6. I have a JAR project and when I run the command "mvn clean install:install", I'm getting the error, [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-cli) on project StarTeamCollisionUtil: The packaging for this project did not assign a file to the build artifact -> [Help 1] What does this mean and how can I fix it? Below is my pom.xml. Let me know what other info would be helpful and I'll edit this post.

Maven: The packaging for this project did not assign a file to the build artifact

蓝咒 提交于 2020-01-27 08:53:21
问题 I'm using Maven 3.0.3 on Mac 10.6.6. I have a JAR project and when I run the command "mvn clean install:install", I'm getting the error, [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-cli) on project StarTeamCollisionUtil: The packaging for this project did not assign a file to the build artifact -> [Help 1] What does this mean and how can I fix it? Below is my pom.xml. Let me know what other info would be helpful and I'll edit this post.

Migrate the Maven repository to another machine

断了今生、忘了曾经 提交于 2020-01-25 23:12:14
问题 Is it possible to migrate the Maven repository to another machine without having to reconfigure each item added to it? Thanks 回答1: You can just copy the .m2/repository folder to another machine. FYI, you can execute mvn install and it will download all dependencies once again, but it will take while. 来源: https://stackoverflow.com/questions/15719212/migrate-the-maven-repository-to-another-machine

Maven-embedded Tomcat6 doesn't start

寵の児 提交于 2020-01-24 20:39:21
问题 I'm trying to use embedded Tomcat6 ( mvn tomcat6:run ) to run my Vaadin application ( pom.xml is given below). It doesn't work - when I run it, I get the messages окт 18, 2013 1:51:57 PM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server окт 18, 2013 1:51:57 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.36 окт 18, 2013 1:51:57 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-9090