Solved

Maven Profile, including different jar in different environment

Posted on 2010-08-30
1
414 Views
Last Modified: 2012-06-21
I have following profile defined in pom.xml. If I want some jar file, a.jar for example, to be activated in this profile which it would be skipped in other profile, how to write in pom.xml file?
<project>

  ...

  <profiles>

    <profile>

      <id>appserverConfig-dev</id>

      <activation>

        <property>

          <name>env</name>

          <value>dev</value>

        </property>

      </activation>

  </profile>

...

</project>

Open in new window

0
Comment
Question by:JianJunShen
1 Comment
 
LVL 11

Accepted Solution

by:
Manish earned 500 total points
ID: 33557413
I am not sure about it.
I have following entry in my pom, you have to check for yourself.

<profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>my.groupid</groupId>
                                            <artifactId>my-service</artifactId>
                                            <type>war</type>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>target</outputDirectory>
                                            <destFileName>my-service.war</destFileName>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
what is the difference between "sudo su" and "su - root" 6 104
Securing Jmx Console and web console 2 64
github account with ecipse 1 42
MySQL  on Tomcat 8 26
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now