Changeset 5327


Ignore:
Timestamp:
Sep 1, 2016, 2:51:56 AM (6 years ago)
Author:
Christian Schulte
Message:

o Updated to remove methods deprecated in 1.10.

See #92

Location:
jomc-tools/trunk/jomc-maven-plugin/src/main/java/org/jomc/tools/maven
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • jomc-tools/trunk/jomc-maven-plugin/src/main/java/org/jomc/tools/maven/AbstractAttachMojo.java

    r5274 r5327  
    286286                    }
    287287
    288                     this.copyFile( this.getArtifactFile(), attachment );
     288                    Files.copy( this.getArtifactFile().toPath(), attachment.toPath(),
     289                                StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES );
    289290
    290291                    this.getMavenProjectHelper().attachArtifact( this.getMavenProject(), this.getArtifactType(),
     
    331332    }
    332333
    333     /**
    334      * Copies a file.
    335      *
    336      * @param source The file to copy.
    337      * @param target The file to copy the source file to.
    338      *
    339      * @throws IOException if copying fails.
    340      *
    341      * @since 1.10
    342      */
    343     protected final void copyFile( final File source, final File target ) throws IOException
    344     {
    345         Files.copy( source.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING,
    346                     StandardCopyOption.COPY_ATTRIBUTES );
    347 
    348     }
    349 
    350334}
  • jomc-tools/trunk/jomc-maven-plugin/src/main/java/org/jomc/tools/maven/AbstractJomcMojo.java

    r5318 r5327  
    28562856
    28572857    /**
    2858      * Copies a file.
    2859      *
    2860      * @param source The file to copy.
    2861      * @param target The file to copy the source file to.
    2862      *
    2863      * @throws IOException if copying fails.
    2864      *
    2865      * @since 1.10
    2866      */
    2867     protected final void copyFile( final File source, final File target ) throws IOException
    2868     {
    2869         Files.copy( source.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING,
    2870                     StandardCopyOption.COPY_ATTRIBUTES );
    2871 
    2872     }
    2873 
    2874     /**
    28752858     * Copies a directory recursively.
    28762859     *
Note: See TracChangeset for help on using the changeset viewer.