On Fri, Sep 5, 2008 at 9:23 AM, <[EMAIL PROTECTED]> wrote:

>
> On Friday 05 September 2008 [EMAIL PROTECTED] wrote:
>
> > I looked into the source code of the plugin. It uses
> > project.getActiveProfiles() and this method returns an empty list. But
> I
> > have a profile defined in settings which is set active with
> > <activeProfile>. Why does the getActiveProfiles() method returns zero?
>
> Try using the maven-help-plugin to find out some details. The goal
> help:active-profiles shows you which profiles are active.
>
> help:effective-pom and help:effective-settings show you the effective
> pom.xml resp. settings.xml file. Are your profiles defined there?
>
> You really don't need to write your own plugin just for filtering some
> resource-files.
>
> hth,
> - martin
>
> [Winter, Wolfgang] help:active-profiles executed on the parent pom:
> Active Profiles for Project 'net.atos.wlp:core:pom:0.0.1-SNAPSHOT':
> There are no active profiles.
> Active Profiles for Project
> 'net.atos.wlp:plugin-setproperties:maven-plugin:0.0.1-SNAPSHOT':
> There are no active profiles.
> Active Profiles for Project
> 'net.atos.wlp:core-database:jar:0.0.1-SNAPSHOT':
> There are no active profiles.
> ...
>
> Profiles are configured in the users/settings.xml so help:effective-pom
> gives no information about profiles
>
> Execution of help:effective-settings: The workaround story continues:
> [ERROR] org.apache.maven.plugins.help.EffectiveSettingsMojo#execute()
> caused a linkage error (java.lang.NoSuchMethodError). Check the realms:
>
> NOTE:
> Plugin realm is:
> /plugins/org.apache.maven.plugins:maven-help-plugin:[EMAIL 
> PROTECTED]/thread:main
> Container realm is: plexus.core
>
> Realm ID:
> /plugins/org.apache.maven.plugins:maven-help-plugin:[EMAIL 
> PROTECTED]/thread:main
> urls[0] =
> file:/D:/projekte/maven-repository/org/apache/maven/plugins/maven-help-p
> lugin/2.1/maven-help-plugin-2.1.jar
> urls[1] =
> file:/D:/projekte/maven-repository/org/codehaus/plexus/plexus-utils/1.5.
> 6/plexus-utils-1.5.6.jar
> urls[2] =
> file:/D:/projekte/maven-repository/junit/junit/3.8.1/junit-3.8.1.jar
> urls[3] =
> file:/D:/projekte/maven-repository/org/apache/maven/wagon/wagon-http-sha
> red/1.0-beta-2/wagon-http-shared-1.0-beta-2.jar
> urls[4] =
> file:/D:/projekte/maven-repository/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug
> 2000r7-dev.jar
> urls[5] =
> file:/D:/projekte/maven-repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0
> .b2.jar
> urls[6] =
> file:/D:/projekte/maven-repository/org/apache/maven/maven-error-diagnost
> ics/2.0.6/maven-error-diagnostics-2.0.6.jar
> urls[7] =
> file:/D:/projekte/maven-repository/org/apache/maven/maven-plugin-registr
> y/2.0.6/maven-plugin-registry-2.0.6.jar
> urls[8] =
> file:/D:/projekte/maven-repository/org/apache/maven/wagon/wagon-ssh-comm
> on/1.0-beta-2/wagon-ssh-common-1.0-beta-2.jar
> urls[9] =
> file:/D:/projekte/maven-repository/org/apache/maven/plugin-tools/maven-p
> lugin-tools-api/2.4.3/maven-plugin-tools-api-2.4.3.jar
> urls[10] = file:/D:/projekte/maven-repository/jdom/jdom/1.0/jdom-1.0.jar
> urls[11] =
> file:/D:/projekte/maven-repository/com/thoughtworks/xstream/xstream/1.3/
> xstream-1.3.jar
> urls[12] =
> file:/D:/projekte/maven-repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.
> jar
> urls[13] =
> file:/D:/projekte/maven-repository/commons-lang/commons-lang/2.4/commons
> -lang-2.4.jar
>
> Realm ID: plexus.core
>
>
>
> java.lang.NoSuchMethodError:
> org.apache.maven.settings.Settings.getRuntimeInfo()Lorg/apache/maven/set
> tings/RuntimeInfo;
>        at
> org.apache.maven.plugins.help.EffectiveSettingsMojo.copySettings(Effecti
> veSettingsMojo.java:189)
>        at
> org.apache.maven.plugins.help.EffectiveSettingsMojo.execute(EffectiveSet
> tingsMojo.java:89)
>        at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:579)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> Failures(DefaultLifecycleExecutor.java:498)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentFo
> rProject(DefaultLifecycleExecutor.java:265)
> ...
>
> By the way, the settings.xml contains this:
>   <profile>
>     <id>jboss</id>
>     <activation>
>        <activeByDefault/>


You need to change this to

  <activeByDefault>true</activeByDefault>

as

assert "true".equalsIgnoreCase("") == false;


>     </activation>
>     <properties>
>            <dbdriver>oracle.jdbc.driver.OracleDriver</dbdriver>
>            <dbuser>ing_epa</dbuser>
>            <dbpassword>ing_epa</dbpassword>
>            <dburl>jdbc:oracle:thin:@deneb:1521:WLP</dburl>
>                ...
>     </properties>
>   </profile>
>  </profiles>
>
>  <activeProfiles>
>        <activeProfile>jboss</activeProfile>
>  </activeProfiles>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to