facebook

How to run profiles within POM in MyEclipse

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

    Hi,

    I m trying to run a profile created in my POM

    <profile>
    <id>generate</id>
    <build>
    <plugins>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>axistools-maven-plugin</artifactId>
    <version>1.3</version>
    <configuration>
    <sourceDirectory>src/main/resources</sourceDirectory>
    <outputDirectory>src/main/java</outputDirectory>
    <serverSide>false</serverSide>
    <testCases>false</testCases>
    </configuration>
    <executions>
    <execution>
    <goals>
    <goal>wsdl2java</goal>
    </goals>
    </execution>
    </executions>
    </plugin>

    </plugins>

    </build>
    </profile>

    How do I run my profile?

    I see an option on IntelliJ with the new profile ID created. Is there a place in Eclipse IDE where I can run this one or do I have to run it from the command line only?

    Please let me know.

    Thanks,
    Phani

    #316537 Reply

    deeeed
    Member

    Did you find out how to do it?
    I have the exact same issue, I can run my profile through the command line but not via myeclipse.
    I added my profile into my project preferences into the Maven4Myeclipse config.

    #316562 Reply

    support-swapna
    Moderator

    deeeed,

    Here are some threads which discuss this issue in Eclipse. Please work on the same lines in MyEclipse:

    http://maven.40175.n5.nabble.com/Activating-Maven-Profiles-inside-Eclipse-using-m2Eclipse-td134139.html
    http://maven.apache.org/pom.html#Activation

    Let me know how this works for you.

    #316621 Reply

    trant
    Participant

    @support-swapna wrote:

    deeeed,

    Here are some threads which discuss this issue in Eclipse. Please work on the same lines in MyEclipse:

    http://maven.40175.n5.nabble.com/Activating-Maven-Profiles-inside-Eclipse-using-m2Eclipse-td134139.html
    http://maven.apache.org/pom.html#Activation

    Let me know how this works for you.

    i tried this but it doesn’t work.

    In my pom.xml I have specified a profiles section:

    
      <profiles>
        <profile>    
          <id>dev</id>
          <activation>
            <activeByDefault/>
          </activation>
          <properties>
            <env>dev</env>
            <weblogic.host.name>localhost</weblogic.host.name>
            <weblogic.port>7001</weblogic.port>
            <weblogic.protocol>http</weblogic.protocol>
            <weblogic.user>weblogic</weblogic.user>
            <weblogic.password>weblogic</weblogic.password>
            <weblogic.target>base_domain</weblogic.target>        
          </properties>
        </profile>
      </profiles>
    

    Then I right-click my pom.xml, choose Run as, run configurations and then I see there is a goals textbox and a profiles textbox. in profiles i simply type “dev”

    However I get this error when I hit Apply and then Run:

    [WARNING] The requested profile “dev” could not be activated because it does not exist.

    What did I do wrong?

    #316676 Reply

    trant
    Participant

    Ok I got it working now – all is well!

    #316685 Reply

    support-swapna
    Moderator

    trant,

    Glad that it is working.
    Do let us know if you have any other issues.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: How to run profiles within POM in MyEclipse

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

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