Collections:
"mvn dependency:build-classpath" - Generate Class Pass
How to generate class path for dependences with Maven?
✍: FYIcenter.com
If you run your application JAR file generated from Maven, you need to include JAR files of all dependences in the class path. One way to build this class path is to use the "mvn dependency:build-classpath" command.
1. Generate class path of all dependences, using the previous application as an example.
fyicenter$ cd bio fyicenter$ ../apache-maven-3.8.7/bin/mvn dependency:build-classpath -Dmdep.outputFile=cp.txt [INFO] Scanning for projects... [INFO] [INFO] -------------------------< com.fyicenter:bio >-------------------------- [INFO] Building BioJava Test 1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-dependency-plugin:2.8:build-classpath (default-cli) @ bio --- [INFO] Wrote classpath file '/home/fyicenter/packages/java/bio/cp.txt'. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS ...
2. Export the class path as an environment variable.
fyicenter$ export BioJava_Path=`cat cp.txt`
3. Run the test program with the class path.
fyicenter$ java -cp target/bio-1.0.jar:$BioJava_Path com.fyicenter.FastaReaderTeat example.fasta 01:05:49 [main] WARN org.biojava.nbio.core.sequence.io.FastaReader - Sequence with header 'seq1' has unrecognised compounds (Cannot find compound for: ), it will be ignored 1 : seq0 FQTWEEFSRAAEKLYLADPMKVRVVLKYRHVDGNLCIKVTDDLVCLVYRTDQAQDVKKIEKF 2 : seq2 EEYQTWEEFARAAEKLYLTDPMKVRVVLKYRHCDGNLCMKVTDDAVCLQYKTDQAQDVKKVEKLHGK 3 : seq3 MYQVWEEFSRAVEKLYLTDPMKVRVVLKYRHCDGNLCIKVTDNSVCLQYKTDQAQDVK 4 : seq4 EEFSRAVEKLYLTDPMKVRVVLKYRHCDGNLCIKVTDNSVVSYEMRLFGVQKDNFALEHSLL 5 : seq5 SWEEFAKAAEVLYLEDPMKCRMCTKYRHVDHKLVVKLTDNHTVLKYVTDMAQDVKKIEKLTTLLMR 6 : seq6 FTNWEEFAKAAERLHSANPEKCRFVTKYNHTKGELVLKLTDDVVCLQYSTNQLQDVKKLEKLSSTLLRSI 7 : seq7 SWEEFVERSVQLFRGDPNATRYVMKYRHCEGKLVLKVTDDRECLKFKTDQAQDAKKMEKLNNIFF 8 : seq8 SWDEFVDRSVQLFRADPESTRYVMKYRHCDGKLVLKVTDNKECLKFKTDQAQEAKKMEKLNNIFFTLM 9 : seq9 KNWEDFEIAAENMYMANPQNCRYTMKYVHSKGHILLKMSDNVKCVQYRAENMPDLKK 10 : seq10 FDSWDEFVSKSVELFRNHPDTTRYVVKYRHCEGKLVLKVTDNHECLKFKTDQAQDAKKMEK
As you can see, the test program FastaReaderTeat.java is running correctly now. It reported an warning on the "seq1" sequence and skipped it in the output.
⇒ BioPerl - Perl Bioinformatics Toolkit
⇐ Read FASTA File with FastaReaderTeat.java
2023-04-17, 1087🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1004002 Names: InChIKey: QWGPBAAHUVVPIJ-UHFFFAOYS A-NSMILES: N#Cc4ccc(CSc3...
Molecule Summary: ID: FYI-1002518 Names: InChIKey: XGZBIADNCSVLHU-UHFFFAOYS A-NSMILES: CCOC(=O)CCc1c...
Molecule Summary: ID: FYI-1001707 SMILES: CN1C=NC2=C1C(=O)N(C)C(=O )N2CReceived at FYIcenter.com on:...
What notations are used in molecule skeletal formula? There are a number of notations are used Skele...
Molecule Summary: ID: FYI-1002269 Names: InChIKey: CYQFCXCEBYINGO-IRXDYDNUS A-NSMILES: CCCCCc1cc(O)c...