This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 221560 - ${project.basedir} gets created in project base dir
Summary: ${project.basedir} gets created in project base dir
Status: RESOLVED INCOMPLETE
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-06 12:55 UTC by tim_sa
Modified: 2012-11-21 07:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of file view (17.57 KB, image/png)
2012-11-06 12:57 UTC, tim_sa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim_sa 2012-11-06 12:55:02 UTC
[ BUILD # : 201211020001 ]
[ JDK VERSION : <1.7.7 ]

I think this gets created because of the following snippet in my pom.xml

<repository>
    <id>unknown-jars-temp-repo</id>
    <name>A temporary repository created by NetBeans for libraries and jars it
could not identify. Please replace the dependencies in this repository with
correct ones and delete this repository.</name>
    <url>file:${project.basedir}/lib</url>
</repository>

Shouldn't this be created in the target folder seeings as it is a temp-repo?
Also it seems that the variable substitution isn't working properly.

see screenshot to follow
Comment 1 tim_sa 2012-11-06 12:57:09 UTC
Created attachment 127227 [details]
Screenshot of file view
Comment 2 Milos Kleint 2012-11-07 12:26:50 UTC

netbeans generates this when a library/web framework is added to the maven project by other parts of the IDE and it cannot associate the jars in the library with maven coordinates. then we create the lib folder and populate it with jars with invented, generated coordinates. Primarily intended to both work OOTB and force you to add it to a remote maven repository ultimately.

adding it to /target folder makes no sense, your repository and jars your projects depends on would be wiped by the first clean build.

when I try locally to just add the repository definition, it properly resolves to project basedir. if the directory doesn't exist it's added when maven first builds.

what version of maven are you using? how did the snippet appear in your pom file? what action triggered the modification of the pom file?
Comment 3 Milos Kleint 2012-11-21 07:18:05 UTC
please provide a sample project and steps to reproduce the problem. I was not able to reproduce, for me the repository resolved correctly the $[project.basedir} expression.