0
私は、pax試験環境でjavamail-mock2を使用したいと思いますが、pax試験ではMETA-INFフォルダをテストから見ることができません。どのようにスイートにjavamail.providersファイルを追加すると、javamail-mock2は設定ファイルと負荷モックプロバイダを表示しますか?Pax試験karaf 4.0.7 mock javamailを使用
MP
DEBUG: JavaMail version 1.5.5
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
テスト/ javaの/リソース/ META-INF/javamail.providers
protocol=mock_smtp; type=transport; class=de.saly.javamail.mock2.MockTransport; vendor=JavaMail Mock2 provider;
protocol=mock_smtps; type=transport; class=de.saly.javamail.mock2.MockTransport; vendor=JavaMail Mock2 provider;
protocol=mock_pop3; type=store; class=de.saly.javamail.mock2.POP3MockStore; vendor=JavaMail Mock2 provider;
protocol=mock_imap; type=store; class=de.saly.javamail.mock2.IMAPMockStore; vendor=JavaMail Mock2 provider;
protocol=mock_pop3s; type=store; class=de.saly.javamail.mock2.POP3SSLMockStore; vendor=JavaMail Mock2 provider;
protocol=mock_imaps; type=store; class=de.saly.javamail.mock2.IMAPSSLMockStore; vendor=JavaMail Mock2 provider;
#Override real providers
protocol=smtp${mock.postfix}; type=transport; class=de.saly.javamail.mock2.MockTransport; vendor=JavaMail Mock2 provider;
protocol=smtps${mock.postfix}; type=transport; class=de.saly.javamail.mock2.MockTransport; vendor=JavaMail Mock2 provider;
protocol=pop3${mock.postfix}; type=store; class=de.saly.javamail.mock2.POP3MockStore; vendor=JavaMail Mock2 provider;
protocol=imap${mock.postfix}; type=store; class=de.saly.javamail.mock2.IMAPMockStore; vendor=JavaMail Mock2 provider;
protocol=pop3s${mock.postfix}; type=store; class=de.saly.javamail.mock2.POP3SSLMockStore; vendor=JavaMail Mock2 provider;
protocol=imaps${mock.postfix}; type=store; class=de.saly.javamail.mock2.IMAPSSLMockStore; vendor=JavaMail Mock2 provider;
そして最後に、私はエラーを取得する:
javax.mail.NoSuchProviderException: No provider for mock_imaps
私たちはGreenMailを使用するソリューションを提供しましたが、osgiバンドルを使用すると、より良い解決策が提供されるようになりました。 – mapek