[ 
https://issues.apache.org/jira/browse/TIKA-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532214
 ] 

Chris A. Mattmann commented on TIKA-41:
---------------------------------------

I'm not sure I agree with your point Keith: just because Maven made "guesses" 
as to sensible defaults as to where to place resource files within a jar, that 
does not mean that's the quote-unquote standard place for things to go and 
deviation from that ruins the benefits that we receive from using maven. I've 
seen numerous cases such as this -- in fact it's why frameworks like Maven are 
extensible in the first place. They recognize that they aren't the Oracle and 
don't know where everything should go across the board to meet people's needs. 
That's why we can change it.

I think the benefit of keeping the files within CM within their logically 
correct place outweights the convenience of not having to understand the small 
customization of the POM file to get it to put the files where we want them. In 
addition, the separation of concerns between CM source tree layout and build 
layout is something that needs to be maintained. It allows both things to 
evolve independently over time, which is a great benefit.

So, I'm -1 for placing things in org/apache/tika, etc. within the src CM layout 
and for figuring out a way to add a command or two to the pom.xml file to place 
the files where we want them, and only 1x.

Cheers,
  Chris


> Resource files occur twice in jar file.
> ---------------------------------------
>
>                 Key: TIKA-41
>                 URL: https://issues.apache.org/jira/browse/TIKA-41
>             Project: Tika
>          Issue Type: Improvement
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>            Priority: Minor
>             Fix For: 0.1-incubator
>
>
> The Tika and Mime config files occur in two places in the jar file.  This is 
> because they are not stored in our src/test/resources directory tree in the 
> same place that they need to be in the target/classes directory tree, and 
> there is a copy directive in the POM file that copies the files to different 
> directory.
> For example, tika-config.xml is in src/main/resources, but needs to go to 
> target/class/org/apache/tika.  Maven automatically copies the files in 
> src/main/resources to the same location in target/classes, so tika-config.xml 
> is copied to target/classes.  Then, the copy directive in the POM file copies 
> the file to target/classes/org/apache/tika.  So the file is copied twice.
> I recommend the following to fix this:
> * Move tika-config.xml to src/main/resources/org/apache/tika.
> * Move tika-mimetypes.xml to src/main/resources/org/apache/tika/mime.
> * Remove the copy directives for the above two from the POM file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to