pom.xml

Cannot execute Groovy Maven Plugin as a goal

天大地大妈咪最大 提交于 2021-01-27 07:46:38
问题 I am using Apache Maven 3.3.9 with the Groovy Maven plugin. Here is the relevant section of the pom.xml (the inlined Groovy script is just fictional): <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>groovy-maven-plugin</artifactId> <version>2.0</version> <executions> <execution> <id>myGroovyPlugin</id> <phase>prepare-package</phase> <goals> <goal>execute</goal> </goals> <configuration> <source> log.info('Test message: {}', 'Hello, World!') </source> </configuration> </execution> <

Is there a way in maven to assure that a property is set

冷暖自知 提交于 2021-01-27 04:48:25
问题 I just tracked down a difficult maven issue that was caused by a bad property value. The property is a path to an alternate JVM that is used a run-time by a test. I would like to make maven fail early by detecting if the path is valid or not. What might be a way to accomplish this? I plan to dig into antrun to see if there is a way to make it run first so that it can check, but that seems like overkill. Question : How can I do this cleanly and simply? 回答1: Yes, you can use the maven-enforcer

Maven can't find parent POM

元气小坏坏 提交于 2021-01-26 05:33:04
问题 I am trying to build a maven project, but I have encountered problem. pom has specified parent pom and maven can't find it. I actually have the parent pom, but I don't know where to place it or what should I do so maven knows about. I'm new to maven so sorry if my question is stupid. 回答1: If you have the parent pom, you could try installing it. When you run mvn install on a module the resulting artifact will be placed in your repository, so that it can be used from other modules. 回答2: I am

multi-module Maven project on Dockers

余生长醉 提交于 2021-01-24 08:03:53
问题 I have a multi-module maven project where the single modules are all runnable microservice applications containing their own Dockerfile, so in production every module will be a containerized application. The parent project, which contains the child-modules only contains the parent pom.xml and the docker-compose.yml I have tried to use the following Dockerfile (on sub-module level): FROM sgrio/java-oracle RUN apt-get update RUN apt-get install -y maven COPY ../pom.xml /usr/local/service

multi-module Maven project on Dockers

陌路散爱 提交于 2021-01-24 08:03:32
问题 I have a multi-module maven project where the single modules are all runnable microservice applications containing their own Dockerfile, so in production every module will be a containerized application. The parent project, which contains the child-modules only contains the parent pom.xml and the docker-compose.yml I have tried to use the following Dockerfile (on sub-module level): FROM sgrio/java-oracle RUN apt-get update RUN apt-get install -y maven COPY ../pom.xml /usr/local/service

Is there a way to trace origin of a property in maven pom?

一笑奈何 提交于 2020-12-30 06:01:59
问题 I have a complex maven project with a lot of managed dependencies, and have a little problem tracing versions of these dependencies. For example, spring libraries' version is guided by a property value {spring.version} - but I have no idea which project this property is coming from. Using mvn dependency:tree I can see the final result where all versions are resolved, but it does not go deep into detail to tell me where the winning dependency version is coming from, and why that version is a

Maven javadoc plugin 3.1.0 not generating aggregate javadocs

谁说胖子不能爱 提交于 2020-08-08 05:18:42
问题 I have a multi-module project for which I'd like to generate aggregate javadoc reports. I am using maven-javadoc-plugin version 3.1.0. Here's the reporting section of pom.xml file: <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>3.1.0</version> <reportSets> <reportSet> <id>non-aggregate</id> <reports> <report>javadoc</report> </reports> </reportSet> <reportSet> <id>aggregate</id> <inherited>false</inherited>

“Unknown lifecycle phase ”mvn“. You must specify a valid lifecycle phase or a goal” While Deploying the application using Azure

≡放荡痞女 提交于 2020-07-10 10:26:49
问题 I am trying to deploy a mule application on cloud hub using Azure Devops. While trying to deploy the application I am running a job which have a task Maven that is suppose to run a maven command: mvn package deploy -DmuleDeploy -Dcloud.env=Sandbox -Danypoint.businessGroup=TestBusiness -Dcloudhub.workerType=Small -DcloudhubAppName=testdeployment -Dmule.version=4.2.2 -Dcloud.user=UserUser -Dcloud.password=*** That should deploy the build using the pom.xml file on cloud hub But I am getting this