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

when I compile this file,there are some errors?why? #26

Open
ksspwuwei opened this issue Oct 17, 2016 · 9 comments
Open

when I compile this file,there are some errors?why? #26

ksspwuwei opened this issue Oct 17, 2016 · 9 comments

Comments

@ksspwuwei
Copy link

After I "cd cs-studio-thirdparty;mvn -B -P my-css-settings",there are some errors:

[root@wuwei cs-studio-thirdparty-master]# mvn -B -P my-css-settings clean verify
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.csstudio:edu.msu.nscl.olog.api:2.2.8-SNAPSHOT @ /root/cs-studio/cs-studio-thirdparty-master/plugins/edu.msu.nscl.olog.api/pom.xml
[INFO] Adding repository file:/root/cs-studio/my_comp_repo
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/ (0B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/releases/mars
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/mars/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/201506241002/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/201510021000/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/mars/201602261000/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5/ (0B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/4.5
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5/R-4.5-201506032000/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5/R-4.5.1-201509040015/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5/R-4.5.2-201602121500/ (0B at 0B/s)
[INFO] Resolving dependencies of MavenProject: org.csstudio:edu.msu.nscl.olog.api:2.2.8-SNAPSHOT @ /root/cs-studio/cs-studio-thirdparty-master/plugins/edu.msu.nscl.olog.api/pom.xml
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: edu.msu.nscl.olog.api 2.2.8.qualifier
[ERROR] Missing requirement: edu.msu.nscl.olog.api 2.2.8.qualifier requires 'bundle com.sun.jersey.bundle 1.19.0' but it could not be found
[ERROR]
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: org.csstudio:edu.msu.nscl.olog.api:2.2.8-SNAPSHOT @ /root/cs-studio/cs-studio-thirdparty-master/plugins/edu.msu.nscl.olog.api/pom.xml: See log for details -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

I don't know how to solve it,can anyone help me?Thank you very much!And I compile the cs-studio/core
and cs-studio/applications,there are also some errors.

@shroffk
Copy link
Contributor

shroffk commented Oct 17, 2016

] Cannot resolve project dependencies:
[ERROR] Software being installed: edu.msu.nscl.olog.api 2.2.8.qualifier
[ERROR] Missing requirement: edu.msu.nscl.olog.api 2.2.8.qualifier requires 'bundle com.sun.jersey.bundle 1.19.0' but it could not be found

As the error says, the required dependency is not being satisfied...this bundle is part of the maven-osgi-repository.
Since I am not sure what your css-settings comprises of it is hard to give an exact answer but if you are using a locally built version of the maven-osgi-bundles...please check if the jersey bundles are available in them.

@ksspwuwei
Copy link
Author

@shroffk Thank you for your answer.I can find the com.sun.jersey.bundle_1.19.0.jar in the maven-osgi-bundles/repository/target/repository/plugins.And my-css-settings uses the local repository.So I don't know why there is an error like this.

my compositeContent.xml:












@ksspwuwei
Copy link
Author

child location="/root/cs-studio/maven-osgi-bundles/repository/target/repository"

@kasemir
Copy link
Contributor

kasemir commented Oct 17, 2016

Yes, puzzling.

Your original build output includes

[INFO] Adding repository file:/root/cs-studio/my_comp_repo

so you are using your composite repo.
That in turn lists the /root/cs-studio/maven-osgi-bundles/repository/target/repository which indeed contains the com.sun.jersey.bundle_1.19.0.jar, so I'm not sure why Maven doesn't find it.

The only difference I see to my build setup:
You list the remote repo for thirdparty:

<child location="http://download.controlsystemstudio.org/thirdparty/4.2"/>

I list the local file, something like /root/cs-studio/cs-studio-thirdparty/repository/target/repository/ for your setup. The p2.atomic.composite.loading=false setting allows you to refer to the initially empty local repos while building everything locally.

Just to make sure, maybe start over after deleting your $HOME/.m2/repository directory, in case maven is fetching some garbage from there.

@ksspwuwei
Copy link
Author

@kasemir,thank you for your help!I'll try again.

@ksspwuwei
Copy link
Author

@kasemir I have tried again,but it still have the same error.Actually I download the source code including cs-studio,maven-osgi-bundles, diirt,cs-studio-thirdparty and org.csstudio.product,but I can only compile the diirt and maven-osgi-bundles successfully,I don't know why there are errors.It's so depressing!

@kasemir
Copy link
Contributor

kasemir commented Oct 18, 2016

This makes some sense: diirt and maven-osgi-bundles are "standalone", while cs-studio-thirdparty then depends on the output of maven-osgi-bundles, and cs-studio/core depends on the output of all the previous ones and so on.

We are sure that your build setup is using your composite repo:

[INFO] Adding repository file:/root/cs-studio/my_comp_repo

.. but when you had p2.atomic.composite.loading set to false, it would silently ignore any errors in the child references. So maybe there is some typo or file access problem, and even though we think that your composite repo lists your locally created maven-osgi-bundles repo, maybe there's a problem, and it really can't find com.sun.jersey.bundle?

So try this: First build diirt, then maven-osgi-bundles, and when you then build cs-studio-thirdparty try that with the following in your "compositeContent.xml" (and compositeArtifacts.xml):

<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='Local Composite Repository'
type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository'
            version='1.0.0'>
  <properties size='1'>
    <property name='p2.atomic.composite.loading' value='true'/>
  </properties>
  <children size="2">
    <child location="/root/cs-studio/diirt/p2/target/repository"/>
    <child location="/root/cs-studio/maven-osgi-bundles/repository/target/repository"/>
  </children>
</repository>

The p2.atomic.composite.loading = true instructs maven/tycho to really check those child repositories. If there's a problem with them, you'll get an error early on. That also means we can only list those 2 child repos that really exist at that time, we can't already list cs-studio-thirdparty, cs-studio/core and cs-studio/applications which we'll build later.

@ksspwuwei
Copy link
Author

there are still some errors like the following:

[INFO] --- tycho-packaging-plugin:0.23.1:build-qualifier (default-build-qualifier) @ edu.msu.nscl.olog.api ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] thirdparty ......................................... SUCCESS [ 0.069 s]
[INFO] thirdparty-plugins ................................. SUCCESS [ 0.003 s]
[INFO] edu.msu.nscl.olog.api .............................. FAILURE [ 0.247 s]
[INFO] gov.bnl.channelfinder.api .......................... SKIPPED
[INFO] org.csstudio.platform.libs.easymock ................ SKIPPED
[INFO] org.csstudio.platform.libs.hibernate ............... SKIPPED
[INFO] org.csstudio.platform.libs.jdbc .................... SKIPPED
[INFO] org.csstudio.platform.libs.jmock ................... SKIPPED
[INFO] org.csstudio.platform.libs.jms ..................... SKIPPED
[INFO] org.csstudio.platform.libs.tine .................... SKIPPED
[INFO] org.eclipse.nebula.widgets.grid .................... SKIPPED
[INFO] org.eclipse.nebula.jface.gridviewer ................ SKIPPED
[INFO] gov.bnl.shiftClient ................................ SKIPPED
[INFO] thirdparty-features ................................ SKIPPED
[INFO] org.csstudio.thirdparty.all.feature ................ SKIPPED
[INFO] thirdparty-repository .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:03 min
[INFO] Finished at: 2016-11-23T14:25:52+08:00
[INFO] Final Memory: 148M/495M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.23.1:build-qualifier (default-build-qualifier) on project edu.msu.nscl.olog.api: No git repository found searching upwards from /root/cs-studio/cs-studio-thirdparty/plugins/edu.msu.nscl.olog.api -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :edu.msu.nscl.olog.api

@yinlx
Copy link

yinlx commented Apr 5, 2017

@ksspwuwei Hi, I got the exact error as your last attempt when I get the source code of this repo by downloading ZIP file of this repo.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.23.1:build-qualifier (default-
build-qualifier) on project edu.msu.nscl.olog.api: No git repository found searching upwards from 
/root/cs-studio/cs-studio-thirdparty/plugins/edu.msu.nscl.olog.api -> [Help 1]

Then I notice the error message noting that No git repository.

So I try again by git clone the source code and then rebuild, and it works!!

[INFO] Reactor Summary:
[INFO] 
[INFO] thirdparty ........................................ SUCCESS [0.562s]
[INFO] thirdparty-plugins ................................ SUCCESS [0.003s]
[INFO] edu.msu.nscl.olog.api ............................. SUCCESS [32.086s]
[INFO] gov.bnl.channelfinder.api ......................... SUCCESS [11.652s]
[INFO] org.csstudio.platform.libs.easymock ............... SUCCESS [15.439s]
[INFO] org.csstudio.platform.libs.hibernate .............. SUCCESS [3:29.927s]
[INFO] org.csstudio.platform.libs.gauges ................. SUCCESS [1:56.264s]
[INFO] org.csstudio.platform.libs.jdbc ................... SUCCESS [5:39.697s]
[INFO] org.csstudio.platform.libs.jmock .................. SUCCESS [28.067s]
[INFO] org.csstudio.platform.libs.jms .................... SUCCESS [2:23.641s]
[INFO] org.csstudio.platform.libs.tine ................... SUCCESS [1:38.254s]
[INFO] org.eclipse.nebula.widgets.grid ................... SUCCESS [3.467s]
[INFO] org.eclipse.nebula.jface.gridviewer ............... SUCCESS [3.621s]
[INFO] gov.bnl.shiftClient ............................... SUCCESS [6.315s]
[INFO] thirdparty-features ............................... SUCCESS [0.050s]
[INFO] org.csstudio.thirdparty.all.feature ............... SUCCESS [4.718s]
[INFO] thirdparty-repository ............................. SUCCESS [18.635s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18:08.401s
[INFO] Finished at: Tue Apr 04 22:03:50 PDT 2017
[INFO] Final Memory: 125M/239M
[INFO] ------------------------------------------------------------------------

real	18m12.699s
user	1m55.080s
sys	0m8.902s

I hope this can help you to solve this issue.

@kasemir From a user's point of view, it seems a bit weird that the build rely on whether the source code is a full git repo or not.

Is it because the latest code is dependent on specific version of edu.msu.nscl.olog.api?

If not, I suggest remove this dependency in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants