Skip to content

Commit 990130d

Browse files
committed
Fix deployment
1 parent 9f7ccbc commit 990130d

File tree

5 files changed

+161
-76
lines changed

5 files changed

+161
-76
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ CMakeSettings.json
1010
.settings
1111
.vscode/
1212
.classpath
13-
src/generated/
13+
src/generated/
14+
library/dependency-reduced-pom.xml

common/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,16 @@
2626
<version>4.0.5</version>
2727
</dependency>
2828
</dependencies>
29+
30+
<build>
31+
<plugins>
32+
<plugin>
33+
<groupId>org.apache.maven.plugins</groupId>
34+
<artifactId>maven-deploy-plugin</artifactId>
35+
<configuration>
36+
<skip>true</skip>
37+
</configuration>
38+
</plugin>
39+
</plugins>
40+
</build>
2941
</project>

library/pom.xml

Lines changed: 112 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,17 @@
6565
<artifactId>common</artifactId>
6666
<version>1.0.0-SNAPSHOT</version>
6767
</dependency>
68-
<!-- <dependency>
69-
<groupId>com.sandflow</groupId>
70-
<artifactId>annotation-processor</artifactId>
71-
<version>1.0.0-SNAPSHOT</version>
72-
<scope>provided</scope>
73-
</dependency> -->
7468
</dependencies>
7569

7670
<build>
71+
<resources>
72+
<resource>
73+
<directory>src/main/resources</directory>
74+
<excludes>
75+
<exclude>**</exclude>
76+
</excludes>
77+
</resource>
78+
</resources>
7779
<plugins>
7880
<plugin>
7981
<groupId>org.codehaus.mojo</groupId>
@@ -146,6 +148,27 @@
146148
</executions>
147149
</plugin>
148150
<plugin>
151+
<groupId>org.apache.maven.plugins</groupId>
152+
<artifactId>maven-shade-plugin</artifactId>
153+
<version>3.5.0</version>
154+
<executions>
155+
<execution>
156+
<phase>package</phase>
157+
<goals>
158+
<goal>shade</goal>
159+
</goals>
160+
<configuration>
161+
<artifactSet>
162+
<includes>
163+
<include>com.sandflow:common</include>
164+
</includes>
165+
</artifactSet>
166+
<attach>true</attach>
167+
</configuration>
168+
</execution>
169+
</executions>
170+
</plugin>
171+
<!-- <plugin>
149172
<groupId>org.apache.maven.plugins</groupId>
150173
<artifactId>maven-assembly-plugin</artifactId>
151174
<executions>
@@ -161,8 +184,89 @@
161184
</configuration>
162185
</execution>
163186
</executions>
164-
</plugin>
187+
</plugin> -->
165188
</plugins>
166189
</build>
167-
190+
<profiles>
191+
<profile>
192+
<id>with-dependencies</id>
193+
<build>
194+
<plugins>
195+
<plugin>
196+
<groupId>org.apache.maven.plugins</groupId>
197+
<artifactId>maven-assembly-plugin</artifactId>
198+
<executions>
199+
<execution>
200+
<phase>package</phase>
201+
<goals>
202+
<goal>single</goal>
203+
</goals>
204+
<configuration>
205+
<descriptorRefs>
206+
<descriptorRef>jar-with-dependencies</descriptorRef>
207+
</descriptorRefs>
208+
</configuration>
209+
</execution>
210+
</executions>
211+
</plugin>
212+
</plugins>
213+
</build>
214+
</profile>
215+
<profile>
216+
<id>release</id>
217+
<build>
218+
<plugins>
219+
<plugin>
220+
<groupId>org.apache.maven.plugins</groupId>
221+
<artifactId>maven-source-plugin</artifactId>
222+
<version>3.4.0</version>
223+
<executions>
224+
<execution>
225+
<id>attach-sources</id>
226+
<goals>
227+
<goal>jar-no-fork</goal>
228+
</goals>
229+
</execution>
230+
</executions>
231+
</plugin>
232+
<plugin>
233+
<groupId>org.apache.maven.plugins</groupId>
234+
<artifactId>maven-javadoc-plugin</artifactId>
235+
<version>3.12.0</version>
236+
<executions>
237+
<execution>
238+
<id>attach-javadocs</id>
239+
<goals>
240+
<goal>jar</goal>
241+
</goals>
242+
</execution>
243+
</executions>
244+
</plugin>
245+
<plugin>
246+
<groupId>org.apache.maven.plugins</groupId>
247+
<artifactId>maven-gpg-plugin</artifactId>
248+
<version>3.2.8</version>
249+
<executions>
250+
<execution>
251+
<id>sign-artifacts</id>
252+
<phase>verify</phase>
253+
<goals>
254+
<goal>sign</goal>
255+
</goals>
256+
</execution>
257+
</executions>
258+
</plugin>
259+
<plugin>
260+
<groupId>org.sonatype.central</groupId>
261+
<artifactId>central-publishing-maven-plugin</artifactId>
262+
<version>0.9.0</version>
263+
<extensions>true</extensions>
264+
<configuration>
265+
<publishingServerId>central</publishingServerId>
266+
</configuration>
267+
</plugin>
268+
</plugins>
269+
</build>
270+
</profile>
271+
</profiles>
168272
</project>

library/src/main/java/com/sandflow/smpte/mxf/StreamingWriter.java

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,21 @@
7878
*/
7979
public class StreamingWriter {
8080

81-
private abstract class ContainerWriter extends OutputStream {
81+
/**
82+
* Abstract class representing a writer for an essence container.
83+
*/
84+
abstract class ContainerWriter extends OutputStream {
8285

8386
enum State {
8487
READY,
8588
WRITING
8689
}
8790

88-
private final long bodySID;
89-
private final long indexSID;
90-
private long bytesToWrite;
91-
private long ecOffset = 0;
92-
private State state = State.READY;
91+
final long bodySID;
92+
final long indexSID;
93+
long bytesToWrite;
94+
long ecOffset = 0;
95+
State state = State.READY;
9396

9497
ContainerWriter(long bodySID, long indexSID) {
9598
this.bodySID = bodySID;
@@ -256,7 +259,7 @@ public AUID getAUID(long localtag) {
256259
/**
257260
* Writer for CBE clip-wrapped essence.
258261
*/
259-
class GCClipCBEWriter extends ContainerWriter {
262+
public class GCClipCBEWriter extends ContainerWriter {
260263

261264
private long accessUnitSize;
262265
private long accessUnitCount;
@@ -345,7 +348,7 @@ PartitionPack.Status getPartitionStatus() {
345348
/**
346349
* Writer for Generic Stream.
347350
*/
348-
class GSWriter extends ContainerWriter {
351+
public class GSWriter extends ContainerWriter {
349352

350353
public GSWriter(long bodySID) {
351354
super(bodySID, 0);
@@ -858,7 +861,19 @@ public void start() throws IOException, KLVException, MXFException {
858861
this.state = State.STARTED;
859862
}
860863

861-
void startPartition(ContainerWriter cw) throws IOException, KLVException, MXFException {
864+
/**
865+
* Starts a new partition for the specified essence container.
866+
*
867+
* This method ensures that the current partition is closed before starting a new one.
868+
*
869+
* @param cw The writer for the container for which the new partition is started.
870+
* @throws IOException If an I/O error occurs.
871+
* @throws KLVException If a KLV error occurs.
872+
* @throws MXFException If an MXF error occurs.
873+
* @throws IllegalArgumentException If the provided ContainerWriter is null.
874+
* @throws IllegalStateException If the StreamingWriter has not been started.
875+
*/
876+
public void startPartition(ContainerWriter cw) throws IOException, KLVException, MXFException {
862877
if (cw == null) {
863878
throw new IllegalArgumentException("ContainerWriter cannot be null");
864879
}

pom.xml

Lines changed: 11 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -32,62 +32,15 @@
3232
</dependencies>
3333
</dependencyManagement>
3434

35-
<profiles>
36-
<profile>
37-
<id>release</id>
38-
<build>
39-
<plugins>
40-
<plugin>
41-
<groupId>org.apache.maven.plugins</groupId>
42-
<artifactId>maven-source-plugin</artifactId>
43-
<version>3.4.0</version>
44-
<executions>
45-
<execution>
46-
<id>attach-sources</id>
47-
<goals>
48-
<goal>jar-no-fork</goal>
49-
</goals>
50-
</execution>
51-
</executions>
52-
</plugin>
53-
<plugin>
54-
<groupId>org.apache.maven.plugins</groupId>
55-
<artifactId>maven-javadoc-plugin</artifactId>
56-
<version>3.12.0</version>
57-
<executions>
58-
<execution>
59-
<id>attach-javadocs</id>
60-
<goals>
61-
<goal>jar</goal>
62-
</goals>
63-
</execution>
64-
</executions>
65-
</plugin>
66-
<plugin>
67-
<groupId>org.apache.maven.plugins</groupId>
68-
<artifactId>maven-gpg-plugin</artifactId>
69-
<version>3.2.8</version>
70-
<executions>
71-
<execution>
72-
<id>sign-artifacts</id>
73-
<phase>verify</phase>
74-
<goals>
75-
<goal>sign</goal>
76-
</goals>
77-
</execution>
78-
</executions>
79-
</plugin>
80-
<plugin>
81-
<groupId>org.sonatype.central</groupId>
82-
<artifactId>central-publishing-maven-plugin</artifactId>
83-
<version>0.9.0</version>
84-
<extensions>true</extensions>
85-
<configuration>
86-
<publishingServerId>central</publishingServerId>
87-
</configuration>
88-
</plugin>
89-
</plugins>
90-
</build>
91-
</profile>
92-
</profiles>
35+
<build>
36+
<plugins>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-deploy-plugin</artifactId>
40+
<configuration>
41+
<skip>true</skip>
42+
</configuration>
43+
</plugin>
44+
</plugins>
45+
</build>
9346
</project>

0 commit comments

Comments
 (0)