You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by supareno <re...@free.fr> on 2008/01/12 15:59:22 UTC
Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed
Hello guys
i read the previous threads about exclusion with interest
because i am always confronted with the "excludes" problem
i followed all the steps:
changed my settings.xml to enable snapshot plugin repositories...
(http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
everything is working except the "excludes" tag
my pom.xml looks like this:
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<excludes>**/*.xsd</excludes>
<schemaDirectory>src/main/resources/xml</schemaDirectory>
</configuration>
</execution>
</executions>
</plugin>
...
and when i run maven with the following command:
mvn -Papache package
i've got this exception!
...
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT
(found static expression: '**/*.xsd' which may act as a default value).
Cause: Cannot assign configuration entry 'excludes' to 'class
[Ljava.lang.String;' from '**/*.xsd', which is of type class
java.lang.String
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
...
do i forget something during my builds??
regards
supareno
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed
Posted by Jochen Wiedmann <jo...@gmail.com>.
On Jan 12, 2008 3:59 PM, supareno <re...@free.fr> wrote:
> [INFO] Failed to configure plugin parameters for:
> org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT
>
> (found static expression: '**/*.xsd' which may act as a default value).
Configuration problem on your side, use
<excludes>
<exclude>**/*.xsd</exclude>
</excludes>
Jochen
--
Look, that's why there's rules, understand? So that you think before
you break 'em.
-- (Terry Pratchett, Thief of Time)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed
Posted by Dennis Lundberg <de...@apache.org>.
The excludes configuration is a set of things to exclude. It needs to be
configured like this:
<excludes>
<exclude>**/*.xsd</exclude>
</excludes>
supareno wrote:
> Hello guys
>
> i read the previous threads about exclusion with interest
> because i am always confronted with the "excludes" problem
>
> i followed all the steps:
> changed my settings.xml to enable snapshot plugin repositories...
> (http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
>
> everything is working except the "excludes" tag
>
> my pom.xml looks like this:
>
> ...
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <version>2.2-SNAPSHOT</version>
> <executions>
> <execution>
> <goals>
> <goal>jar</goal>
> </goals>
> <configuration>
> <excludes>**/*.xsd</excludes>
>
> <schemaDirectory>src/main/resources/xml</schemaDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin> ...
>
> and when i run maven with the following command:
> mvn -Papache package
> i've got this exception!
>
> ...
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to configure plugin parameters for:
> org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT
>
> (found static expression: '**/*.xsd' which may act as a default value).
>
>
> Cause: Cannot assign configuration entry 'excludes' to 'class
> [Ljava.lang.String;' from '**/*.xsd', which is of type class
> java.lang.String
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> ...
>
> do i forget something during my builds??
>
> regards
> supareno
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed
Posted by supareno <re...@free.fr>.
thanks for your Olivier ,
it works now!
i forgot to make a clean in the target folder so that's why the files
were always present !
regards
> The excludes field in the jar plugin is to exclude content from
> ${project.build.outputDirectory} not to exclude resources.
> In order to exclude resources have a look here [1].
>
> I don't really understand your jar plugin configuration.
> Can you try a more simple :
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <excludes>
> <exclude>**/*.xsd</exclude>
> </excludes>
> </configuration>
> </plugin>
>
> --
> Olivier
> [1] http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html
>
> 2008/1/12, supareno <re...@free.fr>:
>
>> Thanks Olivier (and Jochen and Dennis),
>>
>> it is now building without any error but the xsd files is always here
>> i'm gonna try with Ant task to if it is working !
>>
>> regards
>>
>>> Hi,
>>> Can you try with :
>>> <excludes>
>>> <exclude>**/*.xsd</exclude>
>>> </excludes>
>>>
>>> --
>>> Olivier
>>>
>>> 2008/1/12, supareno <re...@free.fr>:
>>>
>>>
>>>> Hello guys
>>>>
>>>> i read the previous threads about exclusion with interest
>>>> because i am always confronted with the "excludes" problem
>>>>
>>>> i followed all the steps:
>>>> changed my settings.xml to enable snapshot plugin repositories...
>>>> (http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
>>>> everything is working except the "excludes" tag
>>>>
>>>> my pom.xml looks like this:
>>>>
>>>> ...
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-jar-plugin</artifactId>
>>>> <version>2.2-SNAPSHOT</version>
>>>> <executions>
>>>> <execution>
>>>> <goals>
>>>> <goal>jar</goal>
>>>> </goals>
>>>> <configuration>
>>>> <excludes>**/*.xsd</excludes>
>>>>
>>>> <schemaDirectory>src/main/resources/xml</schemaDirectory>
>>>> </configuration>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>> ...
>>>>
>>>> and when i run maven with the following command:
>>>> mvn -Papache package
>>>> i've got this exception!
>>>>
>>>> ...
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>> [ERROR] BUILD ERROR
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>> [INFO] Failed to configure plugin parameters for:
>>>> org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT
>>>>
>>>> (found static expression: '**/*.xsd' which may act as a default value).
>>>>
>>>>
>>>> Cause: Cannot assign configuration entry 'excludes' to 'class
>>>> [Ljava.lang.String;' from '**/*.xsd', which is of type class
>>>> java.lang.String
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>> [INFO] For more information, run Maven with the -e switch
>>>> ...
>>>>
>>>> do i forget something during my builds??
>>>>
>>>> regards
>>>> supareno
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed
Posted by Olivier Lamy <ol...@apache.org>.
The excludes field in the jar plugin is to exclude content from
${project.build.outputDirectory} not to exclude resources.
In order to exclude resources have a look here [1].
I don't really understand your jar plugin configuration.
Can you try a more simple :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.xsd</exclude>
</excludes>
</configuration>
</plugin>
--
Olivier
[1] http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html
2008/1/12, supareno <re...@free.fr>:
> Thanks Olivier (and Jochen and Dennis),
>
> it is now building without any error but the xsd files is always here
> i'm gonna try with Ant task to if it is working !
>
> regards
> > Hi,
> > Can you try with :
> > <excludes>
> > <exclude>**/*.xsd</exclude>
> > </excludes>
> >
> > --
> > Olivier
> >
> > 2008/1/12, supareno <re...@free.fr>:
> >
> >> Hello guys
> >>
> >> i read the previous threads about exclusion with interest
> >> because i am always confronted with the "excludes" problem
> >>
> >> i followed all the steps:
> >> changed my settings.xml to enable snapshot plugin repositories...
> >> (http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
> >> everything is working except the "excludes" tag
> >>
> >> my pom.xml looks like this:
> >>
> >> ...
> >> <plugin>
> >> <groupId>org.apache.maven.plugins</groupId>
> >> <artifactId>maven-jar-plugin</artifactId>
> >> <version>2.2-SNAPSHOT</version>
> >> <executions>
> >> <execution>
> >> <goals>
> >> <goal>jar</goal>
> >> </goals>
> >> <configuration>
> >> <excludes>**/*.xsd</excludes>
> >>
> >> <schemaDirectory>src/main/resources/xml</schemaDirectory>
> >> </configuration>
> >> </execution>
> >> </executions>
> >> </plugin>
> >> ...
> >>
> >> and when i run maven with the following command:
> >> mvn -Papache package
> >> i've got this exception!
> >>
> >> ...
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [ERROR] BUILD ERROR
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Failed to configure plugin parameters for:
> >> org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT
> >>
> >> (found static expression: '**/*.xsd' which may act as a default value).
> >>
> >>
> >> Cause: Cannot assign configuration entry 'excludes' to 'class
> >> [Ljava.lang.String;' from '**/*.xsd', which is of type class
> >> java.lang.String
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] For more information, run Maven with the -e switch
> >> ...
> >>
> >> do i forget something during my builds??
> >>
> >> regards
> >> supareno
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed
Posted by supareno <re...@free.fr>.
Thanks Olivier (and Jochen and Dennis),
it is now building without any error but the xsd files is always here
i'm gonna try with Ant task to if it is working !
regards
> Hi,
> Can you try with :
> <excludes>
> <exclude>**/*.xsd</exclude>
> </excludes>
>
> --
> Olivier
>
> 2008/1/12, supareno <re...@free.fr>:
>
>> Hello guys
>>
>> i read the previous threads about exclusion with interest
>> because i am always confronted with the "excludes" problem
>>
>> i followed all the steps:
>> changed my settings.xml to enable snapshot plugin repositories...
>> (http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
>> everything is working except the "excludes" tag
>>
>> my pom.xml looks like this:
>>
>> ...
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-jar-plugin</artifactId>
>> <version>2.2-SNAPSHOT</version>
>> <executions>
>> <execution>
>> <goals>
>> <goal>jar</goal>
>> </goals>
>> <configuration>
>> <excludes>**/*.xsd</excludes>
>>
>> <schemaDirectory>src/main/resources/xml</schemaDirectory>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>> ...
>>
>> and when i run maven with the following command:
>> mvn -Papache package
>> i've got this exception!
>>
>> ...
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failed to configure plugin parameters for:
>> org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT
>>
>> (found static expression: '**/*.xsd' which may act as a default value).
>>
>>
>> Cause: Cannot assign configuration entry 'excludes' to 'class
>> [Ljava.lang.String;' from '**/*.xsd', which is of type class
>> java.lang.String
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>> ...
>>
>> do i forget something during my builds??
>>
>> regards
>> supareno
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed
Posted by Olivier Lamy <ol...@apache.org>.
Hi,
Can you try with :
<excludes>
<exclude>**/*.xsd</exclude>
</excludes>
--
Olivier
2008/1/12, supareno <re...@free.fr>:
> Hello guys
>
> i read the previous threads about exclusion with interest
> because i am always confronted with the "excludes" problem
>
> i followed all the steps:
> changed my settings.xml to enable snapshot plugin repositories...
> (http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
> everything is working except the "excludes" tag
>
> my pom.xml looks like this:
>
> ...
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <version>2.2-SNAPSHOT</version>
> <executions>
> <execution>
> <goals>
> <goal>jar</goal>
> </goals>
> <configuration>
> <excludes>**/*.xsd</excludes>
>
> <schemaDirectory>src/main/resources/xml</schemaDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
> ...
>
> and when i run maven with the following command:
> mvn -Papache package
> i've got this exception!
>
> ...
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to configure plugin parameters for:
> org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT
>
> (found static expression: '**/*.xsd' which may act as a default value).
>
>
> Cause: Cannot assign configuration entry 'excludes' to 'class
> [Ljava.lang.String;' from '**/*.xsd', which is of type class
> java.lang.String
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> ...
>
> do i forget something during my builds??
>
> regards
> supareno
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org