Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Help: how to avoid the exclude pattern=** on a target/generated-sources/foobar directory?

This makes sense now. Please submit new bugreport in m2e bugzilla and
provide small standalone example project we can use to reproduce the
problem. I don't know if there is a good fix for this yet, but at least
we will have something specific to think about.

--
Regards,
Igor

On 2012-12-18 12:33 PM, Francis ANDRE wrote:
Hi Igor

I found the origin of the problem. The foobar compiler produces not only
java source code to compile but also a kink of metadata of the foobar
generated code as a XML document into the
target/generated-sources/foobar folder. The
target/generated-sources/foobar directory is then considered as a
resource with a inclusion filter of **/*.xml. By the end of the
generation code, the java sources are properly compiled in the
target\generated-sources\foobar directory which becomes a source folder
for Eclipse. Fine....

The problem comes when running the Project->Maven->Update Project
Configuration which then adds the ExclusionFilter=** on the
target\generated-sources\foobar which in turn is removed by Eclipse as a
source folder.

[INFO] sourceDirectory: Z:\OSI\iso.itu.osi\omf\mim\X722\MIM\src\main\java
[INFO] resource       :
Z:\OSI\iso.itu.osi\omf\mim\X722\MIM\src\main\resources
[INFO]     excludes   : []
[INFO]     includes   : [**/**.*]
[INFO] resource       : Z:\OSI\iso.itu.osi\omf\mim\X722\MIM\src\main\foobar
[INFO]     excludes   : []
[INFO]     includes   : [**/*.gdm, **/*.gdmo]
[INFO] resource       :
Z:\OSI\iso.itu.osi\omf\mim\X722\MIM\target\generated-sources\foobar
[INFO]     excludes   : []
[INFO]     includes   : [**/*.xml]
[INFO] asn           : Z:\OSI\iso-itu-osi-asn1/asn
[INFO] outputDirectory:
Z:\OSI\iso.itu.osi\omf\mim\X722\MIM\target\generated-sources\foobar
[INFO] sources       :
[Z:\OSI\iso.itu.osi\omf\mim\X722\MIM\src\main\java,
Z:\OSI\iso.itu.osi\omf\mim\X722\MIM\target\generated-sour
ces\foobar]


here a simple way to reproduce it
1/ create a standard eclipse maven project
2/ add a src/main/javacc folder
3/ put in this src/main/javacc folder a minimalist grammar.jj found on
the javacc web site as
http://java.net/downloads/javacc/contrib/grammars/AsnParser.jj for example
4/ add the javacc-maven-plugin in the build (see below)
5/ mvn clean generated-sources
6/ add a empty foo.xml file into the target/generated-sources/javacc
directory
7/ verify that target\generated-sources/javacc is always an Eclipse
source folder
8/ run Project->Maven->Update Project Configuration
9/ the target/generated-sources/javacc becomes a simple folder because
ExclusionFilter=** has been added


build for the pom
   <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>
   <build>
       <plugins>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>javacc-maven-plugin</artifactId>
         <version>2.6</version>
         <executions>
           <execution>
             <id>javacc</id>
             <goals>
               <goal>javacc</goal>
             </goals>
             <configuration>
               <!--
               <lookAhead>2</lookAhead>
               <isStatic>false</isStatic>
                -->
             </configuration>
           </execution>
         </executions>
       </plugin>
       </plugins>
   </build>


Le 17/12/2012 18:43, Igor Fedorenko a écrit :
Zip file will do

--
Regards,
Igor

On 2012-12-17 12:41 PM, Francis ANDRE wrote:
Le 17/12/2012 00:22, Igor Fedorenko a écrit :
In your previous emails you were asking about excludes filters on
generated java sources folders. This email shows src/main/resources
resources folder. Please find the time to setup reasonably
small standalone example to illustrate the problem you are trying to
solve.
Ok Igor... will take the time to do it...how should I send the
standalone projet? as a zip joined to a mail or something else?

Francis

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top