Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Older Versions of project required although deleted from .m2/repository cache

Choose whichever flag you like.  

Setting `maven.repo.local` to a new scratch location causes *everything* to be re-downloaded and is best paired with Nexus (there's also a docker image with Nexus 2) or some Maven repository manager that will cache Central.  You may discover you were using snapshot or non-canonical versions that were cached or installed in your local ~/.m2/repository.

(`maven.repo.local` is $HOME/.m2/repository by default.)

Setting `tycho.localArtifacts` instructs Tycho to ignore any artifacts that are being built (e.g., are in your source tree) that are found in your `maven.repo.local`.  Whenever you do a `mvn install`, all built artifacts are installed into your `maven.repo.local`.

So setting `tycho.localArtifacts` effectively provides a subset of the behaviour of setting `maven.repo.local` to a scratch location.


I usually put `tycho.localArtifacts=ignore` in a CI or releng profile.  You don't want this setting by default as it's useful for rapidly iterating on changes to particular bundles without having to rebuild your entire project each time.  That is:

# run the full build at the top-level to install current versions
$ mvn install

# now switch to a bundle and try to fix the manifest 
$ cd bundles/my.troublesome.bundle
$ vi META-INF/MANIFEST.MF
$ mvn package
# did that fix the issue?  if not, rinse and repeat

In the above, the my.troublesome.bundle will resolve its dependencies against the versions installed your local repository via the `mvn install`.  With `tycho.localArtifacts=ignore`, however, none of those local copies will be used.

Hope that helps.

Brian.

On 17-May-2017, at 9:14 AM, khady lo seck <khady.engineering@xxxxxxxxx> wrote:

Ok. So inside ~/.m2/repository i run mvn <which goal?> -Dmaven.repo.local=some-temp-location. 
Tried the second one in the parent pom location with mvn install -Dtycho.localArtifacts=ignore . It did not seem to fix the problem. 

Thanks in advance for the clarification on the first one 

On Tue, May 16, 2017 at 10:36 PM, Brian de Alwis <briandealwis@xxxxxxxxx> wrote:
Two things that are good to do:

  • run with `-Dmaven.repo.local=some-temp-location` to ensure you don't pick up stale artifacts from your ~/.m2/repository
  • run with `-Dtycho.localArtifacts=ignore` to ensure Tycho doesn't resolve previously-built versions of our built artifacts

Brian.

On 12-May-2017, at 1:29 PM, khady lo seck <khady.engineering@xxxxxxxxx> wrote:

Hello, 

I am wondering if anybody ever stumbled across this problem. All projects build successfully but just before zipping the product it claims the product 1.2.2 requires new version of it 1.2.6 but it could not be found. I am quite perplexed as to how 1.2.2 is still the version of the product. I got rid of it in the Manifest and pom files as well as in m2 cache. They all show version 1.2.6 now. But at runtime the ghost of 1.2.2 versions reappears. 

Snippet of mvn install -X below

[INFO] Installing product com.company.rcp for environment win32/win32/x86_64 to C:\Users\klseck\workspace-maven\builder\target\products\com.company.rcp\win32\win32\x86_64
[DEBUG] Calling director with arguments: [-metadataRepository, file:/C:/Users/klseck/workspace-maven/builder/target/,file:/C:/Users/klseck/workspace-maven/builder/target/targetPlatformRepository/, -artifactRepository, file:/C:/Users/klseck/workspace-maven/builder/target/,file:/resolution-context-artifacts@C%253A%255CUsers%255Cklseck%255Cworkspace-maven%255Cbuilder,file:/C:/Users/klseck/dev/projects/bbcode-lite-parser/target/,file:/C:/Users/klseck/dev/projects/mcd-git-connection/target/,file:/C:/Users/klseck/dev/projects/generic_java_utilities/target/,file:/C:/Users/klseck/dev/projects/generic-eclipse-utilities/target/,file:/C:/Users/klseck/dev/projects/salesforce-oauth2-browser-component/target/,file:/C:/Users/klseck/dev/projects/company-folder-builder/target/,file:/C:/Users/klseck/dev/projects/iar-translator/target/,file:/C:/Users/klseck/dev/projects/component-tree-gui/target/,file:/C:/Users/klseck/dev/projects/component_tree_model/target/,file:/C:/Users/klseck/dev/projects/mcdparser/target/,file:/C:/Users/klseck/dev/projects/ucrtos-plugin/target/,file:/C:/Users/klseck/workspace-maven/builder/target/,file:/C:/Users/klseck/.m2/repository/, -installIU, com.company.rcp, -destination, C:\Users\klseck\workspace-maven\builder\target\products\com.company.rcp\win32\win32\x86_64, -profile, DefaultProfile, -profileProperties, org.eclipse.update.install.features=true, -roaming, -p2.os, win32, -p2.ws, win32, -p2.arch, x86_64]
Installing com.company.rcp 1.2.2.
Installation failed.
Cannot complete the install because one or more required items could not be found.
 Software being installed: company Project Builder 1.2.2 (com.company.rcp 1.2.2)
 Missing requirement: Company Project Builder 1.2.2 (com.company.rcp 1.2.2) requires 'com.company.rcp [1.2.6.201705121340]' but it could not be found
Application failed, log file location: C:\Users\klseck\workspace-maven\maven.parent\workspace\.metadata\.log

!ENTRY org.eclipse.equinox.p2.director 4 10053 2017-05-12 09:43:03.272
!MESSAGE Cannot complete the install because one or more required items could not be found.
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2017-05-12 09:43:03.272
!MESSAGE Software being installed: Company Project Builder 1.2.2 (com.company.rcp 1.2.2)
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2017-05-12 09:43:03.273
!MESSAGE Missing requirement: Company Project Builder 1.2.2 (com.company.rcp 1.2.2) requires 'com.company.rcp [1.2.6.201705121340]' but it could not be found
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] com.company.maven.parent ........................... SUCCESS [  3.636 s]
[INFO] com.company.bbcode.parser .......................... SUCCESS [  3.400 s]
[INFO] com.company.toolkit ................................ SUCCESS [  9.581 s]
[INFO] com.company.eclipse.toolkit ........................ SUCCESS [  5.153 s]
[INFO] com.company.export.folder ................... SUCCESS [  3.334 s]
[INFO] com.company.export.iar ...................... SUCCESS [  3.473 s]
[INFO] com.company.component.model.git .................... SUCCESS [  4.275 s]
[INFO] com.company.oauth2.connector ....................... SUCCESS [  3.959 s]
[INFO] com.company.mcd.model ....................... SUCCESS [  8.983 s]
[INFO] com.company.gui.selector .................... SUCCESS [  5.532 s]
[INFO] com.company.mcdparser ....................... SUCCESS [  7.359 s]
[INFO] com.company.plugin .......................... SUCCESS [ 12.947 s]
[INFO] com.company.rcp ............................. SUCCESS [  5.515 s]
[INFO] com.company.rcp.builder ............................ FAILURE [ 16.561 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:48 min
[INFO] Finished at: 2017-05-12T09:43:03-04:00
[INFO] Final Memory: 153M/1189M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:1.0.0:materialize-products (materialize-products) on project com.company.rcp.builder: Installation of product com.company.rcp for environment win32/win32/x86_64 failed: Call to p2 director application failed with exit code 13. Program arguments were: [-metadataRepository, file:/C:/Users/klseck/workspace-maven/builder/target/,file:/C:/Users/klseck/workspace-maven/builder/target/targetPlatformRepository/, -artifactRepository, file:/C:/Users/klseck/workspace-maven/builder/target/,file:/resolution-context-artifacts@C%253A%255CUsers%255Cklseck%255Cworkspace-maven%255Cbuilder,

--
Best regards, 

Khady L. Seck
Full Stack Java Developer
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Best regards, 

Khady L. Seck
Full Stack Java Developer
Tel: 438-830-4117
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top