You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Meir Yanovich <me...@personetics.com.INVALID> on 2020/06/03 19:44:00 UTC
maven-ear-plugin bundleFileName don't change the name of the war i
want to bundle with the ear
im using the latest version of the maven-ear-plugin
i like to bundle the test.war into my ear
but the output is always :
test1-test21999.test-SNAPSHOT.war
which is always the default :
outputFileNameMapping = @{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@
how do i force it to be:test.war
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.test.id</groupId>
<artifactId>artifact_name</artifactId>
<version>1999_app</version>
</parent>
<artifactId>Test</artifactId>
<packaging>ear</packaging>
<name>Test</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>test1</artifactId>
<type>war</type>
</dependency>
<profiles>
<profile>
<id>myapp</id>
<build>
<finalName>myapp</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<webModule>
<artifactId>test1</artifactId>
<groupId>Test1</groupId>
<bundleFileName>test.war</bundleFileName>
<outputFileNameMapping>test.war</outputFileNameMapping>
<contextRoot>/myapp</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
here is the log after running with -X:
please notice when it copy and ignoring the renaming
[INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to [test1-test21999.test-SNAPSHOT.war]
[INFO] --- maven-ear-plugin:3.0.1:ear (default-ear) @ web-pserver-ear ---
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-ear-plugin:3.0.1, parent: sun.misc.Launcher$AppClassLoader@4e25154f]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear' with basic configurator -->
[DEBUG] (f) earSourceDirectory = C:\foo\ear\src\main\application
[DEBUG] (f) earSourceIncludes = **
[DEBUG] (f) encoding = UTF-8
[DEBUG] (f) escapedBackslashesInFilePath = false
[DEBUG] (f) filtering = false
[DEBUG] (f) finalName = web-pserver-ear-2020.vanilla-engage.1-SNAPSHOT
[DEBUG] (f) generatedDescriptorLocation = C:\foo\target
[DEBUG] (f) includeLibInApplicationXml = false
[DEBUG] (f) outputDirectory = C:\foo\target
[DEBUG] (f) outputFileNameMapping = @{groupId}@-@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@
[DEBUG] (f) project = MavenProject: foo-ear:1999.foo1-SNAPSHOT @ C:foo\ear\pom.xml
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@7569ea63
[DEBUG] (f) skinnyWars = false
[DEBUG] (f) skipClassPathModification = false
[DEBUG] (f) tempFolder =C:\foo\target
[DEBUG] (f) useJvmChmod = true
[DEBUG] (f) version = 7
[DEBUG] (f) workDirectory = C:\foo\target\foo-SNAPSHOT
[DEBUG] -- end configuration --
[DEBUG] Resolving artifact type mappings ...
[DEBUG] Initializing JBoss configuration if necessary ...
[DEBUG] Initializing ear execution context
[DEBUG] Resolving ear modules ...
[INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to [test1-test21999.test-SNAPSHOT.war]
[INFO] Copy ear sources to C:\foo\target\foo-SNAPSHOT
[DEBUG] Jar archiver implementation [org.codehaus.plexus.archiver.jar.JarArchiver]
[DEBUG] Excluding [] from the generated EAR.
[DEBUG] Including [**] in the generated EAR.
RE: maven-ear-plugin bundleFileName don't change the name of the war
i want to bundle with the ear
Posted by Meir Yanovich <me...@personetics.com.INVALID>.
This is totally wired
im debugging the plugin and I see that it ignores and don’t load what I configured
under :
<configuration>
Nothing . it is using some kind of default parameters .....
why does it ignore the configuration ?
-----Original Message-----
From: Karl Heinz Marbaise <kh...@gmx.de>
Sent: Thursday, 4 June 2020 17:18
To: Maven Users List <us...@maven.apache.org>; Bram Patelski <br...@gmail.com>
Subject: Re: maven-ear-plugin bundleFileName don't change the name of the war i want to bundle with the ear
Hi,
On 04.06.20 14:17, Bram Patelski wrote:
> You can use the finalName property in the build-section of the Maven
> pom-file:
>
> <build>
> <finalName>test</finalName>
> . . .</build>
This will only change the name in target directory but not the name in the EAR file ...
Kind regards
Karl Heinz Marbaise
>
>
> https://stackoverflow.com/questions/14488509/maven-how-to-rename-the-w
> ar-file-for-the-project
>
>
> PGP key:
> https://keys.mailvelope.com/pks/lookup?op=get&search=0xF31094A567CE732
> E
>
>
> On Wed, Jun 3, 2020 at 9:44 PM Meir Yanovich
> <me...@personetics.com.invalid> wrote:
>
>> im using the latest version of the maven-ear-plugin i like to bundle
>> the test.war into my ear but the output is always :
>>
>> test1-test21999.test-SNAPSHOT.war
>>
>> which is always the default :
>>
>> outputFileNameMapping = @{groupId}@-@{artifactId}@-@{version}@
>> @{dashClassifier?}@.@{extension}@
>>
>> how do i force it to be:test.war
>>
>> <?xml version="1.0" encoding="UTF-8" ?> <project
>> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="
>> http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd
>> ">
>>
>> <modelVersion>4.0.0</modelVersion>
>>
>> <parent>
>> <groupId>com.test.id</groupId>
>> <artifactId>artifact_name</artifactId>
>> <version>1999_app</version>
>> </parent>
>>
>> <artifactId>Test</artifactId>
>> <packaging>ear</packaging>
>> <name>Test</name>
>>
>> <dependencies>
>> <dependency>
>>
>> <groupId>${project.groupId}</groupId>
>> <artifactId>test1</artifactId>
>> <type>war</type>
>> </dependency>
>> <profiles>
>> <profile>
>> <id>myapp</id>
>> <build>
>>
>> <finalName>myapp</finalName>
>> <plugins>
>>
>> <plugin>
>>
>> <groupId>org.apache.maven.plugins</groupId>
>>
>> <artifactId>maven-ear-plugin</artifactId>
>>
>> <configuration>
>>
>> <modules>
>>
>> <webModule>
>>
>> <artifactId>test1</artifactId>
>>
>>
>> <groupId>Test1</groupId>
>>
>>
>> <bundleFileName>test.war</bundleFileName>
>>
>>
>> <outputFileNameMapping>test.war</outputFileNameMapping>
>>
>>
>> <contextRoot>/myapp</contextRoot>
>>
>> </webModule>
>>
>> </modules>
>>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>> </profile>
>> </profiles>
>> </project>
>>
>> here is the log after running with -X:
>> please notice when it copy and ignoring the renaming
>>
>> [INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to
>> [test1-test21999.test-SNAPSHOT.war]
>>
>> [INFO] --- maven-ear-plugin:3.0.1:ear (default-ear) @
>> web-pserver-ear
>> ---
>> [DEBUG] Configuring mojo
>> org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear from plugin realm
>> ClassRealm[plugin>org.apache.maven.plugins:maven-ear-plugin:3.0.1, parent:
>> sun.misc.Launcher$AppClassLoader@4e25154f]
>> [DEBUG] Configuring mojo
>> 'org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear' with basic
>> configurator -->
>> [DEBUG] (f) earSourceDirectory = C:\foo\ear\src\main\application
>> [DEBUG] (f) earSourceIncludes = **
>> [DEBUG] (f) encoding = UTF-8
>> [DEBUG] (f) escapedBackslashesInFilePath = false
>> [DEBUG] (f) filtering = false
>> [DEBUG] (f) finalName =
>> web-pserver-ear-2020.vanilla-engage.1-SNAPSHOT
>> [DEBUG] (f) generatedDescriptorLocation = C:\foo\target
>> [DEBUG] (f) includeLibInApplicationXml = false
>> [DEBUG] (f) outputDirectory = C:\foo\target
>> [DEBUG] (f) outputFileNameMapping = @{groupId}@-@{artifactId}@
>> -@{version}@@{dashClassifier?}@.@{extension}@
>> [DEBUG] (f) project = MavenProject: foo-ear:1999.foo1-SNAPSHOT @
>> C:foo\ear\pom.xml
>> [DEBUG] (f) session =
>> org.apache.maven.execution.MavenSession@7569ea63
>> [DEBUG] (f) skinnyWars = false
>> [DEBUG] (f) skipClassPathModification = false
>> [DEBUG] (f) tempFolder =C:\foo\target
>> [DEBUG] (f) useJvmChmod = true
>> [DEBUG] (f) version = 7
>> [DEBUG] (f) workDirectory = C:\foo\target\foo-SNAPSHOT
>> [DEBUG] -- end configuration --
>> [DEBUG] Resolving artifact type mappings ...
>> [DEBUG] Initializing JBoss configuration if necessary ...
>> [DEBUG] Initializing ear execution context
>> [DEBUG] Resolving ear modules ...
>>
>>
>> [INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to
>> [test1-test21999.test-SNAPSHOT.war]
>>
>>
>> [INFO] Copy ear sources to C:\foo\target\foo-SNAPSHOT
>> [DEBUG] Jar archiver implementation
>> [org.codehaus.plexus.archiver.jar.JarArchiver]
>> [DEBUG] Excluding [] from the generated EAR.
>> [DEBUG] Including [**] in the generated EAR.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-ear-plugin bundleFileName don't change the name of the war
i want to bundle with the ear
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
On 04.06.20 14:17, Bram Patelski wrote:
> You can use the finalName property in the build-section of the Maven
> pom-file:
>
> <build>
> <finalName>test</finalName>
> . . .</build>
This will only change the name in target directory but not the name in
the EAR file ...
Kind regards
Karl Heinz Marbaise
>
>
> https://stackoverflow.com/questions/14488509/maven-how-to-rename-the-war-file-for-the-project
>
>
> PGP key:
> https://keys.mailvelope.com/pks/lookup?op=get&search=0xF31094A567CE732E
>
>
> On Wed, Jun 3, 2020 at 9:44 PM Meir Yanovich
> <me...@personetics.com.invalid> wrote:
>
>> im using the latest version of the maven-ear-plugin
>> i like to bundle the test.war into my ear
>> but the output is always :
>>
>> test1-test21999.test-SNAPSHOT.war
>>
>> which is always the default :
>>
>> outputFileNameMapping = @{groupId}@-@{artifactId}@-@{version}@
>> @{dashClassifier?}@.@{extension}@
>>
>> how do i force it to be:test.war
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="
>> http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
>> ">
>>
>> <modelVersion>4.0.0</modelVersion>
>>
>> <parent>
>> <groupId>com.test.id</groupId>
>> <artifactId>artifact_name</artifactId>
>> <version>1999_app</version>
>> </parent>
>>
>> <artifactId>Test</artifactId>
>> <packaging>ear</packaging>
>> <name>Test</name>
>>
>> <dependencies>
>> <dependency>
>>
>> <groupId>${project.groupId}</groupId>
>> <artifactId>test1</artifactId>
>> <type>war</type>
>> </dependency>
>> <profiles>
>> <profile>
>> <id>myapp</id>
>> <build>
>>
>> <finalName>myapp</finalName>
>> <plugins>
>> <plugin>
>>
>> <groupId>org.apache.maven.plugins</groupId>
>>
>> <artifactId>maven-ear-plugin</artifactId>
>>
>> <configuration>
>>
>> <modules>
>>
>> <webModule>
>>
>> <artifactId>test1</artifactId>
>>
>> <groupId>Test1</groupId>
>>
>>
>> <bundleFileName>test.war</bundleFileName>
>>
>>
>> <outputFileNameMapping>test.war</outputFileNameMapping>
>>
>>
>> <contextRoot>/myapp</contextRoot>
>>
>> </webModule>
>>
>> </modules>
>>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>> </profile>
>> </profiles>
>> </project>
>>
>> here is the log after running with -X:
>> please notice when it copy and ignoring the renaming
>>
>> [INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to
>> [test1-test21999.test-SNAPSHOT.war]
>>
>> [INFO] --- maven-ear-plugin:3.0.1:ear (default-ear) @ web-pserver-ear
>> ---
>> [DEBUG] Configuring mojo
>> org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear from plugin realm
>> ClassRealm[plugin>org.apache.maven.plugins:maven-ear-plugin:3.0.1, parent:
>> sun.misc.Launcher$AppClassLoader@4e25154f]
>> [DEBUG] Configuring mojo
>> 'org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear' with basic
>> configurator -->
>> [DEBUG] (f) earSourceDirectory = C:\foo\ear\src\main\application
>> [DEBUG] (f) earSourceIncludes = **
>> [DEBUG] (f) encoding = UTF-8
>> [DEBUG] (f) escapedBackslashesInFilePath = false
>> [DEBUG] (f) filtering = false
>> [DEBUG] (f) finalName =
>> web-pserver-ear-2020.vanilla-engage.1-SNAPSHOT
>> [DEBUG] (f) generatedDescriptorLocation = C:\foo\target
>> [DEBUG] (f) includeLibInApplicationXml = false
>> [DEBUG] (f) outputDirectory = C:\foo\target
>> [DEBUG] (f) outputFileNameMapping = @{groupId}@-@{artifactId}@
>> -@{version}@@{dashClassifier?}@.@{extension}@
>> [DEBUG] (f) project = MavenProject: foo-ear:1999.foo1-SNAPSHOT @
>> C:foo\ear\pom.xml
>> [DEBUG] (f) session =
>> org.apache.maven.execution.MavenSession@7569ea63
>> [DEBUG] (f) skinnyWars = false
>> [DEBUG] (f) skipClassPathModification = false
>> [DEBUG] (f) tempFolder =C:\foo\target
>> [DEBUG] (f) useJvmChmod = true
>> [DEBUG] (f) version = 7
>> [DEBUG] (f) workDirectory = C:\foo\target\foo-SNAPSHOT
>> [DEBUG] -- end configuration --
>> [DEBUG] Resolving artifact type mappings ...
>> [DEBUG] Initializing JBoss configuration if necessary ...
>> [DEBUG] Initializing ear execution context
>> [DEBUG] Resolving ear modules ...
>>
>>
>> [INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to
>> [test1-test21999.test-SNAPSHOT.war]
>>
>>
>> [INFO] Copy ear sources to C:\foo\target\foo-SNAPSHOT
>> [DEBUG] Jar archiver implementation
>> [org.codehaus.plexus.archiver.jar.JarArchiver]
>> [DEBUG] Excluding [] from the generated EAR.
>> [DEBUG] Including [**] in the generated EAR.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-ear-plugin bundleFileName don't change the name of the war
i want to bundle with the ear
Posted by Bram Patelski <br...@gmail.com>.
You can use the finalName property in the build-section of the Maven
pom-file:
<build>
<finalName>test</finalName>
. . .</build>
https://stackoverflow.com/questions/14488509/maven-how-to-rename-the-war-file-for-the-project
PGP key:
https://keys.mailvelope.com/pks/lookup?op=get&search=0xF31094A567CE732E
On Wed, Jun 3, 2020 at 9:44 PM Meir Yanovich
<me...@personetics.com.invalid> wrote:
> im using the latest version of the maven-ear-plugin
> i like to bundle the test.war into my ear
> but the output is always :
>
> test1-test21999.test-SNAPSHOT.war
>
> which is always the default :
>
> outputFileNameMapping = @{groupId}@-@{artifactId}@-@{version}@
> @{dashClassifier?}@.@{extension}@
>
> how do i force it to be:test.war
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
> ">
>
> <modelVersion>4.0.0</modelVersion>
>
> <parent>
> <groupId>com.test.id</groupId>
> <artifactId>artifact_name</artifactId>
> <version>1999_app</version>
> </parent>
>
> <artifactId>Test</artifactId>
> <packaging>ear</packaging>
> <name>Test</name>
>
> <dependencies>
> <dependency>
>
> <groupId>${project.groupId}</groupId>
> <artifactId>test1</artifactId>
> <type>war</type>
> </dependency>
> <profiles>
> <profile>
> <id>myapp</id>
> <build>
>
> <finalName>myapp</finalName>
> <plugins>
> <plugin>
>
> <groupId>org.apache.maven.plugins</groupId>
>
> <artifactId>maven-ear-plugin</artifactId>
>
> <configuration>
>
> <modules>
>
> <webModule>
>
> <artifactId>test1</artifactId>
>
> <groupId>Test1</groupId>
>
>
> <bundleFileName>test.war</bundleFileName>
>
>
> <outputFileNameMapping>test.war</outputFileNameMapping>
>
>
> <contextRoot>/myapp</contextRoot>
>
> </webModule>
>
> </modules>
>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>
> </profiles>
> </project>
>
> here is the log after running with -X:
> please notice when it copy and ignoring the renaming
>
> [INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to
> [test1-test21999.test-SNAPSHOT.war]
>
> [INFO] --- maven-ear-plugin:3.0.1:ear (default-ear) @ web-pserver-ear
> ---
> [DEBUG] Configuring mojo
> org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear from plugin realm
> ClassRealm[plugin>org.apache.maven.plugins:maven-ear-plugin:3.0.1, parent:
> sun.misc.Launcher$AppClassLoader@4e25154f]
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-ear-plugin:3.0.1:ear' with basic
> configurator -->
> [DEBUG] (f) earSourceDirectory = C:\foo\ear\src\main\application
> [DEBUG] (f) earSourceIncludes = **
> [DEBUG] (f) encoding = UTF-8
> [DEBUG] (f) escapedBackslashesInFilePath = false
> [DEBUG] (f) filtering = false
> [DEBUG] (f) finalName =
> web-pserver-ear-2020.vanilla-engage.1-SNAPSHOT
> [DEBUG] (f) generatedDescriptorLocation = C:\foo\target
> [DEBUG] (f) includeLibInApplicationXml = false
> [DEBUG] (f) outputDirectory = C:\foo\target
> [DEBUG] (f) outputFileNameMapping = @{groupId}@-@{artifactId}@
> -@{version}@@{dashClassifier?}@.@{extension}@
> [DEBUG] (f) project = MavenProject: foo-ear:1999.foo1-SNAPSHOT @
> C:foo\ear\pom.xml
> [DEBUG] (f) session =
> org.apache.maven.execution.MavenSession@7569ea63
> [DEBUG] (f) skinnyWars = false
> [DEBUG] (f) skipClassPathModification = false
> [DEBUG] (f) tempFolder =C:\foo\target
> [DEBUG] (f) useJvmChmod = true
> [DEBUG] (f) version = 7
> [DEBUG] (f) workDirectory = C:\foo\target\foo-SNAPSHOT
> [DEBUG] -- end configuration --
> [DEBUG] Resolving artifact type mappings ...
> [DEBUG] Initializing JBoss configuration if necessary ...
> [DEBUG] Initializing ear execution context
> [DEBUG] Resolving ear modules ...
>
>
> [INFO] Copying artifact [war:test1:test2:1999.test-SNAPSHOT] to
> [test1-test21999.test-SNAPSHOT.war]
>
>
> [INFO] Copy ear sources to C:\foo\target\foo-SNAPSHOT
> [DEBUG] Jar archiver implementation
> [org.codehaus.plexus.archiver.jar.JarArchiver]
> [DEBUG] Excluding [] from the generated EAR.
> [DEBUG] Including [**] in the generated EAR.
>
>