You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by poroto20 <po...@gmail.com> on 2014/03/20 13:16:45 UTC

contextRoot is set by default when specified in profile

Using the EAR plugin, if I specify the context root in the EAR's pom it
works. But if I specify the contextRoot in a profile (in its parent pom), it
sets the contextRoot by default (articleId).

Am I doing something wrong?

This is a piece of code for the EAR's pom:


<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-ear-plugin</artifactId>
				<version>2.9</version>
				<configuration>
.........
                                <modules>
                        <webModule>
							<groupId>fuseim</groupId>
							<artifactId>xstreamline3-webservice</artifactId>
							<contextRoot>/data</contextRoot>
							<bundleDir>/</bundleDir>
						</webModule>
                    </modules>
					<version>5</version>
				</configuration>

			</plugin>


And this is a piece of code in the EAR's parent pom:


<profile>
			<id>jboss6</id>
			<properties>
				<jboss.version>6</jboss.version>
                <packagingExcludes.data>**/*.jar</packagingExcludes.data>
			</properties>
            <build> 
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>2.9</version>
                    <configuration>
                    <modules>
                        <webModule>
							<groupId>fuseim</groupId>
							<artifactId>xstreamline3-webservice</artifactId>
							<contextRoot>/data</contextRoot>
							<bundleDir>/</bundleDir>
						</webModule>
                    </modules>
                    </configuration>
                </plugin>
            </plugins>
            </build>
		</profile>


Please help me.
Thx





--
View this message in context: http://maven.40175.n5.nabble.com/contextRoot-is-set-by-default-when-specified-in-profile-tp5788934.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: contextRoot is set by default when specified in profile

Posted by poroto20 <po...@gmail.com>.
It was my mistake. I wanted to exclude a web module by using a profile and it
did not work. But I could fix it using combine.children="append". So I
basically I added an extra web module in my profile using:

<plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>2.9</version>
                    <configuration>
                    <modules combine.children="append">
                        <webModule>
							<groupId>fuseim</groupId>
							<artifactId>xstreamline3-webservice</artifactId>
							<contextRoot>/data</contextRoot>
							<bundleDir>/</bundleDir>
						</webModule>
                    </modules>
                    </configuration>
                </plugin>
            </plugins>

Thank you for your help



--
View this message in context: http://maven.40175.n5.nabble.com/contextRoot-is-set-by-default-when-specified-in-profile-tp5788934p5788947.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: contextRoot is set by default when specified in profile

Posted by poroto20 <po...@gmail.com>.
I am running:

mvn clean install -P jboss6

I think tt is using the correct profile because it is adding the web module
to application.xml, only that it is using the wrong contextRoot



--
View this message in context: http://maven.40175.n5.nabble.com/contextRoot-is-set-by-default-when-specified-in-profile-tp5788934p5788943.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: contextRoot is set by default when specified in profile

Posted by Jörg Schaible <jo...@swisspost.com>.
Hi,

poroto20 wrote:

> Using the EAR plugin, if I specify the context root in the EAR's pom it
> works. But if I specify the contextRoot in a profile (in its parent pom),
> it sets the contextRoot by default (articleId).
> 
> Am I doing something wrong?

And what do you do to activate the profile?

> 
> This is a piece of code for the EAR's pom:
> 
> 
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-ear-plugin</artifactId>
> <version>2.9</version>
> <configuration>
> .........
>                                 <modules>
>                         <webModule>
> <groupId>fuseim</groupId>
> <artifactId>xstreamline3-webservice</artifactId>
> <contextRoot>/data</contextRoot>
> <bundleDir>/</bundleDir>
> </webModule>
>                     </modules>
> <version>5</version>
> </configuration>
> 
> </plugin>
> 
> 
> And this is a piece of code in the EAR's parent pom:
> 
> 
> <profile>
> <id>jboss6</id>
> <properties>
> <jboss.version>6</jboss.version>
>                 <packagingExcludes.data>**/*.jar</packagingExcludes.data>
> </properties>
>             <build>
>             <plugins>
>                 <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-ear-plugin</artifactId>
>                     <version>2.9</version>
>                     <configuration>
>                     <modules>
>                         <webModule>
> <groupId>fuseim</groupId>
> <artifactId>xstreamline3-webservice</artifactId>
> <contextRoot>/data</contextRoot>
> <bundleDir>/</bundleDir>
> </webModule>
>                     </modules>
>                     </configuration>
>                 </plugin>
>             </plugins>
>             </build>
> </profile>
> 
> 
> Please help me.
> Thx
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/contextRoot-is-set-by-default-when-specified-in-profile-tp5788934.html
> Sent from the Maven - Users mailing list archive at Nabble.com.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org