hi,

I think this might help...
http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html


Santosh

On Sun, Mar 15, 2009 at 7:01 PM, Roman Kournjaev <[email protected]>wrote:

> Hi Folks
>
> I just wanted to be sure that im not somekind of stuipid or so
> I have the following lines of code
>
>    private static final ArrayList<Class<? extends SchemaElement>> tabItems
> = new ArrayList<Class<? extends SchemaElement>>();
>
>    static{
>        tabItems.addAll((Collection<? extends Class<? extends
> SchemaElement>>)
>                Arrays.asList(new Class[]{BuildProfile.class}));
>    }
>
> Well it seems to compile ok with the regular java 1.6 compiler.
>
> I am trying the same trough maven with the following compiler conifguration
>
>               <plugin>
>                    <groupId>org.apache.maven.plugins</groupId>
>                    <artifactId>maven-compiler-plugin</artifactId>
>                    <version>2.0.2</version>
>                    <configuration>
>                        <source>1.6</source>
>                        <target>1.6</target>
>                    </configuration>
>                </plugin>
>
> well the error is that it is of a *inconvertible types*
>
> i had to change it to
>
>    private static final ArrayList<Class> tabItems = new ArrayList<Class>();
>
>    static{
>        tabItems.addAll((Collection<Class>) Arrays.asList(new
> Class[]{BuildProfile.class}));
>    }
>
> to make it compile.
>
> Any ideas why that ?
>
>
> Thanks in advance.
> Roman
>



-- 
Santosh Patel

Reply via email to