Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix loading of CSL again #6002

Closed
wants to merge 8 commits into from
Closed

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr changed the title remove check for jar Try to fix loading of CSL again Feb 23, 2020
@Siedlerchr
Copy link
Member Author

I debugged the loading or finding of the resources- It's still a mystery. The module is found, the bootloader initialized, but the location is still not right.

@@ -138,25 +139,26 @@ public static CitationStyle getDefault() {
return STYLES;
}

URL url = CitationStyle.class.getResource(STYLES_ROOT);
URL url = CitationStyle.class.getResource("/modules/org.jabref/csl-styles");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the problem is that "csl-styles" is outside of the module boundaries. Can you try to load a) a single csl file and b) see if it works if you copy the file to "src\main\java\org\jabref\logic\citationstyle" and load it via CitationStyle.class.getResource("file.csl"); and finally c) if you place the file in the resource folder "src\main\resources\org\jabref\logic\citationstyle"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your guess was right. I copied over the files to src\main\java\org\jabref\logic\citationstyle and then did CitationStyle.class.getResource("file.csl"); and I got a valid url back which was non null.
Will try to test further

* upstream/master:
  Fixed group drag-n-drop not working after inserting an article into a group (#6008)
  New Crowdin translations (#5998)
  Bump richtextfx from 0.10.3 to 0.10.4 (#6007)
  Bump unirest-java from 3.5.00 to 3.6.00 (#6006)
  Bump com.github.ben-manes.versions from 0.27.0 to 0.28.0 (#6004)
  Bump classgraph from 4.8.64 to 4.8.65 (#6003)
  Bump mockito-core from 3.2.4 to 3.3.0 (#6005)
  Update module description (#5999)
* upstream/master: (21 commits)
  Squashed 'src/main/resources/csl-locales/' changes from 4fa753374e..d73af4a3fe
  Squashed 'src/main/resources/csl-styles/' changes from 9e81857..f03dece
  Add deep link to uni Basel
  Refine information on codacy
  New Crowdin translations (#6020)
  Fix l10n
  New Crowdin translations (#6016)
  Fix teamscale link - and sort list alphabetically
  Update code-quality.md
  Update link to codacy/JabRef
  Integrate gradle validation in normal test workflow (#6001)
  Update CleanupUrlFormatter.java
  Update URLUtil.java
  Fix modernizer warnings
  Remove unused error prone
  Use Java version class
  Remove commented out code
  Upgrade deprecated gradle API
  Add plugin scope
  New menu "Lookup"
  ...
@Siedlerchr
Copy link
Member Author

I now get the same error as in #5622 (comment)

@Siedlerchr
Copy link
Member Author

Superseeded by #6010

@Siedlerchr Siedlerchr closed this Feb 26, 2020
@Siedlerchr Siedlerchr deleted the fixcslpathdiscover branch February 26, 2020 20:13
koppor pushed a commit that referenced this pull request Apr 25, 2022
76b4268 Style for Acta Physica Sinica (物理学报) (#6009)
604de6f MLA Publication Date update (#5927)
41ce2d4 Update netherlands-journal-of-geosciences-geologie-en-mijnbouw.csl (#6027)
ad08f5d Adds space after title writing in ABNT style file (#6031)
0b5c1c2 Create CRCAO Light (#5935)
2f42b8c Create annals-of-laboratory-medicine.csl (#5959)
80a9506 Create annual-review-of-linguistics (#5992)
0fb9c40 Update the-journal-of-egyptian-archaeology.csl (#6028)
5ff53b1 Update guide-des-citations-references-et-abreviations-juridiques.csl (#6002)
c1c0212 Update society-for-american-archaeology.csl (#5919)
129ef3c Update administrative-science-quarterly.csl (#5991)
8bc22bd Create multilingual-matters.csl (#5955)
aca84fd Create expert-reviews-in-molecular-medicine.csl (#5961)
3c4ddc0 Create ethnobiology-letters.csl (#5986)
c301e04 Update heidelberg-university-faculty-of-medicine.csl (#5932)
a8c4396 Update tyndale-bulletin.csl (#5949)
c18cbcf Bluebook hotfix
d950b2b  Create incontext-studies-in-translation-and-interculturalism.csl (#5907)
7cfc106 Bump nokogiri from 1.13.2 to 1.13.4 (#6016)
0baa43a Liebert update (#6026)
41ca2b3 Bluebook Add space for ibid  (#6025)
6707a37 Update american-journal-of-botany.csl (#5954)
926fad5 Update boletin-de-pediatria.csl (#6024)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 76b4268
Jonathan-Oliveira pushed a commit to Jonathan-Oliveira/jabref that referenced this pull request May 7, 2022
76b4268 Style for Acta Physica Sinica (物理学报) (JabRef#6009)
604de6f MLA Publication Date update (JabRef#5927)
41ce2d4 Update netherlands-journal-of-geosciences-geologie-en-mijnbouw.csl (JabRef#6027)
ad08f5d Adds space after title writing in ABNT style file (JabRef#6031)
0b5c1c2 Create CRCAO Light (JabRef#5935)
2f42b8c Create annals-of-laboratory-medicine.csl (JabRef#5959)
80a9506 Create annual-review-of-linguistics (JabRef#5992)
0fb9c40 Update the-journal-of-egyptian-archaeology.csl (JabRef#6028)
5ff53b1 Update guide-des-citations-references-et-abreviations-juridiques.csl (JabRef#6002)
c1c0212 Update society-for-american-archaeology.csl (JabRef#5919)
129ef3c Update administrative-science-quarterly.csl (JabRef#5991)
8bc22bd Create multilingual-matters.csl (JabRef#5955)
aca84fd Create expert-reviews-in-molecular-medicine.csl (JabRef#5961)
3c4ddc0 Create ethnobiology-letters.csl (JabRef#5986)
c301e04 Update heidelberg-university-faculty-of-medicine.csl (JabRef#5932)
a8c4396 Update tyndale-bulletin.csl (JabRef#5949)
c18cbcf Bluebook hotfix
d950b2b  Create incontext-studies-in-translation-and-interculturalism.csl (JabRef#5907)
7cfc106 Bump nokogiri from 1.13.2 to 1.13.4 (JabRef#6016)
0baa43a Liebert update (JabRef#6026)
41ca2b3 Bluebook Add space for ibid  (JabRef#6025)
6707a37 Update american-journal-of-botany.csl (JabRef#5954)
926fad5 Update boletin-de-pediatria.csl (JabRef#6024)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 76b4268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants