Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpolate correctly resource paths in maven project inside maven server implementation #5164

Closed
vzhukovs opened this issue May 23, 2017 · 0 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
Milestone

Comments

@vzhukovs
Copy link
Contributor

Sometimes after updating properties of maven based projects we may have in project attributes absolute paths:

{
    "links": [{
        "href": "http://.../api/project/AddFilesToIndex_anym",
        "parameters": [],
        "rel": "update project",
        "method": "PUT",
        "produces": "application/json",
        "consumes": "application/json"
    }, {
        "href": "http://.../api/project/children/AddFilesToIndex_anym",
        "parameters": [],
        "rel": "children",
        "method": "GET",
        "produces": "application/json"
    }, {
        "href": "http://.../api/project/tree/AddFilesToIndex_anym",
        "parameters": [],
        "rel": "tree",
        "method": "GET",
        "produces": "application/json"
    }, {
        "href": "http://.../api/project/AddFilesToIndex_anym",
        "parameters": [],
        "rel": "delete",
        "method": "DELETE"
    }],
    "name": "AddFilesToIndex_anym",
    "attributes": {
        "maven.artifactId": ["artifactId"],
        "maven.parent.version": ["unknown"],
        "maven.test.source.folder": ["/projects/AddFilesToIndex_anym/src/test/java"],
        "maven.version": ["1.0-SNAPSHOT"],
        "maven.parent.groupId": ["unknown"],
        "languageVersion": ["1.8.0_45"],
        "language": ["java"],
        "maven.groupId": ["groupId"],
        "maven.packaging": ["war"],
        "containsJavaFiles": ["true"],
        "java.source.folder": ["/projects/AddFilesToIndex_anym/src/main/java"],
        "maven.resource.folder": ["/projects/AddFilesToIndex_anym/src/main/resources"],
        "vcs.provider.name": ["git"],
        "git.current.branch.name": ["master"],
        "maven.parent.artifactId": ["unknown"]
    },
    "type": "maven",
    "source": {
        "parameters": {}
    },
    "path": "/AddFilesToIndex_anym",
    "problems": [{
        "message": "Value for attribute java:java.output.folder:java.output.folder is not initialized, caused by: Unknown attribute java.output.folder",
        "code": 13
    }],
    "mixins": ["git"]
}

Method org.eclipse.che.maven.server.MavenServerImpl#resolveProject should be refactored to return relative paths instead of absolute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
No open projects
IDE
Awaiting triage
Development

No branches or pull requests

2 participants