Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'shell-osgi' of github.com:etesla/tesla into shell-osgi

  • Loading branch information...
commit e36d16b6bf069e7cb6630ec6a1ea59b90e58eb1f 2 parents 486fae1 + 09733be
Jason van Zyl authored
2  ...ell-osgi/maven-provision/src/main/java/org/eclipse/tesla/osgi/provision/internal/DefaultProvisioner.java
@@ -104,9 +104,9 @@ public Object addingService( final ServiceReference serviceReference )
104 104 }
105 105 catch ( Exception e )
106 106 {
107   - System.out.println( "Problem found during provisioning. See log for details." );
108 107 if ( Boolean.valueOf( (String) serviceReference.getProperty( "exit-on-error" ) ) )
109 108 {
  109 + System.setProperty( "provision-error", e.getMessage() );
110 110 try
111 111 {
112 112 bundleContext.getBundle( 0 ).stop();
2  .../src/main/java/org/eclipse/tesla/osgi/provision/url/maor/internal/DefaultMavenArtifactObrRepository.java
@@ -91,7 +91,7 @@ public String create( final String coordinates )
91 91 }
92 92 catch ( Exception e )
93 93 {
94   - throw new RuntimeException( e );
  94 + throw new RuntimeException( e.getMessage(), e );
95 95 }
96 96 }
97 97
14 tesla-shell-osgi/tesla-shell-osgi-core/src/main/java/org/eclipse/tesla/shell/core/Main.java
@@ -114,6 +114,13 @@ private void boot()
114 114 final FrameworkEvent event = framework.waitForStop( 0 );
115 115 if ( event.getType() != FrameworkEvent.STOPPED_UPDATE )
116 116 {
  117 + final String provisionError = System.getProperty( "provision-error" );
  118 + if ( provisionError != null )
  119 + {
  120 + System.out.println( "Problem found during provisioning. See log for details." );
  121 + System.out.println( provisionError );
  122 + removeChecksum( shellProperties );
  123 + }
117 124 break;
118 125 }
119 126 }
@@ -131,6 +138,13 @@ private void saveChecksum( final Properties shellProperties, final Properties bu
131 138 fileWrite( checksumFile, SHA1( properties ) );
132 139 }
133 140
  141 + private void removeChecksum( final Properties shellProperties )
  142 + throws Exception
  143 + {
  144 + final File checksumFile = new File( new File( shellProperties.getProperty( PROFILE ) ), "checksum" );
  145 + checksumFile.delete();
  146 + }
  147 +
134 148 private boolean shouldForceReset( final Properties shellProperties, final Properties bundleProperties )
135 149 {
136 150 final File checksumFile = new File( new File( shellProperties.getProperty( PROFILE ) ), "checksum" );

0 comments on commit e36d16b

Please sign in to comment.
Something went wrong with that request. Please try again.