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 203737 - Remove java.net repo references
Summary: Remove java.net repo references
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Martin Janicek
URL: http://www.sonatype.com/About-Sonatyp...
Keywords:
Depends on:
Blocks: 203736 204816
  Show dependency tree
 
Reported: 2011-10-14 15:26 UTC by Jesse Glick
Modified: 2011-12-07 12:15 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-10-14 15:26:51 UTC
It seems that everything from the java.net2 repo (also sometimes called java.net, etc.) has been merged into Central. Therefore we should no longer advocate use of the old repository from the IDE. A quick grep turns up some references in Maven-related code, all apparently EE-oriented:

maven.j2ee/src/org/netbeans/modules/maven/j2ee/ContainerCPModifierImpl.java
maven.jaxws/src/org/netbeans/modules/maven/jaxws/MavenModelUtils.java
maven.samples/samples_src/MavenScrumToys/pom.xml

plus one recently added by you (mjanicek).

Please review these references. <repository> declarations for java.net2 can be removed from samples, and no IDE code should insert this repo definition into user projects.
Comment 1 Jesse Glick 2011-10-14 15:34:05 UTC
Also:

websvc.rest.samples/RestRCPMvnAppSampleProject/restsample/pom.xml

To rerun search:

hg locate -r . -0 \*\*.xml \*\*.java | xargs -0 grep -l -- \[\>\"\]java\[.\]net\[\^.\]
Comment 2 Martin Janicek 2011-10-17 09:02:43 UTC
Fixed in: http://hg.netbeans.org/web-main/rev/cd281c226622
Comment 3 Martin Janicek 2011-10-17 09:09:40 UTC
CC also to Denis, because few changes were made in web service module and rest samples..
Comment 4 Denis Anisimov 2011-10-17 09:48:38 UTC
I'm sorry , I'm not Maven export .
Could you please clarify it for me ?
I have a reference in the sample project to java.net2 repository :
     <repository>
         <id>java.net2</id>
         <url>http://download.java.net/maven/2/</url>
     </repository>

Should I just remove this tag from the pom.xml file ?
Comment 5 Martin Janicek 2011-10-17 09:56:25 UTC
Well, I already done that within revision http://hg.netbeans.org/web-main/rev/cd281c226622. Just want to inform you that I made some changes in your modules (similar thing was made in class MavenModelUtils).

This is because there is no need to have java2.net as an additional repository in our projects. Everything was moved/merged into Maven central.
Comment 6 Denis Anisimov 2011-10-17 10:00:07 UTC
Oh, I'm sorry I've missed the change in the RestRCPMvnAppSampleProject inside 
your commit.
Thank you very much.
Comment 7 Quality Engineering 2011-10-18 01:33:33 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/cd281c226622
User: Martin Janicek <mjanicek@netbeans.org>
Log: #203737 - Remove java.net repo references
Comment 8 Jesse Glick 2011-11-18 17:18:44 UTC
Missed usage from library definitions, which would cause the deprecated repo to be added if ProjectClassPathModifier.addLibraries is called with that library on a Maven project.

$ hg locate -r . -0 \*\*.xml \*\*.java | xargs -0 fgrep -l download.java.net/maven/2
form.binding/src/org/netbeans/modules/form/binding/resources/beans_binding.xml
groovy.grailsproject/test/unit/data/projects/completion/ivysettings.xml [ignore]
hibernatelib/src/org/netbeans/modules/hibernatelib/resources/hibernate-persistence.xml
hibernatelib/src/org/netbeans/modules/hibernatelib/resources/hibernate.xml
javaee.api/src/org/netbeans/modules/javaee/api/javaee-api-6.0.xml
javaee.api/src/org/netbeans/modules/javaee/api/javaee-endorsed-api-6.0.xml
javaee.api/src/org/netbeans/modules/javaee/api/javaee-web-api-6.0.xml
web.facelets010114/src/org/netbeans/modules/web/facelets010114/facelets-1-1-14-el-api.xml
web.facelets010114/src/org/netbeans/modules/web/facelets010114/facelets-1-1-14.xml
web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20.xml
web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20ri.xml
websvc.metro.lib/src/org/netbeans/modules/websvc/metro/lib/metro.xml
websvc.restlib/src/org/netbeans/modules/websvc/swdp/restapi.xml
websvc.restlib/src/org/netbeans/modules/websvc/swdp/swdp.xml
Comment 9 Martin Janicek 2011-11-24 14:28:33 UTC
Jesse what does this mean to me? Should I just change these xml files and remove lines with java.net2 repo references?
Comment 10 Jesse Glick 2011-11-29 00:20:19 UTC
No, it means they should be changed to Central. For example, javaee-api-6.0.xml has <resource>http://download.java.net/maven/2/javax/javaee-api/6.0/javaee-api-6.0.pom</resource> whereas http://repo1.maven.org/maven2/javax/javaee-api/6.0/javaee-api-6.0.pom is what should be used now.
Comment 11 Martin Janicek 2011-12-06 13:22:31 UTC
Ok, should be fixed in: web-main #ab4745f7c84d

Only change I'm not sure about is in file metro.xml, because till now there was reference to version 2.0-SNAPSHOT, but such a version isn't available in central repo - so I've change that to 2.0. Do you think it's compatible change?
Comment 12 Jesse Glick 2011-12-06 17:19:38 UTC
Probably OK, since 2.0 is newer than 2.0-SNAPSHOT. 2.0.1 is also available. Up to owner of that library definition to check it.
Comment 13 Quality Engineering 2011-12-07 12:15:18 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/ab4745f7c84d
User: Martin Janicek <mjanicek@netbeans.org>
Log: #203737 - Remove java.net repo references