profile « Development « Maven/Ant Q&A

Home
Maven/Ant Q&A
1.Ant
2.artifact
3.dependency
4.deploy
5.Development
6.eclipse
7.glassfish
8.hudson
9.integration
10.jetty
11.junit
12.m2eclipse
13.module
14.netbeans
15.package
16.plugin
17.POM
18.repository
19.svn
Maven/Ant Q&A » Development » profile 

1. jtds No Suitable Driver Exception when running a maven built project    stackoverflow.com

We have a simple spring-hibernate application(console app) where in we have set the classpath in manifest file of the executable jar file. And the app connects to the database using jtds ...

2. Complex profiles in maven    stackoverflow.com

I've been looking at profiles in maven for selecting different sets of dependencies. This is fine when you want to build say a debug build differently from a release build. My ...

3. How to toggle between one maven profile and another?    stackoverflow.com

If I have a maven profile activated by the presence of a property, how can I define another profile that is only activated when the other profile is not activated? e.g.

  ...

4. Available Maven Profiles    stackoverflow.com

Is there an easy way to figure out, preferably from the command line, what profiles are available for a particular project. I've got a big, multi-module project I'm trying to figure ...

5. Are lots of inheritied single-plugin profiles in Maven a good idea?    stackoverflow.com

In our infrastructure, we have lots of little Java projects built by Maven2. Each project has its own pom.xml that ultimately inherits from our one company "master" parent pom. We've recently started ...

6. Use an alternative Maven Profile during test phase    stackoverflow.com

I'm trying to build an application starting from an Appfuse Archetype, but I get some strange problems. For once I'd like to use a hsqldb for automated unit tests and integration ...

7. Can I make one maven profile activate another?    stackoverflow.com

I have 2 maven2 profiles, selenium and jspc. Now for "selenium" id'd like to have an implicit activation of "jspc", so that I don't have to write mvn -Pselenium,jspc from the ...

8. Cannot get maven2 profiles to work    stackoverflow.com

I have defined the following profile in pom.xml:

  <profiles>
 <profile>
   <id>dev</id>
   <build>
  <plugins>
    <plugin>
   <artifactId>maven-antrun-plugin</artifactId>
   <executions>
   ...

9. Activate Maven profile if no other profile activated    stackoverflow.com

I have a project that has several profiles. How do you make one of the profiles activate only if no other profiles are active?

10. Maven - Profiling web applications    stackoverflow.com

I was wondering if anyone has found any plugins that attach a profiler to a JVM to automatically monitor performance during a unit or integration test. I would like to ...

11. Maven - activate child profile based on property    stackoverflow.com

Scenario:

  1. Given
    1. Parent POM which defines a profile and a child (as module)
    2. Child project(s) that will be using the profile by referring to the parent POM.
  2. The intent is to skip profile ...

12. Maven - Can I reference profile id in profile definition?    stackoverflow.com

In pom.xml I have set o profiles like this:

<profile>
<id>profileId1</id>
    <build>
        <filters>
           ...

13. Conditional Maven build section with a profile?    stackoverflow.com

I'm building a Flex application with Maven and the Flex Mojos plugin. I now want to compile an alternative version of the application with some extra libraries to enable automated functional ...

14. Maven2: is there a way to make the build fail in case of unknown profile parameter?    stackoverflow.com

We have three different maven2 profiles: prod, dev and test. One should be able to build with either one of those three profiles, or without any profile. In other words, following ...

15. Maven2 Custom Profile For Testing    stackoverflow.com

I want to create a custom profile for in my Maven2 pom.xml file to isolate test-related dependencies and settings, using the surefire plugin, but am somewhat confused by the documentation. Ultimately, ...

16. reference maven value in profile    stackoverflow.com

 <profile>
        <id>test</id>
        <activation>
          <property>
    ...

17. Why can't I activate a Maven2 profile from another profile?    stackoverflow.com

I have a multimodule Maven2 project which builds a web application. The application is connected to a backend server and a DB. There are several server instances deployed in our environment, ...

18. How to set up Maven to override a settings file for another when running a test?    stackoverflow.com

See the following Maven generated project

target
    classes
    test-classes
src
    main
        java
      ...

19. Meta-profiles in Maven    stackoverflow.com

I'm looking for a way to create meta-profiles that just activate sub-profiles in Maven. Let's take a very concrete example. I have the following profiles:

  • "server-jboss"
  • "server-tomcat"
  • "database-hsql"
  • "database-oracle"
To build the project, you have to ...

20. Maven Change a value in a file based on profile    stackoverflow.com

I have a properties file called ApplicationResources.properties in my application with a property that changes depending on the environment. Let us say the property is:

     resources.location=/home/username/resources
and this ...

21. Make Maven Proxy/Server settings configurable based on location?    stackoverflow.com

So I'm not sure what the best way to accomplish this is, but basically I have a laptop that I use at work for Maven projects. It works fine when ...

22. Maven Embedder - getting a list of profiles    stackoverflow.com

How do I get a list of all the profiles for a project in maven inside of a maven plugin? Would it be:

MavenEmbedder.readModel(new File("path to pom.xml")).getProfiles();
Walter

23. Maven: Customize web.xml of web-app project    stackoverflow.com

I have a web application Maven project, and I want to customize the web.xml file depending on the Profile that is running. I am using the Maven-War-plugin, which allows me to ...

24. Inheriting Maven profiles    stackoverflow.com

Is it possible for a child POM to inherit profiles defined in the parent POM? If so, how?

25. Profiling maven web application with JProfiler    stackoverflow.com

I know I can profile my application with JProfiler using ANT target. Is there a way to do the same with maven??
Actually maven allows to run ant targets, using maven-ant plugin, ...

26. How can I change a .properties file in maven depending on my profile?    stackoverflow.com

How can I change a .properties file in maven depending on my profile? Depending on whether the application is built to run on a workstation or the datacenter parts of ...

27. Maven build for different profiles    stackoverflow.com

We're trying to migrate from current Ant build to Maven. In the current project, we've different properites files for each of the env say
qa.properties, prod.properties & dev.properties. The property values present in ...

28. Use maven profiles for developer sandbox settings?    stackoverflow.com

I've seen several projects where I work that use profiles.xml and various {username}.properties in the project for developer sandbox settings like the deployment directory for the deploy script, the ports to ...

29. Maven 3 Profile Properties - enhancement or bug?    stackoverflow.com

In Maven 2, I was able to set profile properties like these:

<profiles>
    <profile>
        <id>test</id>
        ...

30. Can Maven profiles be defined in different files?    stackoverflow.com

Ive got a Maven project ive inherited which has no profiles setup, however I need to set different different profiles for dev/int/staging etc. From what ive read I can put in profile ...

31. Maven profiles and install    stackoverflow.com

If I have Maven builds set up for an app with profiles set up for different environments (say like prod vs. dev, defining different DB settings and stuff like that) the ...

32. Using maven profiles to control build execution    stackoverflow.com

I need to modify the maven build for a large project to skip certain steps during typical development builds (i.e. don't build the *-source.jar files). I've searched for "conditional execution" ...

33. Maven 3 parallel builds profile    stackoverflow.com

Is there a way to configure parallel build in Maven 3 without adding any command line options (e.g. configure a profile in settings.xml)?

34. How to specify active profiles in Maven3    stackoverflow.com

Our application consists of various active profiles (say A1, A2, A3, A5 ...) which were separately defined in a profiles.xml file. Maven 3 expects all the profile information to be stored ...

35. Is it possible to execute multiple release:perform with diferent profiles without having to execute release:prepare again?    stackoverflow.com

I have a POM file for a project that defines different classifiers for a project depending on the environment (test, production, development). I would like to execute one time release:prepare and ...

36. Maven Build multiple profiles in one go    stackoverflow.com

It is our policy to only build 1 deployable jar. all environment-specific configurations are kept separate, and we build them all together at once. so under our current Ant process, we ...

37. using maven variables defined in two separate profiles    stackoverflow.com

I have two profiles in my pom.xml, dev and stage:

<profiles>
    <profile>
        <id>dev</id>
        <properties>
  ...

38. How to time the different stages of maven execution    stackoverflow.com

I have a maven build that is extremely slow. I would like to know whether there is a way to profile maven execution in order to find out which are the ...

39. how to time (profile) maven goals in a multi-module project    stackoverflow.com

We have a huge project with many submodules. A full build takes currently over 30mins. I wonder how this time distributes over different plugins/goals, e.g. tests, static analysis (findbugs, pmd, checkstyle, etc ...

40. How to override configuration of maven-compiler-plugin. (build directory, I want to change by using profile)    stackoverflow.com

I want to ignore some build errors at a specific directory by using maven's profile. I tried to do like below but it did not work. Any help will be appreciated?

============================================
[executed ...

41. How to keep Maven profiles which are activeByDefault active even if another profile gets activated?    stackoverflow.com

I have a profile in my pom.xml which should be always active unless it is explicitely deactivated (-P !firstProfile). I solved this by using the activeByDefault flag:

<profiles>
  <profile>
    ...

42. automatically activates a profile when another is actived    stackoverflow.com

I know it's impossible to "chain" profile declaration. It's possible to do what I want (but not completely) with System properties in command line like mvn -Dvar=value . And then use this:

  ...

43. Activation of maven profile based on multiple properties    stackoverflow.com

I am creating a maven 2 build for a project and I came up with profiles since the build has to be created for both different locations (say Berlin, Paris, North ...

44. active a profile during release prepare in maven 3 does not work    stackoverflow.com

I have a need to active a profile during release:prepare.

    <build>

    <plugins>           
  ...

45. How to activate profile by means of maven property?    stackoverflow.com

I'm trying to activate a maven profile using a property defined inside pom.xml:

<project>
  [...]
  <properties>
    <run.it>true</run.it>
  </properties>
  [...]
  <profiles>
    <profile>
 ...

46. How to properly set up multi profile maven project?    stackoverflow.com

Hey, I'm talking about profiles within pom.xml of a project. Could please anybody explain to me, why if I have 2 profiles in pom definition and I run test phase from ...

47. Active profile ignored by maven-release-plugin in multi-module build    stackoverflow.com

I have a multi-module maven build that requires a profile to be activated only on demand using the -P flag. But for some reason it is being ignored when doing a ...

48. Error starting equinox from maven with pax-runner and equinox.ds profile    stackoverflow.com

I'm currently setting up a development environment for osgi bundles. I use maven 2 for building all my bundles using a multi project layout. Finally the bundles should be deployed to an ...

49. Profiling Maven    stackoverflow.com

Are there tools that will profile the Maven build process itself so that I can see where the build is spending most time? We're having issues at work with respect to Maven ...

50. Activating a profile by default    stackoverflow.com

I'm using Maven 3.0.3. I need to define a variable in my script ("env"). I have a section in my pom in which I define the variable per ...

51. Is it possible to configure maven to use a proxy when on certain networks?    stackoverflow.com

Does anyone know if it is possible to conditionally enable a proxy configuration in Maven when the host running Maven is on a certain network? The scenario is this, if I'm on ...

52. Maven: Only activate profile A if profile B is not activated?    stackoverflow.com

I have to Maven profiles profile-A and profile-B. "B" should only be activated if "A" is not activated. So if I would call

mvn install
profile-B is executed (but not profile-A). But if I ...

53. Maven: include resource file based on profile    stackoverflow.com

I'm converting an Ant webapp project over to Maven. I have most of it working, but I'm stuck trying to figure out how to copy some resource files from different sources ...

54. Builds for different platforms the Maven way    stackoverflow.com

I have a project with a submodule a:jar which needs a different set of dependencies, depending for which platform it is compiled. The code is the same for all platforms. E.g. ...

55. Different cargo.run profiles in maven2 (Java / Hippo)    stackoverflow.com

I'm trying to setup our build/deploy process for a project that uses Hippo, a Java / JCR CMS. The deployment strategy we want to achieve is:

  1. Local development: use the ...

56. How to detect what maven profiles are activated?    stackoverflow.com

I use a very complex maven project and I would like to know what maven profiles are activated when I do mvn install. How to find this out?

57. Can a maven profile inherit from another maven profile?    stackoverflow.com

I have two profiles that are nearly identical. Rather than duplicating the configuration in each, I'd like for one profile to "inherit" from the other, but I don't see an ...

58. Maven: Different property files for different profiles    stackoverflow.com

I'm using different maven profiles to deploy my application to different environments. (With the weblogic-maven-plugin, but I think this is not important) In the application I use Spring Web Services. Now I'd ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.