facebook

Maven4Eclipse ignores finalName when warName is set

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #352517 Reply

    rspan
    Participant

    Hi,

    It look like it isn’t possible to got a different Deploy Location or Web Context-root when the warName configuration property of plugin ‘maven-war-plugin’ is set.
    Because it always pick the warName property instead of the finalName property.

    So in this example

    myAppDev

    is ignored:

    
    <build>
            <sourceDirectory>src/main/java</sourceDirectory>
            <finalName>myAppDev</finalName>
            <resources>
                <resource>
                    <directory>src/main/java</directory>
                    <excludes>
                        <exclude>**/*.java</exclude>
                    </excludes>
                </resource>
            </resources>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>                    
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <warName>${project.artifactId} ${project.version}(${bambooBuildNumber})</warName>                    
                        <outputDirectory>D:\builds\myAppDev\</outputDirectory>                    
                    </configuration>
                </plugin>        
            </plugins>
        </build>
    

    The warName

    myAppDev_2.10(${bambooBuildNumber})

    is useless for dev deploy on the Tomcat runtime. Only the warName is used for bamboo CI.

    How is it possible to set the Web Context-root or deploy location in the project pom.xml?

    #352527 Reply

    rspan,

    Please check this link which describes how to change the context root. You can see that it is related to maven and not a MyEclipse issue. Check if Maven profiles might help you in this case.

    Please let us know if there are any MyEclipse features that are causing this problem.

    #352547 Reply

    rspan
    Participant

    Thank you.

    Setting the property

    <m2eclipse.wtp.contextRoot>MyAppDev</m2eclipse.wtp.contextRoot>

    Did the trick.

    #352548 Reply

    rspan,

    Glad that you could get it working and thanks for letting us know.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Maven4Eclipse ignores finalName when warName is set

You must be logged in to post in the forum log in