You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Stephane Nicoll <st...@gmail.com> on 2009/02/21 12:47:02 UTC

plexus configuration bug?

Hey,
I am upgrading the EAR plugin according to a nice patch that we've received
(MEAR-102). In order to ease the config, I have changed it a bit so that we
can use nested elements for the JBoss loader repository config.

I end with this in my POM:

<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>@project.version@</version>
        <configuration>
            <jboss>
              <version>5</version>
              <loader-repository loaderRepositoryClass="def">
                abc
                <loader-repository-config configParserClass="jkl">
                  ghi
                </loader-repository-config>
              </loader-repository>
            </jboss>
        </configuration>
      </plugin>
    </plugins>
  </build>

Running maven in debug mode on this pom shows the following

[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-ear-plugin:2.3.2-SNAPSHOT:ear' -->
[DEBUG]   (f) earSourceDirectory =
/Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/
project-052/src/main/application
[DEBUG]   (f) earSourceIncludes = **
[DEBUG]   (f) encoding = UTF-8
[DEBUG]   (f) escapedBackslashesInFilePath = false
[DEBUG]   (f) filtering = false
[DEBUG]   (f) finalName = maven-ear-plugin-test-project-052-99.0
[DEBUG]   (f) generatedDescriptorLocation =
/Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/
projects/project-052/target
[DEBUG]   (f) jboss = <jboss>
 <version>5</version>
 <loader-repository>
  <loader-repository-config
configParserClass="jkl">ghi</loader-repository-config>
 </loader-repository>
</jboss>

[DEBUG]   (f) manifestFile =
/Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/projec
t-052/src/main/application/META-INF/MANIFEST.MF
[DEBUG]   (f) outputDirectory =
/Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/pro
ject-052/target
[DEBUG]   (f) project = MavenProject:
ear:maven-ear-plugin-test-project-052:99.0 @
/Users/snicoll/projects/maven2-plugin
s/maven-ear-plugin/target/test-classes/projects/project-052/pom.xml
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@20cbef
[DEBUG]   (f) workDirectory =
/Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/proje
ct-052/target/maven-ear-plugin-test-project-052-99.0
[DEBUG] -- end configuration --

The loader repository element value is gone. The repository class attribute
as well.

In the project this element is injected with a PlexusConfiguration and I am
using org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1

The weird thing is that it does not happen all the time, e.g. I have other
nested config that works fine.

Any idea?
S.

-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you
suck" -- S.Yegge

Re: plexus configuration bug?

Posted by Jason van Zyl <jv...@sonatype.com>.
For 2.x.x you can't use the new container so we would have to patch  
the branched version. Make a test case and I'll look at it.

On 21-Feb-09, at 6:59 AM, Stephane Nicoll wrote:

> same thing with the latest version btw (1.0-beta-3.0.5).
>
> S.
>
> On Sat, Feb 21, 2009 at 12:47 PM, Stephane Nicoll <stephane.nicoll@gmail.com
>> wrote:
>
>> Hey,
>> I am upgrading the EAR plugin according to a nice patch that we've  
>> received
>> (MEAR-102). In order to ease the config, I have changed it a bit so  
>> that we
>> can use nested elements for the JBoss loader repository config.
>>
>> I end with this in my POM:
>>
>> <build>
>>    <plugins>
>>      <plugin>
>>        <groupId>org.apache.maven.plugins</groupId>
>>        <artifactId>maven-ear-plugin</artifactId>
>>        <version>@project.version@</version>
>>        <configuration>
>>            <jboss>
>>              <version>5</version>
>>              <loader-repository loaderRepositoryClass="def">
>>                abc
>>                <loader-repository-config configParserClass="jkl">
>>                  ghi
>>                </loader-repository-config>
>>              </loader-repository>
>>            </jboss>
>>        </configuration>
>>      </plugin>
>>    </plugins>
>>  </build>
>>
>> Running maven in debug mode on this pom shows the following
>>
>> [DEBUG] Configuring mojo
>> 'org.apache.maven.plugins:maven-ear-plugin:2.3.2-SNAPSHOT:ear' -->
>> [DEBUG]   (f) earSourceDirectory =
>> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test- 
>> classes/projects/
>> project-052/src/main/application
>> [DEBUG]   (f) earSourceIncludes = **
>> [DEBUG]   (f) encoding = UTF-8
>> [DEBUG]   (f) escapedBackslashesInFilePath = false
>> [DEBUG]   (f) filtering = false
>> [DEBUG]   (f) finalName = maven-ear-plugin-test-project-052-99.0
>> [DEBUG]   (f) generatedDescriptorLocation =
>> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test- 
>> classes/
>> projects/project-052/target
>> [DEBUG]   (f) jboss = <jboss>
>> <version>5</version>
>> <loader-repository>
>>  <loader-repository-config
>> configParserClass="jkl">ghi</loader-repository-config>
>> </loader-repository>
>> </jboss>
>>
>> [DEBUG]   (f) manifestFile =
>> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test- 
>> classes/projects/projec
>> t-052/src/main/application/META-INF/MANIFEST.MF
>> [DEBUG]   (f) outputDirectory =
>> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test- 
>> classes/projects/pro
>> ject-052/target
>> [DEBUG]   (f) project = MavenProject:
>> ear:maven-ear-plugin-test-project-052:99.0 @
>> /Users/snicoll/projects/maven2-plugin
>> s/maven-ear-plugin/target/test-classes/projects/project-052/pom.xml
>> [DEBUG]   (f) session =  
>> org.apache.maven.execution.MavenSession@20cbef
>> [DEBUG]   (f) workDirectory =
>> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test- 
>> classes/projects/proje
>> ct-052/target/maven-ear-plugin-test-project-052-99.0
>> [DEBUG] -- end configuration --
>>
>> The loader repository element value is gone. The repository class  
>> attribute
>> as well.
>>
>> In the project this element is injected with a PlexusConfiguration  
>> and I am
>> using org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9- 
>> stable-1
>>
>> The weird thing is that it does not happen all the time, e.g. I  
>> have other
>> nested config that works fine.
>>
>> Any idea?
>> S.
>>
>> --
>> Large Systems Suck: This rule is 100% transitive. If you build one,  
>> you
>> suck" -- S.Yegge
>>
>
>
>
> -- 
> Large Systems Suck: This rule is 100% transitive. If you build one,  
> you
> suck" -- S.Yegge

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
----------------------------------------------------------

the course of true love never did run smooth ...

  -- Shakespeare


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


Re: plexus configuration bug?

Posted by Stephane Nicoll <st...@gmail.com>.
same thing with the latest version btw (1.0-beta-3.0.5).

S.

On Sat, Feb 21, 2009 at 12:47 PM, Stephane Nicoll <stephane.nicoll@gmail.com
> wrote:

> Hey,
> I am upgrading the EAR plugin according to a nice patch that we've received
> (MEAR-102). In order to ease the config, I have changed it a bit so that we
> can use nested elements for the JBoss loader repository config.
>
> I end with this in my POM:
>
> <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-ear-plugin</artifactId>
>         <version>@project.version@</version>
>         <configuration>
>             <jboss>
>               <version>5</version>
>               <loader-repository loaderRepositoryClass="def">
>                 abc
>                 <loader-repository-config configParserClass="jkl">
>                   ghi
>                 </loader-repository-config>
>               </loader-repository>
>             </jboss>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
>
> Running maven in debug mode on this pom shows the following
>
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-ear-plugin:2.3.2-SNAPSHOT:ear' -->
> [DEBUG]   (f) earSourceDirectory =
> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/
> project-052/src/main/application
> [DEBUG]   (f) earSourceIncludes = **
> [DEBUG]   (f) encoding = UTF-8
> [DEBUG]   (f) escapedBackslashesInFilePath = false
> [DEBUG]   (f) filtering = false
> [DEBUG]   (f) finalName = maven-ear-plugin-test-project-052-99.0
> [DEBUG]   (f) generatedDescriptorLocation =
> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/
> projects/project-052/target
> [DEBUG]   (f) jboss = <jboss>
>  <version>5</version>
>  <loader-repository>
>   <loader-repository-config
> configParserClass="jkl">ghi</loader-repository-config>
>  </loader-repository>
> </jboss>
>
> [DEBUG]   (f) manifestFile =
> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/projec
> t-052/src/main/application/META-INF/MANIFEST.MF
> [DEBUG]   (f) outputDirectory =
> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/pro
> ject-052/target
> [DEBUG]   (f) project = MavenProject:
> ear:maven-ear-plugin-test-project-052:99.0 @
> /Users/snicoll/projects/maven2-plugin
> s/maven-ear-plugin/target/test-classes/projects/project-052/pom.xml
> [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@20cbef
> [DEBUG]   (f) workDirectory =
> /Users/snicoll/projects/maven2-plugins/maven-ear-plugin/target/test-classes/projects/proje
> ct-052/target/maven-ear-plugin-test-project-052-99.0
> [DEBUG] -- end configuration --
>
> The loader repository element value is gone. The repository class attribute
> as well.
>
> In the project this element is injected with a PlexusConfiguration and I am
> using org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
>
> The weird thing is that it does not happen all the time, e.g. I have other
> nested config that works fine.
>
> Any idea?
> S.
>
> --
> Large Systems Suck: This rule is 100% transitive. If you build one, you
> suck" -- S.Yegge
>



-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you
suck" -- S.Yegge