We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-module maven projects(with -pl option) should work
-pl
mvn -DskipTests package -pl common,mobile-bff
Not work, throws exception: Unable to parse command line options: Unrecognized option: -pl common,mobile-bff
Unable to parse command line options: Unrecognized option: -pl common,mobile-bff
step-mvn-settings using existing /workspace/maven-settings/settings.xml step-mvn-goals Unable to parse command line options: Unrecognized option: -pl common,mobile-bff usage: mvn [options] [<goal(s)>] [<phase(s)>]
Tekton maven does not recognize maven -pl option, it throws error, but this works fine in my local environment.
Snippet of my pipeline.yaml
- name: build taskRef: name: maven kind: ClusterTask runAfter: - fetch-repository params: - name: CONTEXT_DIR value: $(params.CONTEXT_PATH) - name: GOALS value: - -B - -Dmaven.repo.local=$(workspaces.maven-settings.path) - -DskipTests - -pl common,$(params.APP_NAME) - package workspaces: - name: maven-settings workspace: local-maven-repo - name: source workspace: source
This is a snippet of my parent pom.
<packaging>pom</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>17</java.version> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <spring-cloud.version>2023.0.1</spring-cloud.version> </properties> <modules> <module>common</module> <module>mobile-bff</module> <module>web-bff</module> </modules>
It works on my local environment.
$ mvn -DskipTests package -pl common,mobile-bff [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] bff-common [jar] [INFO] mobile-bff [jar] [INFO] [INFO] ----------------------< com.ibm.smbc:bff-common >----------------------- [INFO] Building bff-common 0.0.1-SNAPSHOT [1/2] [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] ... [INFO] Reactor Summary for bff-common 0.0.1-SNAPSHOT: [INFO] [INFO] bff-common ......................................... SUCCESS [ 1.609 s] [INFO] mobile-bff ......................................... SUCCESS [ 0.527 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.442 s [INFO] Finished at: 2024-05-03T22:42:23+08:00 [INFO] ------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
Multi-module maven projects(with
-pl
option) should workActual Behavior
Not work, throws exception:
Unable to parse command line options: Unrecognized option: -pl common,mobile-bff
Steps to Reproduce the Problem
Tekton maven does not recognize maven
-pl
option, it throws error, but this works fine in my local environment.Additional Info
Snippet of my pipeline.yaml
This is a snippet of my parent pom.
It works on my local environment.
The text was updated successfully, but these errors were encountered: