You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jimisola Laursen (Jira)" <ji...@apache.org> on 2021/12/10 09:30:00 UTC

[jira] [Updated] (MSHARED-1004) Various issues with symbolic links

     [ https://issues.apache.org/jira/browse/MSHARED-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimisola Laursen updated MSHARED-1004:
--------------------------------------
    Description: 
Two issues with (relative) symbolic links as resources (use attached file for reference and MWE:

 
{noformat}
user@earhart:~/dev/test/my-app$ tree
.
├── pom.xml
├── src
│   ├── main
│   │   ├── java
│   │   │   └── com
│   │   │       └── mycompany
│   │   │           └── app
│   │   │               └── App.java
│   │   └── resources
│   │       ├── B -> ../../../to_be_symlinked/B
│   │       └── folder -> ../../../to_be_symlinked/folder
│   └── test
│       └── java
│           └── com
│               └── mycompany
│                   └── app
│                       └── AppTest.java
└── to_be_symlinked
    ├── B
    └── folder
        └── A{noformat}
 

 

 
 * Symlinks for directories copies the actual directory (folder/A) whereas symlinks for files copies the symlink (B). Note the difference between file A and B. B is pointing incorrectly since it is relative.

{noformat}
user@earhart:~/dev/test/my-app/target/classes$ ls -l
total 8
lrwxrwxrwx 1 user user   26 dec 10 10:19 B -> ../../../to_be_symlinked/B
drwxrwxr-x 3 user user 4096 dec 10 10:19 com
drwxrwxr-x 2 user user 4096 dec 10 10:19 folder
user@earhart:~/dev/test/my-app/target/classes$ ls -l folder/
total 0
-rw-rw-r-- 1 user user 0 dec 10 10:19 A{noformat}
 * Resources are not overwritten (java.nio.file.FileAlreadyExistsException). To reproduce run "mvn compile" two (2x) times:

{noformat}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project my-app: copying /home/user/dev/test/my-app/src/main/resources/folder/A to /home/user/dev/test/my-app/target/classes/folder/A failed with FileAlreadyExistsException: /home/user/dev/test/my-app/target/classes/folder/A -{noformat}
 

  was:
Two issues with (relative) symbolic links as resources (use attached file for reference and MWE:

 
{noformat}
msjimlau@earhart:~/dev/test/my-app$ tree
.
├── pom.xml
├── src
│   ├── main
│   │   ├── java
│   │   │   └── com
│   │   │       └── mycompany
│   │   │           └── app
│   │   │               └── App.java
│   │   └── resources
│   │       ├── B -> ../../../to_be_symlinked/B
│   │       └── folder -> ../../../to_be_symlinked/folder
│   └── test
│       └── java
│           └── com
│               └── mycompany
│                   └── app
│                       └── AppTest.java
└── to_be_symlinked
    ├── B
    └── folder
        └── A{noformat}
 

 

 
 * Symlinks for directories copies the actual directory (folder/A) whereas symlinks for files copies the symlink (B). Note the difference between file A and B. B is pointing incorrectly since it is relative.

{noformat}
user@earhart:~/dev/test/my-app/target/classes$ ls -l
total 8
lrwxrwxrwx 1 user user   26 dec 10 10:19 B -> ../../../to_be_symlinked/B
drwxrwxr-x 3 user user 4096 dec 10 10:19 com
drwxrwxr-x 2 user user 4096 dec 10 10:19 folder
user@earhart:~/dev/test/my-app/target/classes$ ls -l folder/
total 0
-rw-rw-r-- 1 user user 0 dec 10 10:19 A{noformat}
 * Resources are not overwritten (java.nio.file.FileAlreadyExistsException). To reproduce run "mvn compile" two (2x) times:

{noformat}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project my-app: copying /home/user/dev/test/my-app/src/main/resources/folder/A to /home/user/dev/test/my-app/target/classes/folder/A failed with FileAlreadyExistsException: /home/user/dev/test/my-app/target/classes/folder/A -{noformat}
 


> Various issues with symbolic links
> ----------------------------------
>
>                 Key: MSHARED-1004
>                 URL: https://issues.apache.org/jira/browse/MSHARED-1004
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-3.3.0
>            Reporter: Jimisola Laursen
>            Priority: Major
>         Attachments: my-app.tar.gz
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Two issues with (relative) symbolic links as resources (use attached file for reference and MWE:
>  
> {noformat}
> user@earhart:~/dev/test/my-app$ tree
> .
> ├── pom.xml
> ├── src
> │   ├── main
> │   │   ├── java
> │   │   │   └── com
> │   │   │       └── mycompany
> │   │   │           └── app
> │   │   │               └── App.java
> │   │   └── resources
> │   │       ├── B -> ../../../to_be_symlinked/B
> │   │       └── folder -> ../../../to_be_symlinked/folder
> │   └── test
> │       └── java
> │           └── com
> │               └── mycompany
> │                   └── app
> │                       └── AppTest.java
> └── to_be_symlinked
>     ├── B
>     └── folder
>         └── A{noformat}
>  
>  
>  
>  * Symlinks for directories copies the actual directory (folder/A) whereas symlinks for files copies the symlink (B). Note the difference between file A and B. B is pointing incorrectly since it is relative.
> {noformat}
> user@earhart:~/dev/test/my-app/target/classes$ ls -l
> total 8
> lrwxrwxrwx 1 user user   26 dec 10 10:19 B -> ../../../to_be_symlinked/B
> drwxrwxr-x 3 user user 4096 dec 10 10:19 com
> drwxrwxr-x 2 user user 4096 dec 10 10:19 folder
> user@earhart:~/dev/test/my-app/target/classes$ ls -l folder/
> total 0
> -rw-rw-r-- 1 user user 0 dec 10 10:19 A{noformat}
>  * Resources are not overwritten (java.nio.file.FileAlreadyExistsException). To reproduce run "mvn compile" two (2x) times:
> {noformat}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project my-app: copying /home/user/dev/test/my-app/src/main/resources/folder/A to /home/user/dev/test/my-app/target/classes/folder/A failed with FileAlreadyExistsException: /home/user/dev/test/my-app/target/classes/folder/A -{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)