You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by GitBox <gi...@apache.org> on 2020/09/03 06:41:56 UTC

[GitHub] [tika] PeterAlfredLee opened a new pull request #350: Fix java build errors caused by wrong depenency settings

PeterAlfredLee opened a new pull request #350:
URL: https://github.com/apache/tika/pull/350


   Hi all, 
   I noticed that the main branch succeed on excuting command `mvn clean install` now, but failed in `IDEA` .
   After some debugging, I found what's wrong:
   1. Component tika-parsers and tika-langdetect used to be a jar, and other components can use them as dependency
   2. Today tika-parsers and tika-langdetect has become pom projects, and we haven't corrected those dependencies yet.
   3. Compile in `IDEA` is failing because of these wrong depenency settings , `mvn clean install` can success because we have some old jar in snapshots repository(in apache maven repository).
   
   So I removed tika-parsers and tika-langdetect from dependency because they're not jars any more. 
   Also modified some code to use correct dependencies.
   Now I can compile it in `IDEA` and run `mvn clean install` successfully.
   
   Just one thing I'm not sure lies in [test](https://github.com/PeterAlfredLee/tika/blob/fixDependency/tika-server/src/test/java/org/apache/tika/server/TikaParsersTest.java#L165) : 
   It assert parsers number to be larger than 50, but I only got a 47 when I was testing.
   Not sure why. I've commented out this line for now.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] PeterAlfredLee closed pull request #350: Fix java build errors caused by wrong depenency settings

Posted by GitBox <gi...@apache.org>.
PeterAlfredLee closed pull request #350:
URL: https://github.com/apache/tika/pull/350


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] PeterAlfredLee commented on pull request #350: Fix java build errors caused by wrong depenency settings

Posted by GitBox <gi...@apache.org>.
PeterAlfredLee commented on pull request #350:
URL: https://github.com/apache/tika/pull/350#issuecomment-687511400


   Yes, It works good ! Thank you !


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] tballison commented on pull request #350: Fix java build errors caused by wrong depenency settings

Posted by GitBox <gi...@apache.org>.
tballison commented on pull request #350:
URL: https://github.com/apache/tika/pull/350#issuecomment-686602942


   I just pushed a commit that should fix this.  I was able to get a clean build after deleting my local tika repo and running the build offline.
   
   I use Intellij, too, and I have had to run `find . -name *.iml -exec rm -rf {} \; && rm -r .idea/` a number of times during development of Tika 2.0 because the changes have overwhelmed Intellij's metadat.
   
   Let me know what you find.  Thank you, again!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] tballison edited a comment on pull request #350: Fix java build errors caused by wrong depenency settings

Posted by GitBox <gi...@apache.org>.
tballison edited a comment on pull request #350:
URL: https://github.com/apache/tika/pull/350#issuecomment-686602942


   I just pushed a commit that should fix this.  I was able to get a clean build after deleting my local tika repo and running the build offline.
   
   I use Intellij, too, and I have had to run `find . -name *.iml -exec rm -rf {} \; && rm -r .idea/` a number of times during development of Tika 2.0 because the changes have overwhelmed Intellij's metadata.
   
   Let me know what you find.  Thank you, again!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] PeterAlfredLee commented on pull request #350: Fix java build errors caused by wrong depenency settings

Posted by GitBox <gi...@apache.org>.
PeterAlfredLee commented on pull request #350:
URL: https://github.com/apache/tika/pull/350#issuecomment-686860503


   Hi @tballison 
   
   > I use Intellij, too, and I have had to run find . -name *.iml -exec rm -rf {} \; && rm -r .idea/ a number of times during development of Tika 2.0 because the changes have overwhelmed Intellij's metadata.
   
   You can try this : [Intellij: Get rid of iml file](https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006734039-Intellij-Get-rid-of-iml-file).
   
   This would remove all .iml in project directories and store them in a externally way. Just do it like this :
   1. Set the `Store generated project files externally` in `Build, Execution, Deployment | Build Tools | Maven | Importing` for new project settings(in Files -> New Project Settings -> Settings for New Projects)
   2. Remove all `.iml` files and `.idea/` using `find . -name *.iml -exec rm -rf {} \; && rm -r .idea/`
   3. Reopen your project with Intellij
   
   Therefore no `.iml` files would be generated in project directories. The Intellij could detect the deletion of directories and notify you to update the project.
   
   Hope this helps. :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] tballison commented on pull request #350: Fix java build errors caused by wrong depenency settings

Posted by GitBox <gi...@apache.org>.
tballison commented on pull request #350:
URL: https://github.com/apache/tika/pull/350#issuecomment-687141437


   Oooo...fun... thank you!
   
   Is the build working for you now?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] tballison commented on pull request #350: Fix java build errors caused by wrong depenency settings

Posted by GitBox <gi...@apache.org>.
tballison commented on pull request #350:
URL: https://github.com/apache/tika/pull/350#issuecomment-686565825


   This is a great catch.  Thank you!  
   
   I'm really frustrated that I didn't catch this locally and also that the ci didn't catch it because of the snapshot repo.
   
   I had incorrectly hoped that maven would pull all the submodules in "tika-parsers" as dependencies, and maven just doesn't work like that, apparently.
   
   I'm working on a fix now that moves tika-parsers to tika-parser-modules, and then adds a "jar" module "tika-parsers" that uses all of the parsers in tika-parsers-modules.  I'd like to avoid having tika-app and tika-server have to specify all of the parsers in tika-parsers.  I'd like to package them as one "tika-parsers" package.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org