I'm helping develop a software product using Java (Eclipse Kepler for RCP Developers is our IDE) that is made up of dozens of plug-ins. We store all of these in an SVN repo on Sourceforge.
We have just been told that due to a legal problem, one of the plugins cannot be accessed via a SVN repo.
I moved it to GitHub and then imported it into my workspace, but am now unable to get the project to build in Maven. I receive this error:
Child module /x/x/x/github.project of /x/x/x/project.build/pom.xml does not exist.
The pom.xml file of project.build contains this line
<module>../../github.project</module>
Which should still be correct.
The pom.xml of the plugin project has not been modified, so it still shares the same group ID as the other plugin and all of the parent information is correct.
Can anyone give me some advice on how to properly integrate this plug-in? Is there a way to "require" a GitHub project in SVN or a different way to ensure it's included?
Thanks.
Related
I am running NetBean 7.4 on Mac and I am sort of new to Maven dependancies.
I have been given a project that uses Maven to download a framework for networking simulation.
Turned out that the framework has a bug and the teacher gave us a public GitHub repository with all the source code for the framework, so that we can also modify it.
How do I connect the GitHub link (with sources) to NetBeans in order to being able to modify the framework classes? The "Attach Sources..." button that appears on the framework classes asks for a JAR or ZIP (if I download the ZIP from GitHub it doesn't work).
Moreover, it looks like the framework files in the Dependancies folder cannot be modified anyway (read-only files).
Thank you all.
to "connect" 2 different projects, the checked out source's version needs to be equal to the version in maven pom.xml.
So clone the github repository, figure out which branch/tag matches the version in your project and check it out. Then open the project(s). If you did that correctly (and assuming the github project is actually maven), your project's dependencies section will list them with project-like icon. Then the projects are linked.
I've never worked with SVN-repositories before.
My co-worker gave me access to his repository, I downloaded the SVN plugin for eclipse, established a connection and checked out the java project. It's now locally available, but unfortunately it's not possible to run it.
I have the feeling, that Eclipse doesn't recognize this project. My other Java project are of course executable.
These are the project properties of my random test Java project:
And these are the project properties of the checked out project. As you can see, some attributes (e.g. Java) are missing:
Also the project name has a strange additional character:
"> software"
When I try to add a run configuration, I only can choose my random test project:
PS: The SVN project works with Maven dependencies. I've installed Apache Maven 3.2.1 and the m2e plugin and linked the directory with Eclipse:
Could Maven be the problem?
Thank you!
Try to check the .project file and the .classpath file...
Those file tells to Eclipse the kind and the structure of the project...
So if they are missing this could cause a lot of problems...
Those file will be also generated if you do something like Configure > Convert to Java (like azurefrog tells in comments)
Right click on your project> team> disconnect. Hope so this will help.
I have two eclipse project. The second one depends on the first one. When I try to rename a java class of the first project (using the rename function on the java file on the project explorer) it correctly do the refactor of that project but it doesn't changes anything on the project that depends on it.
Is there a way in eclipse to tell the renaming function to act even on the projects that are linked to the refactored one? Thanks for help.
My Eclipse version is Juno.
Update:
Forgot to mention that the projects are linked to an SVN repository. Maybe it could be relevant.
Update 2:
I add more details after mliebelt request of clarification.
My Eclipse version is Juno, Eclipse Java EE IDE for Web Developers, build id: 20120614-1722.
I've installed some plugins: subclipse, JRebel, m2e, Eclipse Web Tool Platform.
The second project is linked to the first one as a project dependency in eclipse. I have added the first project in the project tab of Java Build Path. Everything seems to work fine, even the renaming function.
Then, I tried to put the two project in two different SVN repositories. I created two repositories on the SVN server and I installed on my machine the client tortoiseSVN and the eclipse plugin subclipse. Since I didn't succeeded in importing the projects on the server directly from eclipse, I copied the projects' folders in a different location and I removed the projects from eclipse. I used tortoiseSVN to import the projects, each one on a repository with the same name of the project, and than I imported the project back to eclipse. To do that I used the eclipse "import existent project into workspace" function with the "copy project into workspace" option selected. Everything seems to work but not the renaming function.
It does work (for me), so here is what I have done to reproduce the behavior. I hope that this helps to find the error.
Create two projects, and make the second dependent on the first.
Create some source code, so that you can refactor it. Ensure that a class in Test2 is dependent on a class in Test.
Select from the context menu of the method you want to rename. Enter there a new name for the method, only then is the Preview option available. Ensure that Update references is checked.
Press the button Preview to see which classes will be changed by the refactoring.
As you can see, it works for me. Please check what is different in your context:
Define dependency different
Use different refactoring (which possibly contains a bug)
... ?
I then added the two projects to a (local) repository (I use the plugin Subversive, it that matters), and have retried the refactoring, and it works the same way. What is that "it does not work if the projects are in SVN"? The projects have to be in Eclipse, refactoring cannot be done on the Subversion repository directly.
I have made another attempt to reproduce the error, but could not. Here is what has worked for me (no screenshots included):
Installed Java EE from Eclipse (version Indigo)
Installed Subclipse 1.8 from the Eclipse Marketplace.
Defined the 2 projects as before.
Added the projects to the different Subversion repositories by using Team > Share Project...> SVN > select the repository location > Finish
I have then deleted the 2 projects, and instantiated them inside the workspace by doing the following steps:
Go to the SVN Repository Exploring perspective.
Open in the view SVN Repositories your repository locations, and select for each project from the menu Checkout....
The projects will be reinstantiated insided the workspace, and the dependency between the 2 is not lost.
After that, I am able to rename a method as I have shown above.
The problem in my workflow, described in Update2, was that, when I imported back the projects to eclipse, I used "import existent project into workspace" function.
I had to use SVN Checkout Projects from SVN instead, choosing the repositories I previously created.
I am using play 1.2.4 to create a web app. It works together with some other applications which are maven projects: they are compiled and resolved (dependencies) with maven.
Now I need to modify my play app so it can also be compiled and started with maven.
Therefore I download maven (3.0.4), installed the maven modul and did everything according to https://github.com/wangyizhuo/play-maven and http://www.playframework.org/modules/maven-head/home
I manage to automatically create a pom file in my project. The problem is that the jars from the play framework are not copied into the lib-folder and when I try to execute mvn package they are missing.
Is there a way to get the maven module to work properly? If not, is there another possibility to compile and start the project from maven (i.e. intermediate ant-file that can be executed by maven?)
Many thanks in advance!
This explains it pretty well. I havnt looked at the module you are refering too, but this shows you how you can create tasks and inculde directories in your build.
Do you need to use maven to build/run it? If not it looks like there is a community contributed extension that allows you to use maven from within play.
I have imported project with Maven. But Subclipse didn't recognize that project already in SVN (I don't see pictogram barrel). For team in context menu I see 2 options:
Apply path
Share project
Which one I must select? In SVN repository there is already project made by other persons.
And I also made checkout by Tortoise. So I need only to recognize SVN local repository by STS.
Sharing the project should make it detect that .svn directories already exist, and should propose you to keep these files and use the information they contain to establish the SVN configuration of the project.
svn is a versionmanagement system. if you got old code and someone released a newer version you can apply a patch. you can share your project on cvs svn and git. like github or google project.
you need to go to new svn repoository and select the one of your project. then you can checkout project as new project. maven is for dependencies, not for code manipulation