I know, but the question is if it's somehow possible. I understand you.
Thank you for reply

pá 10. 4. 2015 v 17:57 odesílatel Robert Scholte <codeh...@sourcegrounds.com>
napsal:

> I wouldn't bind it to a default phase, since it is a one-time action.
> IMHO people should be aware that they import certificates.
>
> Robert
>
> Op Fri, 10 Apr 2015 15:44:29 +0200 schreef Martin Polívka
> <martasdx....@gmail.com>:
>
> > Hi everyone,
> > I am dealing with small problem. We are going to change our repositories
> > in
> > java project from http to https.
> > I know I can download certificate and import it to java keystore but our
> > project is quite large and we want to add this automaticly.
> > My idea was to use your plugin. It's working but only once.
> >
> > Here is my pom.xml plugin:
> > <plugin>
> >                 <groupId>org.codehaus.mojo</groupId>
> >                 <artifactId>keytool-maven-plugin</artifactId>
> >                 <version>1.5</version>
> >                 <executions>
> >                     <execution>
> >                         <goals>
> >                             <goal>importCertificate</goal>
> >                         </goals>
> >                         <phase>validate</phase>
> >                     </execution>
> >                 </executions>
> >                 <configuration>
> >
>  <keystore>${java.home}\lib\security\cacerts</keystore>
> >                     <!-- Dont't change! default java password -->
> >                     <storepass>changeit</storepass>
> >                     <file>${project.basedir}\my.cer</file>
> >                     <alias>my-alias</alias>
> >                     <trustcacerts>true</trustcacerts>
> >                     <noprompt>true</noprompt>
> >                 </configuration>
> >             </plugin>
> >
> > As you can see, when i start maven job (test or deploy, ...) certificate
> > is
> > imported to cacerts. Ok, this is done for the first time but for next
> > time
> > it throws exception because keytool can't add certificate with same
> > alias.
> > I don't want to create new aliases for every job so I tryed to delete
> > certificate first. It works but now the problem is with initial import.
> >
> > My question is if you can add some
> > <throwNoException>true</throwNoException> to configuration, catch the
> > exception from keystore and let maven to do the job without ending.
> >
> > Or if there is another way...
> >
> > Thank you very much.
> >
> > Martin
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to